@import url("./tokens.css");

@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
/* Visible semantic DOM. This stylesheet deliberately owns the entire UI surface. */
:root {
  --shell-bg: var(--color-background-canvas, #000000);
  --shell-surface: var(--color-background-surface, #242426);
  --shell-raised: var(--color-background-raised, #363638);
  --shell-ink: var(--color-foreground-primary, #ffffff);
  --shell-muted: var(--color-foreground-secondary, #c7c7cc);
  --shell-accent: var(--color-accent, #50a8ff);
  --shell-border: var(--color-border-strong, #c7c7cc);
  --shell-line: #3c3c3f;
  --shell-control: #202021;
  --shell-control-selected: #0a0a0a;
  --shell-switch-off: #919197;
  --shell-switch-on: #3bd759;
  --shell-selected: var(--color-selection-background, #193b5b);
  --shell-danger: var(--color-error, #ff766f);
  --shell-warning: var(--color-warning, #ffb340);
  --shell-on-accent: var(--color-on-accent, var(--shell-bg));
  color-scheme: dark;
}
html[data-shell="dom"],
html[data-shell="dom"] body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--shell-bg);
  color: var(--shell-ink);
  font: var(--shell-weight-regular) var(--shell-text-body)/var(--shell-leading-body) var(--shell-font);
  -webkit-text-size-adjust: 100%;
  touch-action: pan-x pan-y;
}
/* Nested scrollers terminate touch-action ancestor lookup. Apply the policy
   throughout every screen, including sheets, fields and article content.
   More specific app gestures can still restrict a surface to pan-y or none. */
:where(html[data-shell="dom"]) * {
  touch-action: pan-x pan-y;
}
html[data-shell="dom"] *,
html[data-shell="dom"] *::before,
html[data-shell="dom"] *::after {
  box-sizing: border-box;
  font-family: var(--shell-font);
}
html[data-shell="dom"] [hidden] {
  display: none !important;
}
.shell-date-picker-bridge {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}
:where(html[data-shell="dom"]) :is(button, input, textarea, select) {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}
html[data-shell="dom"] button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-x pan-y;
}
html[data-shell="dom"] :is(button, a, input, textarea, select):focus-visible {
  outline: 3px solid var(--shell-accent);
  outline-offset: 4px;
}
html[data-shell="dom"] a {
  touch-action: pan-x pan-y;
  color: var(--shell-accent);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
html[data-shell="dom"] ::selection {
  background: var(--shell-accent);
  color: var(--shell-bg);
}
/* Use a document-sized containing block. iOS may clip fixed layers to a
   shorter viewport even when their explicit height extends below it. */
html[data-shell="dom"] body {
  position: relative;
}
html[data-shell="dom"][data-standalone="true"],
html[data-shell="dom"][data-standalone="true"] body {
  height: var(--shell-keyboard-height, 100vh);
}
.shell-app {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--shell-bg);
  isolation: isolate;
}
/* Keep the initial content below iOS system chrome, while allowing that
   spacing to scroll away and rows to pass behind the system blur. */
@supports (-webkit-touch-callout: none) {
  html[data-shell="dom"][data-standalone="true"] .shell-content {
    padding-top: calc(var(--shell-space-12) + env(safe-area-inset-top, 0px) + var(--shell-space-6));
  }
}
.shell-pane {
  --shell-safe-top: env(safe-area-inset-top, 0px);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--shell-bg);
}
.shell-header {
  display: flex;
  align-items: center;
  gap: var(--shell-space-6);
  flex-shrink: 0;
  min-height: 68px;
  padding: calc(var(--shell-space-6) + env(safe-area-inset-top)) var(--shell-space-10) var(--shell-space-6);
  border-bottom: 1px solid var(--shell-line);
  background: var(--shell-bg);
  z-index: 2;
}
.shell-title {
  font-size: var(--shell-text-title);
  line-height: var(--shell-leading-tight);
  letter-spacing: normal;
  font-weight: var(--shell-weight-strong);
  margin: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.shell-subtitle,
.shell-meta {
  color: var(--shell-muted);
  font-size: var(--shell-text-secondary);
  line-height: var(--shell-leading-copy);
}
.shell-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--shell-border) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-padding-block: var(--shell-space-12) 120px;
}
.shell-content {
  width: min(100%, 720px);
  margin-inline: auto;
  padding: var(--shell-space-12) var(--shell-space-10) calc(120px + env(safe-area-inset-bottom));
  overflow-wrap: anywhere;
}
.shell-content > p {
  margin: 0 0 var(--shell-space-8);
  white-space: pre-wrap;
}
.shell-content > :is(.shell-row, .shell-theme-preview) + p {
  margin-top: var(--shell-space-6);
}
.shell-section {
  margin: var(--shell-space-16) 0 var(--shell-space-6);
  font-size: var(--shell-text-label);
  line-height: 1.5;
  font-weight: var(--shell-weight-strong);
  letter-spacing: normal;
  text-transform: none;
  color: var(--shell-muted);
}
.shell-section:first-child {
  margin-top: 0;
}
.shell-rule {
  border: 0;
  border-top: 1px solid var(--shell-line);
  margin: var(--shell-space-10) 0;
}
.shell-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--shell-space-5);
  width: 100%;
  min-width: 44px;
  min-height: 50px;
  border: 1.5px solid var(--shell-border);
  border-radius: var(--shell-radius-pill);
  background: var(--shell-control);
  padding: var(--shell-space-6) var(--shell-space-8);
  color: var(--shell-ink);
  font-weight: var(--shell-weight-medium);
  line-height: var(--shell-leading-control);
  text-align: center;
  text-decoration: none;
  transition:
    background var(--shell-duration) var(--shell-ease),
    scale var(--shell-duration-fast) var(--shell-ease),
    transform var(--shell-duration-fast) var(--shell-ease),
    box-shadow var(--shell-duration) var(--shell-ease);
  position: relative;
}
.shell-content > .shell-button {
  margin-block: var(--shell-space-5);
}
.shell-button[aria-pressed="true"],
.shell-button[aria-checked="true"],
.shell-button[data-selected="true"],
.shell-row[data-selected="true"] {
  border-color: var(--shell-accent);
  background: var(--shell-selected);
  box-shadow: inset 0 0 0 1px var(--shell-accent);
}
.shell-button:disabled,
.shell-button[aria-disabled="true"],
.shell-row[aria-disabled="true"],
.shell-row:disabled {
  opacity: 1;
  color: var(--shell-muted);
  background: var(--shell-raised);
  border-color: var(--shell-line);
  cursor: default;
  transform: none;
}
.shell-button[data-quiet="true"]:not([data-primary="true"]):not([data-danger="true"]) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.shell-button[data-primary="true"]:not(:where(.shell-dock > *, .shell-corner > *)) {
  color: var(--shell-on-accent);
  background: var(--shell-accent);
  border-color: var(--shell-accent);
  box-shadow: none;
}
.shell-button[data-danger="true"],
.shell-row[data-danger="true"] {
  color: var(--shell-danger);
  border-color: var(--shell-border);
  background: var(--shell-control);
  box-shadow: none;
}
.shell-button[data-error="true"],
.shell-row[data-error="true"],
.shell-error {
  color: var(--shell-danger);
}
.shell-icon {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 22px;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
}
.shell-icon-button {
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 50%;
  padding: var(--shell-space-6);
  flex: none;
}
.shell-icon-button .shell-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.shell-dock {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--shell-space-2);
  padding: 5px 9px;
  max-width: calc(100% - 136px);
  border: 1.5px solid var(--shell-border);
  border-radius: var(--shell-radius-pill);
  background: var(--shell-surface-floating);
  box-shadow: var(--shell-highlight), var(--shell-shadow-floating);
  z-index: 3;
}
.shell-dock .shell-button {
  border: 0;
  box-shadow: none;
  width: 44px;
  height: 44px;
  min-height: 44px;
}
.shell-dock .shell-button:not([data-danger="true"]) {
  background: transparent;
}
.shell-corner {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 3;
}
.shell-corner[data-side="left"] {
  left: 16px;
}
.shell-corner[data-side="right"] {
  right: 16px;
}
.shell-corner .shell-button {
  width: 52px;
  height: 52px;
}
.shell-row {
  display: flex;
  align-items: center;
  gap: var(--shell-space-8);
  min-height: 58px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--shell-radius);
  padding: var(--shell-space-8);
  background: var(--shell-surface);
  text-align: left;
  color: var(--shell-ink);
  text-decoration: none;
  line-height: 1.5;
  transition:
    transform var(--shell-duration-fast) var(--shell-ease),
    background var(--shell-duration-feedback) var(--shell-ease);
}
:is(.shell-content, .shell-choice-rows) > .shell-row + .shell-row {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
:is(.shell-content, .shell-choice-rows) > .shell-row:has(+ .shell-row) {
  position: relative;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
:is(.shell-content, .shell-choice-rows) > .shell-row:has(+ .shell-row)::after {
  content: ""; position: absolute; bottom: 0; left: 16px; right: 16px;
  height: 1px; background: var(--shell-line);
}
:is(.shell-content, .shell-choice-rows) > .shell-row:has(> .shell-icon):has(+ .shell-row)::after { left: 54px; }
.shell-row-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--shell-space-2);
}
.shell-row-copy > .shell-label {
  font-weight: var(--shell-weight-regular);
}
.shell-row-value {
  font-size: var(--shell-text-label);
  color: var(--shell-muted);
  margin-left: auto;
}
.shell-group,
.shell-chips {
  display: flex;
  gap: var(--shell-space-4);
  flex-wrap: wrap;
  margin: var(--shell-space-6) 0 var(--shell-space-10);
}
.shell-group > .shell-button {
  flex: 1;
  width: auto;
  min-width: 44px;
}
.shell-chips > .shell-button {
  width: auto;
  min-height: 44px;
  padding: var(--shell-space-4) var(--shell-space-8);
  border-radius: var(--shell-radius-pill);
  font-size: var(--shell-text-small);
}
.shell-chips > .shell-button:is([data-selected="true"], [aria-pressed="true"], [aria-checked="true"]) {
  background: var(--shell-accent);
  color: var(--shell-on-accent);
  border-color: var(--shell-accent);
  box-shadow: none;
}
.shell-segments {
  position: relative;
  isolation: isolate;
  display: flex;
  border: 1.5px solid var(--shell-border);
  border-radius: var(--shell-radius-pill);
  background: var(--shell-control);
  padding: var(--shell-space-2);
  gap: var(--shell-space-2);
  margin: var(--shell-space-6) 0 var(--shell-space-10);
  overflow: auto;
}
.shell-segments::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: max(44px, calc((100% - 8px - (var(--shell-segment-count) - 1) * 4px) / var(--shell-segment-count)));
  border-radius: var(--shell-radius-pill);
  background: var(--shell-control-selected);
  box-shadow: none;
  pointer-events: none;
  opacity: 0;
  transform: translateX(calc(var(--shell-segment-index) * (100% + 4px)));
  transition: transform var(--shell-duration) var(--shell-ease);
}
.shell-segments[data-has-selection="true"]::before {
  opacity: 1;
}
.shell-segments > .shell-button {
  flex: 1 0 44px;
  min-width: 44px;
  z-index: 1;
  width: auto;
  border: 0;
  min-height: 44px;
  padding: var(--shell-space-4) var(--shell-space-5);
  border-radius: var(--shell-radius-pill);
  white-space: normal;
  background: transparent;
  font-size: var(--shell-text-small);
}
.shell-segments > .shell-button[aria-checked="true"] {
  background: transparent;
  box-shadow: none;
}
.shell-field {
  display: flex;
  flex-direction: column;
  gap: var(--shell-space-4);
  margin: 0 0 var(--shell-space-10);
  min-width: 0;
}
.shell-field > label {
  font-size: var(--shell-text-label);
  font-weight: var(--shell-weight-medium);
  color: var(--shell-muted);
}
.shell-field :is(input, textarea, select) {
  position: static;
  width: 100%;
  min-height: 52px;
  border: 1.5px solid transparent;
  border-radius: var(--shell-radius-pill);
  padding: var(--shell-space-6) var(--shell-space-8);
  background: var(--shell-surface);
  font-size: var(--shell-text-control);
  outline-offset: 3px;
  resize: none;
  appearance: auto;
  color: var(--shell-ink);
  -webkit-text-fill-color: var(--shell-ink);
}
.shell-field-help, .shell-field-error {
  font-size: var(--shell-text-caption);
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--shell-muted);
}
.shell-field-error { color: var(--shell-danger); }
.shell-field textarea {
  border-radius: var(--shell-radius);
  min-height: 140px;
  line-height: var(--shell-leading-copy);
}
.shell-field :is(input, textarea)::placeholder {
  color: var(--shell-muted);
  opacity: 1;
}
html[data-shell="dom"] .shell-field :is(input, textarea, select):focus-visible {
  outline: none;
  border-color: var(--shell-accent);
  box-shadow: none;
}
html[data-shell="dom"] .shell-field [aria-invalid="true"]:focus-visible,
.shell-field [aria-invalid="true"] {
  border-color: var(--shell-danger);
}
.shell-switch {
  appearance: none; -webkit-appearance: none;
  position: relative; width: 51px; height: 31px; flex: none;
  border: 1px solid transparent; border-radius: var(--shell-radius-pill);
  background: var(--shell-switch-off); margin: 0; cursor: pointer;
  transition: background var(--shell-duration-feedback) var(--shell-ease);
}
.shell-switch:before {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--shell-ink); box-shadow: 0 1px 3px #0003;
  transition: transform var(--shell-duration) var(--shell-ease), width var(--shell-duration-fast) var(--shell-ease);
}
.shell-switch:checked { background: var(--shell-switch-on); }
.shell-switch:checked:before { transform: translateX(20px); }
.shell-switch:disabled { opacity: 1; cursor: default; background: var(--shell-control); border-color: var(--shell-border); }
.shell-switch:disabled::before { background: var(--shell-muted); }
.shell-stepper {
  display: grid;
  grid-template-columns: 48px minmax(64px, 1fr) 48px;
  gap: var(--shell-space-4);
  margin: var(--shell-space-4) 0 var(--shell-space-10);
}
.shell-stepper .shell-field {
  margin: 0;
}
.shell-stepper input {
  text-align: center;
}
.shell-stepper > .shell-button {
  padding: var(--shell-space-4);
  min-height: 52px;
}
.shell-notice {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--shell-space-5);
  width: min(100% - 32px, 688px);
  margin: var(--shell-space-6) auto 0;
  border: 1px solid var(--shell-line);
  border-radius: var(--shell-radius-control);
  padding: var(--shell-space-6) var(--shell-space-8);
  font-size: var(--shell-text-small);
  color: var(--shell-ink);
  background: var(--shell-surface);
}
/* A hidden header contributes no safe-area padding to the persistent notice. */
.shell-header[hidden] + .shell-notice {
  margin-top: calc(var(--shell-safe-top) + var(--shell-space-6));
}
.shell-toast {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: var(--shell-space-8);
  padding: var(--shell-space-8) var(--shell-space-10);
  border: 1px solid var(--shell-border-panel);
  border-radius: var(--shell-radius);
  background: var(--shell-surface-floating);
  box-shadow: var(--shell-highlight), var(--shell-shadow-floating);
  font-size: var(--shell-text-small);
}
.shell-toast .shell-button {
  width: auto;
  min-height: 44px;
  min-width: 44px;
  padding: var(--shell-space-4) var(--shell-space-6);
}
.shell-dialog {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 640px);
  max-width: 100%;
  max-height: 88dvh;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--shell-border-panel);
  border-bottom: 0;
  border-radius: var(--shell-radius-sheet) var(--shell-radius-sheet) 0 0;
  background: var(--shell-surface);
  color: var(--shell-ink);
  box-shadow: var(--shell-highlight), var(--shell-shadow-modal);
  overflow: hidden;
}
.shell-dialog::backdrop {
  opacity: 1;
  transition: opacity var(--shell-duration-navigation) var(--shell-ease);
  background: #0008;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.shell-dialog-header {
  display: flex;
  align-items: center;
  gap: var(--shell-space-8);
  padding: var(--shell-space-12) var(--shell-space-10) var(--shell-space-8);
  border-bottom: 1px solid var(--shell-line);
}
.shell-dialog-content {
  overflow: auto;
  max-height: calc(88dvh - 90px);
  padding: var(--shell-space-12) var(--shell-space-10) calc(var(--shell-space-12) + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}
.shell-dialog-content > :is(.shell-button, .shell-row) + :is(.shell-button, .shell-row) {
  margin-top: var(--shell-space-4);
}
.shell-empty {
  padding: var(--shell-space-32) var(--shell-space-8);
  text-align: center;
}
.shell-empty > .shell-icon {
  width: 42px;
  height: 42px;
  margin-bottom: var(--shell-space-10);
}
.shell-empty > .shell-button {
  display: inline-flex;
  max-width: 100%;
  margin-block-start: var(--shell-space-12);
}
.shell-empty h2 {
  font-size: var(--shell-text-heading);
}
.shell-empty p {
  color: var(--shell-muted);
  font-size: var(--shell-text-small);
}
.shell-task {
  display: flex;
  gap: var(--shell-space-8);
  padding: 19px 0;
  border-bottom: 1px solid var(--shell-line);
  align-items: flex-start;
}
.shell-task-check {
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 11px;
  color: var(--shell-accent);
  margin-top: -6px;
  position: relative;
}
.shell-task-check:before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid var(--shell-border);
  border-radius: 50%;
}
.shell-task-check[aria-checked="true"] {
  color: var(--shell-accent);
}
.shell-task-check[aria-checked="true"]:before {
  border-color: var(--shell-accent);
}
.shell-task-body {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  text-align: left;
  font-weight: var(--shell-weight-regular);
  line-height: var(--shell-leading-copy);
}
.shell-sliding-row {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  --shell-slide-offset: 0px;
}
.shell-sliding-row > :not(.shell-slide-action) {
  position: relative;
  z-index: 1;
  transform: translateX(var(--shell-slide-offset));
  transition: transform var(--shell-duration) var(--shell-ease);
}
.shell-slide-dragging > :not(.shell-slide-action) { transition: none; }
.shell-slide-action {
  position: absolute;
  z-index: 0;
  top: 6px;
  bottom: 6px;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-control);
  background: var(--shell-surface);
  color: var(--shell-ink);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  visibility: hidden;
  transition: width var(--shell-duration) var(--shell-ease), background var(--shell-duration-fast) var(--shell-ease), color var(--shell-duration-fast) var(--shell-ease);
}
.shell-slide-dragging > .shell-slide-action { transition: background var(--shell-duration-fast) var(--shell-ease), color var(--shell-duration-fast) var(--shell-ease); }
.shell-slide-action[data-side="left"] { left: 0; }
.shell-slide-action[data-side="right"] { right: 0; justify-content: flex-end; }
.shell-slide-action[data-primary="true"],
.shell-sliding-row[data-slide-ready="true"] .shell-slide-action {
  background: var(--shell-accent);
  color: var(--shell-on-accent);
  border-color: var(--shell-accent);
}
.shell-sliding-row[data-slide-open="true"] > .shell-slide-action { visibility: visible; }
.shell-slide-action-copy {
  width: 80px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: var(--shell-text-caption);
  line-height: var(--shell-leading-tight);
  opacity: var(--shell-slide-copy-opacity, 0);
}
.shell-slide-action .shell-icon { width: 24px; height: 24px; }
.shell-sliding-row[data-slide-ready="true"] .shell-slide-action-copy {
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .shell-sliding-row > :not(.shell-slide-action), .shell-slide-action { transition: none; }
}
.shell-task-title {
  font-size: var(--shell-text-control);
  display: block;
}
.shell-task-notes {
  font-size: var(--shell-text-small);
  color: var(--shell-muted);
  margin: var(--shell-space-2) 0 var(--shell-space-6);
  display: block;
  white-space: pre-wrap;
}
.shell-task .shell-meta {
  margin-top: var(--shell-space-4);
  display: flex;
  gap: var(--shell-space-6);
  flex-wrap: wrap;
}
.shell-task-group {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  color: var(--shell-muted);
  border: 0;
  background: transparent;
  padding: var(--shell-space-12) 0 var(--shell-space-2);
  font-weight: var(--shell-weight-strong);
  font-size: var(--shell-text-label);
  text-align: left;
}
.shell-task-group:first-child {
  padding-top: 0;
}
.shell-card {
  display: flex;
  gap: var(--shell-space-8);
  padding: var(--shell-space-10) 0;
  border: 0;
  border-bottom: 1px solid var(--shell-line);
  background: transparent;
  width: 100%;
  text-align: left;
  color: inherit;
  align-items: flex-start;
}
.shell-card .shell-row-copy > .shell-label { font-weight: var(--shell-weight-strong); }
.shell-card-image {
  width: 64px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--shell-radius-small);
  border: 1px solid var(--shell-border);
  background: var(--shell-surface);
  flex: none;
}
.shell-artwork {
  display: block;
  max-width: min(100%, 300px);
  height: auto;
  margin: 0 auto var(--shell-space-12);
  border-radius: var(--shell-radius-control);
  border: 1px solid var(--shell-border);
}
.shell-filters {
  display: flex;
  gap: var(--shell-space-4);
  overflow: auto;
  scrollbar-width: none;
  margin: 0 -4px var(--shell-space-8);
  padding: var(--shell-space-2);
}
.shell-filters .shell-button {
  width: auto;
  flex: none;
  min-height: 44px;
  padding: var(--shell-space-4) var(--shell-space-6);
  font-size: var(--shell-text-small);
  border-radius: var(--shell-radius-pill);
}
.shell-filter-menu {
  padding: var(--shell-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--shell-space-2);
}
.shell-filter-menu .shell-button {
  justify-content: flex-start;
}
.shell-article {
  font-size: var(--shell-text-body);
  line-height: var(--shell-leading-reading);
}
.shell-article img,
.shell-article video {
  max-width: 100%;
  height: auto;
  border-radius: var(--shell-radius-media);
}
.shell-article pre {
  white-space: pre-wrap;
}
.shell-article blockquote {
  border-left: 2px solid var(--shell-accent);
  margin-left: 0;
  padding-left: var(--shell-space-8);
  color: var(--shell-muted);
}
.shell-spinner {
  animation: shell-spin var(--shell-duration-spin) linear infinite;
}
@keyframes shell-spin {
  to {
    transform: rotate(360deg);
  }
}
.shell-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (min-width: 960px) {
  .shell-app[data-split="true"] {
    grid-template-columns: minmax(320px, 1fr) minmax(420px, 1fr);
  }
  .shell-app[data-split="true"] > .shell-pane[data-column="2"] {
    border-left: 1px solid var(--shell-border);
  }
  .shell-content {
    padding-inline: var(--shell-space-16);
  }
  .shell-dialog {
    inset: 50% auto auto 50%;
    margin: 0;
    transform: translate(-50%, -50%);
    border-bottom: 1px solid var(--shell-border-panel);
    border-radius: var(--shell-radius-sheet);
    max-height: 80dvh;
  }
  .shell-dialog-content {
    max-height: calc(80dvh - 90px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-shell="dom"] *,
  html[data-shell="dom"] *::before {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .shell-segments::before {
    border: 1px solid Highlight;
  }
  .shell-icon {
    background: ButtonText;
  }
  .shell-button,
  .shell-row,
  .shell-dialog {
    border-color: ButtonText;
  }
}

.shell-task .shell-meta > span {
  display: inline-flex;
  align-items: center;
  gap: var(--shell-space-3);
}
.shell-task .shell-meta .shell-icon {
  width: 16px;
  height: 16px;
}
.shell-task-group.shell-error {
  color: var(--shell-danger);
}

.shell-theme-preview {
  padding: var(--shell-space-8);
  border: 1px solid var(--color-border-subtle, #8e8e93);
  border-radius: var(--shell-radius-control);
  color: var(--shell-ink);
  background: var(--shell-bg);
  font-size: var(--shell-text-caption);
}
.shell-theme-preview p {
  margin: 0;
}
.shell-preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--shell-warning);
  font-size: var(--shell-text-small);
  margin-bottom: var(--shell-space-8);
}
.shell-preview-heading .shell-icon {
  color: var(--shell-muted);
  width: 16px;
  height: 16px;
}
.shell-preview-task,
.shell-preview-selected {
  display: flex;
  gap: var(--shell-space-5);
  align-items: flex-start;
}
.shell-preview-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  height: 22px;
  border: 1px solid var(--shell-muted);
  border-radius: 50%;
  background: var(--shell-bg);
}
.shell-preview-details {
  flex: 1;
  min-width: 0;
  padding-bottom: var(--shell-space-8);
  border-bottom: 1px solid var(--shell-line);
}
.shell-preview-title {
  font-size: var(--shell-text-body);
}
.shell-theme-preview .shell-preview-meta {
  color: var(--shell-muted);
  margin-top: var(--shell-space-4);
}
.shell-preview-link {
  color: var(--shell-accent);
}
.shell-preview-selected {
  margin: var(--shell-space-6) -6px var(--shell-space-10);
  padding: var(--shell-space-6) var(--shell-space-4);
  align-items: center;
  background: var(--shell-selected);
  border: 1px solid var(--shell-accent);
  border-radius: var(--shell-radius-small);
}
.shell-preview-selected .shell-preview-check {
  background: var(--shell-muted);
  color: var(--shell-on-accent);
}
.shell-preview-check .shell-icon {
  width: 16px;
  height: 16px;
}
.shell-preview-field {
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-small);
  padding: var(--shell-space-5) var(--shell-space-6);
  background: var(--shell-surface);
  color: var(--shell-muted);
}
.shell-preview-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--shell-space-4);
  margin: var(--shell-space-6) 0;
}
.shell-preview-success {
  color: var(--color-success);
}
.shell-preview-warning {
  color: var(--shell-warning);
}
.shell-preview-error {
  color: var(--shell-danger);
}
.shell-preview-actions {
  display: flex;
  align-items: center;
  gap: var(--shell-space-5);
}
.shell-preview-action,
.shell-preview-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--shell-space-4) var(--shell-space-6);
  min-height: 38px;
  border: 1px solid var(--shell-line);
  border-radius: var(--shell-radius);
  background: var(--shell-surface);
  color: var(--shell-accent);
}
.shell-preview-action:has(.shell-icon) {
  padding: var(--shell-space-4);
}
.shell-preview-save {
  margin-left: auto;
  background: var(--color-accent-background);
  color: var(--shell-on-accent);
  border-color: transparent;
}
.shell-color-tile {
  flex: 1;
  min-width: 0;
}
.shell-color-swatch {
  height: 48px;
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-media);
}
.shell-color-tile p {
  margin: var(--shell-space-2) 0;
}
.shell-task,
.shell-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 140px;
}

.shell-pane,
.shell-dialog,
.shell-theme-preview {
  --shell-bg: var(--color-background-canvas, #000000);
  --shell-surface: var(--color-background-surface, #242426);
  --shell-raised: var(--color-background-raised, #363638);
  --shell-ink: var(--color-foreground-primary, #ffffff);
  --shell-muted: var(--color-foreground-secondary, #c7c7cc);
  --shell-accent: var(--color-accent, #50a8ff);
  --shell-border: var(--color-border-strong, #c7c7cc);
  --shell-line: #3c3c3f;
  --shell-control: #202021;
  --shell-control-selected: #0a0a0a;
  --shell-switch-off: #919197;
  --shell-switch-on: #3bd759;
  --shell-selected: var(--color-selection-background, #193b5b);
  --shell-danger: var(--color-error, #ff766f);
  --shell-warning: var(--color-warning, #ffb340);
  --shell-on-accent: var(--color-on-accent, var(--shell-bg));
}

.shell-task-body,
.shell-card {
  touch-action: pan-y;
  transition: transform var(--shell-duration-feedback) var(--shell-ease);
}

.shell-row-shell {
  display: flex;
  align-items: center;
  border: 1px solid var(--shell-line);
  border-radius: var(--shell-radius-control);
  background: var(--shell-surface);
  overflow: hidden;
}
.shell-row-shell > .shell-row {
  border: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}
.shell-row-shell > .shell-row-shell-action {
  width: auto;
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin-right: var(--shell-space-4);
  padding: var(--shell-space-5);
}
.shell-row-shell + .shell-row-shell {
  margin-top: var(--shell-space-4);
}
.shell-task-title {
  font: inherit;
  font-size: var(--shell-text-control);
  line-height: var(--shell-leading-copy);
  color: var(--shell-ink);
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  min-height: 44px;
}
.shell-task-notes p {
  margin: 0 0 var(--shell-space-4);
}
.shell-task-notes :is(ul, ol) {
  padding-left: var(--shell-space-12);
  margin: var(--shell-space-4) 0;
}
.shell-task-notes mark {
  color: var(--shell-bg);
  background: var(--shell-accent);
}
.shell-note-check {
  list-style: none;
  position: relative;
}
.shell-note-check > input {
  position: absolute;
  left: -30px;
  top: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--shell-accent);
}

.shell-scroll {
  touch-action: pan-y;
}

/* Compact floating chrome follows the native Photos toolbar proportions. */
.shell-pane[data-chrome="compact"] {
  --shell-safe-right: env(safe-area-inset-right, 0px);
  --shell-safe-bottom: env(safe-area-inset-bottom, 0px);
  --shell-chrome-inset: min(var(--shell-chrome-edge), var(--shell-chrome-limit, 100vw));
  --shell-chrome-edge: calc(15px + max(var(--shell-safe-right), var(--shell-safe-bottom)) + var(--shell-chrome-adjustment, 0px));
}
.shell-pane[data-chrome="compact"] .shell-dock {
  bottom: var(--shell-chrome-edge, 15px);
  padding: 0 3px;
  gap: 6px;
  height: 48px;
  max-width: none;
  border: 0;
  border-radius: var(--shell-radius-pill);
  box-shadow: inset 0 0 0 1px var(--shell-border), var(--shell-highlight), var(--shell-shadow-floating);
}
.shell-pane[data-chrome="compact"] .shell-dock .shell-button {
  width: 48px;
  height: 48px;
  min-height: 48px;
  flex: none;
}
.shell-pane[data-chrome="compact"] .shell-corner {
  bottom: var(--shell-chrome-edge, 15px);
}
.shell-pane[data-chrome="compact"] .shell-corner[data-side="left"] {
  left: calc(env(safe-area-inset-left, 0px) + var(--shell-chrome-inset, 15px));
}
.shell-pane[data-chrome="compact"] .shell-corner[data-side="right"] {
  right: calc(
    env(safe-area-inset-right, 0px) + var(--shell-chrome-inset, 15px)
  );
}
.shell-pane[data-chrome="compact"] .shell-corner .shell-button {
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-width: 1px;
}
.shell-pane[data-chrome="compact"] :is(.shell-dock, .shell-corner) .shell-icon {
  width: 24px;
  height: 24px;
}
/* The checkbox follows the first title line, including wrapped titles. */
.shell-task {
  gap: 0;
}
html[data-shell="dom"] .shell-task-title {
  font-size: var(--shell-text-control);
  line-height: var(--shell-leading-copy);
  display: flex;
  align-items: flex-start;
}
.shell-task-check {
  margin-top: -10px;
}
.shell-task-check:before {
  inset: auto;
  top: 9px;
  left: 2px;
  width: 26px;
  height: 26px;
}
.shell-task-check .shell-icon {
  position: absolute;
  left: 6px;
  top: 13px;
  width: 18px;
  height: 18px;
}
.shell-task-group .shell-group-chevron {
  margin-left: auto;
  width: 18px;
  height: 18px;
  transition: transform var(--shell-duration-feedback) var(--shell-ease);
}
.shell-task-group[aria-expanded="true"] .shell-group-chevron {
  transform: rotate(90deg);
}
.shell-task-properties {
  gap: 0 !important;
}
.shell-task-properties .shell-property {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.shell-task-properties .shell-property + .shell-property:before {
  content: "·";
  margin: 0 2px 0 8px;
  color: var(--shell-muted);
}
.shell-task-properties .shell-property .shell-icon {
  width: 14px;
  height: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .shell-task-group .shell-group-chevron {
    transition: none;
  }
}

/* Separators divide tasks; the final visible task has no trailing rule. */
.shell-task:not(:has(~ .shell-task)) {
  border-bottom: 0;
}
/* A leading note list must not collapse its margin into the title/notes gap. */
.shell-task-notes > :first-child {
  margin-top: 0;
}
/* Balance compact title/notes spacing with the 44px surrounding row target. */
html[data-shell="dom"] .shell-task-title {
  min-height: 34px;
}
.shell-task-body {
  min-height: 44px;
}
.shell-task-notes {
  margin-top: 3px;
}

/* Plot pages use the entire pane; their host owns rail and safe-area geometry. */
html[data-shell="dom"] .shell-pane[data-full-bleed] .shell-content{max-width:none;width:100%;padding:0;margin:0}
html[data-shell="dom"] .shell-pane[data-full-bleed] .shell-scroll{padding:0}

/* Extremely narrow panes keep the full-size menu above the corner controls. */
.shell-pane[data-chrome="compact"] .shell-dock[data-raised] {
  bottom: calc(var(--shell-chrome-edge, 15px) + 60px);
}

/* Feedback wraps inside narrow panes while its dismissal target stays reachable. */
.shell-toast > span, .shell-feedback-row > span { min-width: 0; overflow-wrap: anywhere; }
.shell-toast .shell-icon-button { flex-shrink: 0; width: 44px; min-height: 44px; padding: 10px; }
a.shell-button[aria-disabled="true"] { color: var(--shell-muted); background: var(--shell-raised); border-color: var(--shell-line); cursor: default; }

.shell-toast-stack { flex-direction: column; align-items: stretch; }
.shell-feedback-row { display: flex; align-items: center; gap: 16px; min-width: 0; }
.shell-undo-row { color: var(--shell-ink); }

.shell-dialog .shell-field :is(input,textarea,select),
.shell-dialog .shell-row { background: var(--shell-raised); }
.shell-dialog .shell-button:not([data-primary="true"]):not([data-danger="true"]) { color: var(--shell-ink); }

/* Disabled controls retain their shape and readable labels in high contrast. */
:is(.shell-button, .shell-row):is(:disabled, [aria-disabled="true"]) {
  opacity: 1; color: var(--shell-muted); background: var(--shell-raised);
  border-color: var(--shell-line); box-shadow: none; transform: none;
}

/* Related form values share one surface. Native inputs retain their identity,
   selection, labels and field-level validation when a draft is redrawn. */
.shell-form-group { margin: 0 0 var(--shell-space-10); min-width: 0; container-type: inline-size; }
.shell-form-group-body { background: var(--shell-surface); border-radius: var(--shell-radius); }
.shell-dialog .shell-form-group-body { background: var(--shell-raised); }
.shell-form-group-body > .shell-field {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  column-gap: var(--shell-space-6); row-gap: var(--shell-space-2);
  align-items: center; margin: 0; padding: var(--shell-space-4) var(--shell-space-8);
}
.shell-form-group-body > :is(.shell-field,.shell-row) { position: relative; border-radius: 0; }
.shell-form-group-body > :first-child { border-top-left-radius: var(--shell-radius); border-top-right-radius: var(--shell-radius); }
.shell-form-group-body > :last-child { border-bottom-left-radius: var(--shell-radius); border-bottom-right-radius: var(--shell-radius); }
.shell-form-group-body > :not(:last-child)::after {
  content: ""; position: absolute; bottom: 0; left: 16px; right: 16px;
  height: 1px; background: var(--shell-line); pointer-events: none;
}
.shell-form-group-body > .shell-field > label { font-size: var(--shell-text-body); color: var(--shell-ink); overflow-wrap: anywhere; }
.shell-form-group-body > .shell-field :is(input,textarea,select) {
  min-width: 0; background: transparent; border-radius: var(--shell-radius-small);
  padding-inline: var(--shell-space-4); text-align: right; min-height: 44px;
}
.shell-form-group-body > .shell-field :is(input[type="date"],input[type="time"],input[type="datetime-local"]) {
  background: var(--shell-raised); border-radius: var(--shell-radius-pill); padding-inline: var(--shell-space-6);
}
.shell-dialog .shell-form-group-body > .shell-field :is(input[type="date"],input[type="time"],input[type="datetime-local"]):not(:disabled):not([readonly]) {
  background: var(--shell-surface-inset);
}
.shell-form-group-body > .shell-field[data-layout="stacked"] { grid-template-columns: minmax(0,1fr); padding-block: var(--shell-space-6); }
.shell-form-group-body > .shell-field[data-layout="stacked"] :is(input,textarea) { text-align: left; }
.shell-form-group-body > .shell-field :is(.shell-field-help,.shell-field-error) { grid-column: 1 / -1; padding-bottom: var(--shell-space-4); }
.shell-form-group-help { margin: var(--shell-space-4) var(--shell-space-8) 0; font-size: var(--shell-text-caption); color: var(--shell-muted); }
@container (max-width: 300px) {
  .shell-form-group-body > .shell-field { grid-template-columns: minmax(0,1fr); padding-block: var(--shell-space-6); }
  .shell-form-group-body > .shell-field :is(input,textarea,select) { text-align: left; }
}

.shell-form-group-body > .shell-row .shell-row-value { font-size: var(--shell-text-body); text-align: right; min-width: 0; overflow-wrap: anywhere; }

.shell-dialog[data-sheet-state="closed"]::backdrop { opacity: 0; transition: none; }
.shell-dialog[data-sheet-state="closing"]::backdrop { opacity: 0; transition-duration: var(--shell-duration-feedback); }
@media (prefers-reduced-motion: reduce) {
  .shell-dialog::backdrop { transition: none !important; }
}

/* Presentation communicates purpose; all variants keep native modality and
   the same busy, dismissal and keyboard contracts. */
.shell-dialog[data-presentation="menu"] {
  width: min(calc(100% - 24px), 420px); bottom: calc(12px + env(safe-area-inset-bottom));
  border-bottom: 1px solid var(--shell-border-panel); border-radius: var(--shell-radius-sheet);
}
.shell-dialog[data-presentation="menu"] .shell-dialog-header { padding: 12px 16px; }
.shell-dialog[data-presentation="menu"] .shell-dialog-content { padding: 8px; }
.shell-dialog[data-presentation="menu"] .shell-dialog-content > p { margin: 8px 12px 16px; color: var(--shell-muted); }
.shell-dialog[data-presentation="menu"] .shell-dialog-content > .shell-button {
  min-height: 48px; margin: 0; padding: 12px; border: 0; border-radius: 12px;
  background: transparent; box-shadow: none; text-align: left; justify-content: flex-start;
  transform: none;
}
.shell-dialog[data-presentation="menu"] .shell-button .shell-label { flex: 1; }
.shell-menu-check { width: 20px; flex: none; text-align: center; }
.shell-dialog[data-presentation="menu"] .shell-button:focus-visible { background: var(--shell-raised); outline-offset: -3px; }
.shell-dialog[data-presentation="menu"] .shell-button:is(:disabled,[aria-disabled="true"]) { color: var(--shell-muted); }
.shell-dialog[data-presentation="confirmation"] {
  inset: 50% auto auto 50%; transform: translate(-50%,-50%); margin: 0;
  width: min(calc(100% - 48px), 340px); max-height: 80dvh;
  border-bottom: 1px solid var(--shell-border-panel); border-radius: var(--shell-radius);
}
.shell-dialog[data-presentation="confirmation"] .shell-dialog-header { padding: 24px 20px 12px; border: 0; text-align: center; }
.shell-dialog[data-presentation="confirmation"] .shell-dialog-content { padding: 0 16px 16px; max-height: calc(80dvh - 100px); }
.shell-dialog[data-presentation="confirmation"] .shell-dialog-content > p { text-align: center; margin: 0 4px 20px; }
.shell-dialog[data-presentation="confirmation"] .shell-dialog-content > .shell-button { min-height: 48px; border-radius: 12px; }
.shell-dialog[data-presentation="confirmation"] [data-id="shell-sheet-cancel"] { font-weight: var(--shell-weight-strong); }
@media (min-width: 960px) {
  .shell-dialog[data-presentation="menu"] { inset: 50% auto auto 50%; }
}

.shell-dialog[data-presentation="menu"] .shell-button[data-primary="true"] { color: var(--shell-ink); }

.shell-dialog[data-presentation="confirmation"][open] { display: flex; flex-direction: column; }
.shell-dialog[data-presentation="confirmation"] .shell-dialog-header { flex-shrink: 0; max-height: 40dvh; overflow: auto; }
.shell-dialog[data-presentation="confirmation"] .shell-dialog-content { min-height: 0; }
.shell-dialog[data-presentation="menu"][open] { display: flex; flex-direction: column; }
.shell-dialog[data-presentation="menu"] .shell-dialog-header { flex-shrink: 0; max-height: 30dvh; overflow: auto; }
.shell-dialog[data-presentation="menu"] .shell-dialog-content { min-height: 0; }

/* Press is transient feedback, separate from selection. It never changes the
   size of a grouped row, segment or swipe strip, or overrides gesture motion. */
html[data-shell="dom"] [data-pressed="true"]:is(.shell-button,.shell-row,.shell-card,.shell-slide-action,.shell-task-title,.shell-task-check):not(:disabled):not([aria-disabled="true"]) {
  background-image: linear-gradient(var(--shell-press-tint), var(--shell-press-tint));
}
.shell-button[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) {
  scale: var(--shell-press-scale, .98);
  transition-duration: var(--shell-duration-press);
}
.shell-segments > .shell-button[data-pressed="true"],
.shell-dialog[data-presentation="menu"] .shell-button[data-pressed="true"] { --shell-press-scale: 1; }
.shell-switch[data-pressed="true"]:not(:disabled)::before { width: 29px; }
.shell-switch[data-pressed="true"]:checked:not(:disabled)::before { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) {
  .shell-button[data-pressed="true"] { --shell-press-scale: 1; }
  .shell-switch[data-pressed="true"]:not(:disabled)::before { width: 25px; }
  .shell-switch[data-pressed="true"]:checked:not(:disabled)::before { transform: translateX(20px); }
  .shell-switch[data-pressed="true"]:not(:disabled) { background-image: linear-gradient(var(--shell-press-tint), var(--shell-press-tint)); }
  .shell-sliding-row[data-slide-ready="true"] .shell-slide-action-copy { transform: none; }
}

/* Titles identify a surface; section labels and metadata support its content. */
.shell-dialog[data-presentation="menu"] .shell-title { font-size: var(--shell-text-body); }
.shell-dialog[data-presentation="confirmation"] .shell-title { font-size: var(--shell-text-heading); }
.shell-row-value { min-width: 0; max-width: 45%; overflow-wrap: anywhere; text-align: right; }
.shell-empty h2 { line-height: var(--shell-leading-tight); font-weight: var(--shell-weight-strong); margin: 0 0 var(--shell-space-6); }
.shell-empty p { font-size: var(--shell-text-secondary); line-height: var(--shell-leading-copy); margin: 0; }
@media (max-width: 340px) {
  .shell-row { column-gap: var(--shell-space-4); padding-inline: var(--shell-space-6); }
}

/* State stays readable without making inactive values look editable. Native
   readonly fields still allow selection/copy; disabled fields stay out of Tab. */
html[data-shell="dom"] .shell-field :is(input,textarea)[readonly]:not([aria-busy="true"]):not(:disabled) {
  background: transparent;
  border-color: var(--shell-line);
  cursor: text;
}
html[data-shell="dom"] .shell-field :is(input,textarea,select):disabled {
  color: var(--shell-muted);
  -webkit-text-fill-color: var(--shell-muted);
  opacity: 1;
  background: var(--shell-control);
  border-color: var(--shell-line);
  cursor: default;
}
html[data-shell="dom"] .shell-field :is(input,textarea)[readonly]:not(:disabled):focus-visible { border-color: var(--shell-accent); }
html[data-shell="dom"] .shell-field [aria-invalid="true"]:not(:disabled) { border-color: var(--shell-danger); }
html[data-shell="dom"] .shell-field [aria-invalid="true"]:not(:disabled):focus-visible {
  outline: 2px solid var(--shell-accent);
  outline-offset: 2px;
}
/* Selection remains identifiable when the selected choice is unavailable. */
.shell-button:is(:disabled,[aria-disabled="true"]):is([data-selected="true"],[aria-pressed="true"],[aria-checked="true"]) {
  background: var(--shell-control);
  color: var(--shell-muted);
  border-color: var(--shell-muted);
  box-shadow: inset 0 0 0 1px var(--shell-muted);
}
.shell-segments > .shell-button:is(:disabled,[aria-disabled="true"]) { background: transparent; border: 0; box-shadow: none; }
html[data-shell="dom"] :is(.shell-segments,.shell-filters,.shell-chips) > .shell-button:focus-visible { outline-offset: -3px; }
a.shell-row[aria-disabled="true"] { color: var(--shell-muted); background: var(--shell-raised); border-color: var(--shell-line); box-shadow: none; cursor: default; }

/* Surface hierarchy: groups stay flat; only detached chrome carries elevation.
   Opaque fills avoid variable text contrast and live blur on scrolling timelines. */
.shell-corner .shell-button:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: var(--shell-highlight), var(--shell-shadow-floating);
}
.shell-corner .shell-button:not(:disabled):not([aria-disabled="true"]):not([data-selected="true"]):not([aria-pressed="true"]):not([aria-checked="true"]) {
  background-color: var(--shell-surface-floating);
}
.shell-dialog[data-presentation="menu"],
.shell-dialog[data-presentation="confirmation"] {
  background: var(--shell-surface-floating);
}
@media (forced-colors: active) {
  .shell-dock, .shell-toast, .shell-notice, .shell-dialog { border-color: CanvasText; }
  .shell-dock, .shell-corner .shell-button, .shell-toast, .shell-dialog { box-shadow: none; }
  .shell-pane[data-chrome="compact"] .shell-dock { outline: 1px solid CanvasText; outline-offset: -1px; }
}

/* Reserve both labels without exposing duplicate text to assistive technology.
   Icons and activity marks share a slot, so a busy change cannot move the label. */
.shell-label-reserved { display: grid; }
.shell-label-reserved > span, .shell-label-reserved::before, .shell-label-reserved::after { grid-area: 1 / 1; }
.shell-label-reserved::before { content: attr(data-rest-label); visibility: hidden; }
.shell-label-reserved::after { content: attr(data-busy-label); visibility: hidden; }
.shell-activity {
  display: inline-block; width: 22px; height: 22px; flex: 0 0 22px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: shell-spin var(--shell-duration-spin) linear infinite;
}
.shell-activity[data-idle="true"] { visibility: hidden; animation: none; }
@media (prefers-reduced-motion: reduce) { .shell-activity { animation: none; } }
