/**
 * The preferences sheet.
 *
 * Deliberately the same object as the shortcut sheet — same backdrop, same card, same header, same
 * close button — because they are the same kind of thing: something summoned from the menu, read,
 * and dismissed. Two modal sheets in one application that look like two different applications is
 * the sort of drift nobody decides on.
 */
atomics-preferences {
  /*
   * The space's own tokens, resolved once, with a literal fallback behind each.
   *
   * This sheet was written against `--bg`, which nothing in the app defines — the space layout sets
   * `--background`. An undefined custom property does not fall back to something sensible: it voids
   * the whole declaration, so `background: var(--bg)` left the card with no background at all and
   * the panel read as see-through over the canvas. The same bug shipped in the vector popout and is
   * written up at length in its stylesheet; this is the same fix, for the same reason.
   *
   * It also took the switch with it. The knob in the on position was painted `var(--bg)` too, so it
   * was not drawn, and every switch on the panel looked like the same grey pill whichever way it
   * was set — which is exactly what a switch must never look like.
   */
  --pref-surface: var(--background, light-dark(#ffffff, #111111));
  --pref-ink: var(--text, light-dark(#0f0f0f, #f4f5f6));
  /*
   * design.css's accent, not `--accent`: the client overwrites `--accent` with a hex in a space, so
   * `hsla(var(--accent), 1)` was not a colour, voided both declarations that read it, and left an On
   * switch as a transparent track with a black rim — invisible in light mode. See SpaceUI's sheet.
   */
  --pref-on: var(--ds-accent, #2f6bff);

  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--pref-surface), transparent 25%);
  backdrop-filter: blur(6px);
}

atomics-preferences[open] {
  display: flex;
}

atomics-preferences [sheet] {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 64px));
  overflow-y: auto;
  /*
   * The sheet's scrolling stops at the sheet.
   *
   * Without this, reaching the end of a scroll inside the panel hands the rest of the gesture to
   * the page behind it — and on this canvas the page *is* the camera, so reading to the bottom of
   * the preferences quietly flew you across the space you were looking at.
   */
  overscroll-behavior: contain;
  padding: 20px 24px 24px;
  border-radius: 16px;
  background: var(--pref-surface);
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 88%);
  box-shadow: 0 24px 64px color-mix(in srgb, black, transparent 78%);
  color: var(--pref-ink);
}

atomics-preferences header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

atomics-preferences h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}

atomics-preferences [close] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.6;
}

atomics-preferences [close]:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--pref-ink), transparent 92%);
}

atomics-preferences [close] svg {
  width: 16px;
  height: 16px;
}

atomics-preferences [note] {
  margin: 0 0 4px;
  font-size: 12px;
  opacity: 0.55;
  line-height: 1.5;
}

atomics-preferences [group] {
  padding: 12px 0 4px;
  border-top: 1px solid color-mix(in srgb, var(--pref-ink), transparent 92%);
}

atomics-preferences [group] h3 {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.5;
  margin: 0 0 6px;
}

atomics-preferences [row] {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  font-size: 13px;
}

/* The whole row is the target for the switch beside it, so aiming at a 20px control is optional. */
atomics-preferences label[row] {
  cursor: pointer;
}

/* A row that goes somewhere: the whole row is the link, and it says where. */
atomics-preferences a[row] {
  align-items: center;
  color: inherit;
  text-decoration: none;
}

atomics-preferences a[row] [go] {
  flex: none;
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
}

atomics-preferences a[row] [go]::after {
  content: ' →';
}

atomics-preferences a[row]:hover [go] {
  opacity: 1;
}

atomics-preferences [all-settings] {
  display: block;
  padding: 14px 0 4px;
  border-top: 1px solid color-mix(in srgb, var(--pref-ink), transparent 92%);
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.8;
}

atomics-preferences [all-settings]::after {
  content: ' →';
}

atomics-preferences [all-settings]:hover {
  opacity: 1;
}

atomics-preferences [row][hidden] {
  display: none;
}

atomics-preferences [copy] {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

atomics-preferences [label] {
  opacity: 0.9;
}

atomics-preferences [hint] {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.5;
  text-wrap: pretty;
}

/* ── The switch ─────────────────────────────────────────────────── */

/*
  Off is a hollow track, on is a filled one, and the fill is the accent rather than a brighter grey.

  Both halves of this matter. A switch told apart only by the brightness of its pill reads as
  enabled-versus-disabled rather than as on-versus-off, and at this size the 16px the knob travels
  is not a difference anybody notices in passing — the thing the eye actually catches across a
  panel of eight rows is the colour, so the colour is what carries the state. The knob still moves,
  because a switch whose knob stays put is not a switch.
*/
atomics-preferences input[type='checkbox'][role='switch'] {
  appearance: none;
  flex: none;
  margin: 2px 0 0;
  width: 36px;
  height: 20px;
  border-radius: 100vmax;
  background: color-mix(in srgb, var(--pref-ink), transparent 92%);
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 72%);
  position: relative;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

/*
  The knob has to contrast with the track it is on, and the track changes colour with the state —
  so the knob changes with it. Left as one colour it was `var(--bg)` on a near-`var(--bg)` track in
  the off state, which is a switch with no knob at all.
*/
atomics-preferences input[type='checkbox'][role='switch']::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 100vmax;
  background: color-mix(in srgb, var(--pref-ink), transparent 40%);
  translate: 0 -50%;
  transition: translate 160ms ease, background 160ms ease;
}

atomics-preferences input[type='checkbox'][role='switch']:checked {
  background: var(--pref-on);
  border-color: var(--pref-on);
}

atomics-preferences input[type='checkbox'][role='switch']:checked::after {
  translate: 16px -50%;
  background: #ffffff;
}

atomics-preferences input[type='checkbox'][role='switch']:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pref-ink), transparent 50%);
  outline-offset: 2px;
}

/*
  A row this browser cannot honour.

  Dimmed and inert rather than removed, because a missing row answers nothing: somebody who has read
  that Atomics can float a space and finds no such setting concludes the app is broken or the copy is
  wrong. The row stays, the switch stops taking presses, and `[unsupported]` says which browsers do
  have it — see `FLOATING_WINDOW_ABSENT`. The cursor goes back to the default, because `label[row]`
  above makes the whole row look pressable.
*/
atomics-preferences label[row]:has(input:disabled) {
  cursor: default;
  opacity: 0.55;
}

atomics-preferences input[type='checkbox'][role='switch']:disabled {
  pointer-events: none;
}

/* Brighter than an ordinary hint: it is the reason the row is dim, not more small print about it. */
atomics-preferences [hint][unsupported] {
  opacity: 0.85;
}

/* ── Segmented choice ───────────────────────────────────────────── */

atomics-preferences [choice] {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pref-ink), transparent 94%);
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 90%);
}

atomics-preferences [choice] button {
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  opacity: 0.6;
  cursor: pointer;
}

atomics-preferences [choice] button:hover {
  opacity: 0.9;
}

atomics-preferences [choice] button[selected] {
  opacity: 1;
  background: var(--pref-surface);
  box-shadow: 0 1px 2px color-mix(in srgb, black, transparent 88%);
}

/*
  What the mixer is doing, under the settings it belongs to.

  Reserved rather than shown-and-hidden: the line changes as things start and stop playing, and a
  row that appears and disappears would move every control below it while somebody is reading them.
*/
atomics-preferences [status] {
  margin: 4px 0 0;
  min-height: 1.4em;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  atomics-preferences input[type='checkbox'][role='switch'],
  atomics-preferences input[type='checkbox'][role='switch']::after {
    transition: none;
  }
}

/* ── The measurement box ────────────────────────────────────────── */

/*
  The one box in this panel that is not about this device.

  Everything else here is a device preference, which the note at the top says plainly — so the
  rows that belong to the *space* have to be visibly not that, or the panel quietly starts lying
  about itself. An inset panel with its own line of explanation is the same device the rest of the
  app uses for "this is a different kind of thing", and it costs a reader nothing to skip.
*/
atomics-preferences [shared-note] {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.5;
  text-wrap: pretty;
}

atomics-preferences [box][shared] {
  padding: 2px 12px 8px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 90%);
  background: color-mix(in srgb, var(--pref-ink), transparent 96%);
}

/*
  A space the panel cannot speak for.

  The panel mounts inside a space view, so this is the narrow case of one that never loaded. Hidden
  rather than disabled: a box of dead controls invites somebody to work out what they did wrong,
  and there is nothing they did.
*/
atomics-preferences [box][shared][unavailable] {
  display: none;
}

/* The number and the unit it is in, as one field, so the symbol reads as part of the number. */
atomics-preferences [field] {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

atomics-preferences [field] input[type='number'] {
  width: 5.5rem;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 85%);
  background: var(--pref-surface);
  color: inherit;
  font: inherit;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

atomics-preferences [field] input[type='number']:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pref-ink), transparent 50%);
  outline-offset: 1px;
}

/*
  Off, rather than greyed out.

  A spacing, a reach and a scale bar all mean nothing until the space has a unit, so dead controls
  under an Off switch are only things to wonder about. Every row below the unit goes, and the
  sentence underneath — which stays — is what says why. The figures are not cleared: they are read
  back from the unit's preset, so turning it on shows what it would start at.
*/
atomics-preferences [box][shared][off] label[row] {
  display: none;
}

atomics-preferences [field] [suffix] {
  opacity: 0.5;
  min-width: 3.2em;
}

/*
  What the grid is worth, in a sentence, under the controls that set it.

  Reserved the same way the mixer's line is, and for the same reason: it changes on every edit, and
  a line that appears and disappears would move the rows above it while somebody is reading them.
*/
atomics-preferences [measure-status] {
  margin: 6px 0 0;
  min-height: 2.8em;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.55;
  text-wrap: pretty;
}

/* ── The window controls, and the bar that shows them ───────────── */

/*
  `NEW`, on the one row that is new.

  Worth a badge rather than a note because this is the one preference here that does not start as
  "what the app used to do": the controls have always been on the right, and Automatic now puts them
  on the left on a Mac. Somebody opening this panel to find out why their windows look different
  should find the row that explains it first.
*/
atomics-preferences [label] [new] {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent), transparent 88%);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  vertical-align: 1px;
}

/*
  A card at the chosen setting, on a scrap of canvas.

  There is no logic behind this: `useSpaceLogic/controls` writes `[win-side]` and `[win-place]` onto
  the space's view and this panel is mounted inside it, so the rules below place the three marks the
  way `EntityDisplay/style` places a real card's. A panel opened somewhere there is no canvas — a
  test harness — shows the default, above the top-right corner.

  The marks are always shown here, since the preview is the one card nobody can hover.
*/
atomics-preferences [preview] {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 90%);
  background: color-mix(in srgb, var(--pref-ink), transparent 97%);
}

atomics-preferences [preview] [preview-label] {
  font-size: 12px;
  opacity: 0.5;
}

atomics-preferences [preview] [preview-stage] {
  flex: 1 1 auto;
  min-width: 0;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background-image: radial-gradient(color-mix(in srgb, var(--pref-ink), transparent 82%) 1px, transparent 1.2px);
  background-size: 12px 12px;
}

atomics-preferences [preview] [preview-card] {
  position: relative;
  width: 140px;
  height: 46px;
  flex: none;
  border-radius: 9px;
  background: var(--pref-surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pref-ink), transparent 90%), 0 6px 16px -10px rgba(0, 0, 0, 0.35);
}

atomics-preferences [preview] [preview-bar] {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--pref-ink), transparent 92%);
}

atomics-preferences [preview] [preview-mark] {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent), transparent 55%);
}

atomics-preferences [preview] [preview-name] {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The marks: bare symbols beside the card, as on the canvas. Corner and right by default. */
atomics-preferences [preview] [preview-options] {
  position: absolute;
  bottom: calc(100% + 5px);
  right: 6px;
  display: flex;
  align-items: center;
  gap: 1px;
}

atomics-preferences [preview] [sample] {
  width: 17px;
  height: 17px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--pref-ink), transparent 40%);
}

atomics-preferences [preview] [sample] svg {
  width: 13px;
  height: 13px;
}

[win-place='corner'][win-side='left'] atomics-preferences [preview] [preview-options] {
  right: auto;
  left: 6px;
  flex-direction: row-reverse;
}

[win-place='rail'] atomics-preferences [preview] [preview-options] {
  bottom: auto;
  top: 0;
  right: auto;
  left: calc(100% + 5px);
  flex-direction: column-reverse;
}

[win-place='rail'][win-side='left'] atomics-preferences [preview] [preview-options] {
  left: auto;
  right: calc(100% + 5px);
}

[win-place='caption'] atomics-preferences [preview] [preview-options] {
  bottom: auto;
  top: calc(100% + 4px);
  right: 0;
}

[win-place='caption'][win-side='left'] atomics-preferences [preview] [preview-options] {
  right: auto;
  left: 0;
  flex-direction: row-reverse;
}

/*
  The one button in the panel. Drawn like a selected step of a segmented row, so it reads as part
  of the same set of controls rather than a call to action shouting over them.
*/
atomics-preferences [push-toggle] {
  flex: none;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 85%);
  background: var(--pref-surface);
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

atomics-preferences [push-toggle]:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--pref-ink), transparent 70%);
}

atomics-preferences [push-toggle]:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Disabled while it works, but not faded: the spinner is the thing to look at. */
atomics-preferences [push-toggle][working='true'] {
  opacity: 1;
  min-height: 28px;
}

/* ── Personal / This space ──────────────────────────────────────── */

/* One tab's sections at a time. `[tab]` on the sheet is set by logic.ts, Personal by default. */
atomics-preferences [sheet]:not([tab='space']) [tab='space'],
atomics-preferences [sheet][tab='space'] [tab='personal'] {
  display: none;
}

atomics-preferences [scopes] {
  display: flex;
  gap: 2px;
  padding: 2px;
  margin: 0 0 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pref-ink), transparent 94%);
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 90%);
}

atomics-preferences [scopes] button {
  flex: 1 1 0;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.6;
  cursor: pointer;
}

atomics-preferences [scopes] button[aria-selected='true'] {
  opacity: 1;
  background: var(--pref-surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ds-shade), transparent 88%);
}

/* The personal theme's presets: a row of small boards, each drawn in its own colours. */
atomics-preferences [look] [themes] {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 10px;
}

atomics-preferences [look] [themes] button {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  border: none;
  border-radius: 10px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pref-ink), transparent 88%);
}

atomics-preferences [look] [themes] button[aria-pressed='true'] {
  box-shadow: inset 0 0 0 2px var(--ds-accent);
}

atomics-preferences [look] [themes] [swatch] {
  display: block;
  height: 30px;
  border-radius: 7px;
  position: relative;
}

atomics-preferences [look] [themes] [swatch] i {
  position: absolute;
  left: 7px;
  top: 8px;
  width: 45%;
  height: 14px;
  border-radius: 4px;
}

atomics-preferences [look] [themes] [swatch] b {
  position: absolute;
  right: 7px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

atomics-preferences [space-look] [actions] {
  display: flex;
  gap: 6px;
}

atomics-preferences [space-look] [actions] button,
atomics-preferences [look] [guest] {
  font-size: 12px;
}

atomics-preferences [space-look] [actions] button {
  padding: 6px 12px;
  border: none;
  border-radius: 9px;
  background: color-mix(in srgb, var(--pref-ink), transparent 92%);
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

atomics-preferences [look] [guest] {
  margin: 6px 0 0;
  opacity: 0.6;
}

atomics-preferences [look] [morethemes] {
  align-self: flex-start;
  padding: 5px 10px;
  border: none;
  border-radius: 8px;
  background: color-mix(in srgb, var(--pref-ink), transparent 92%);
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Staged rooms (space themes, step 7), under the space's own theme. */
atomics-preferences [space-look] [stages-heading] {
  margin: 14px 0 4px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
}

atomics-preferences [space-look] [stages-empty] {
  margin: 0;
  font-size: 12px;
  opacity: 0.6;
}

/* ── Search by meaning ──────────────────────────────────────────── */

atomics-preferences [group][hidden],
atomics-preferences [search-refused][hidden] {
  display: none;
}

/* A mode's size sits after its name, quieter than it. */
atomics-preferences [search-switches] [size] {
  margin-left: 6px;
  font-weight: 400;
  opacity: 0.55;
}

atomics-preferences [search-switches] [control] {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

/* The only sign a part is still coming down: a thin ring that fills with it. */
atomics-preferences [search-switches] [ring] {
  width: 14px;
  height: 14px;
  border-radius: 100vmax;
  background: conic-gradient(
    var(--pref-on) calc(var(--progress, 0) * 1turn),
    color-mix(in srgb, var(--pref-ink), transparent 85%) 0
  );
  mask: radial-gradient(circle, transparent 4.5px, #000 5px);
}

atomics-preferences [search-refused] {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--pref-danger, #c2410c);
}

atomics-preferences [search-total] {
  margin: 2px 0 6px;
}

atomics-preferences [search-remove],
atomics-preferences [search-confirm] [actions] button {
  flex: none;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 85%);
  background: var(--pref-surface);
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

atomics-preferences [search-remove]:disabled {
  opacity: 0.45;
  cursor: default;
}

atomics-preferences [search-confirm] [actions] {
  display: flex;
  flex: none;
  gap: 6px;
}

atomics-preferences [search-confirm] [actions] [danger] {
  border-color: transparent;
  background: var(--pref-danger, #c2410c);
  color: #ffffff;
  font-weight: 600;
}

/* The date of birth asked for the first time "Show sensitive content" is turned on. */
atomics-preferences [sensitive-birth] [actions] {
  display: flex;
  flex: none;
  gap: 8px;
  align-items: center;
}

atomics-preferences [sensitive-birth] input[birth] {
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 80%);
  background: var(--pref-surface);
  color: inherit;
  font: inherit;
  font-size: 12px;
}

atomics-preferences [birth-save] {
  flex: none;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--pref-ink), transparent 85%);
  background: var(--pref-surface);
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 480px) {
  atomics-preferences [sensitive-birth] {
    flex-wrap: wrap;
  }
}

/* ── On a page (`/settings`) ────────────────────────────────────── */

/*
  The same rows, drawn into a page rather than over a space: no backdrop and no close, the Personal
  tab only, each group a card that says where its settings live. The page's own tokens, since a hub
  page has no space layout to supply `--background`.
*/
atomics-preferences[page] {
  --pref-surface: var(--ds-panel, light-dark(#ffffff, #1c1c1e));
  --pref-ink: var(--ds-ink, light-dark(#1d1d1f, #f5f5f7));

  display: block;
  position: static;
  inset: auto;
  z-index: auto;
  background: none;
  backdrop-filter: none;
}

atomics-preferences[page] [sheet] {
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

atomics-preferences[page] :is(header, [scopes], [note], [all-settings]) {
  display: none;
}

atomics-preferences[page] [groups] {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

atomics-preferences[page] [group] {
  padding: 20px;
  border: 0;
  border-radius: var(--ds-r-card, 18px);
  background: var(--pref-surface);
  box-shadow: inset 0 0 0 1px var(--ds-line, rgba(0, 0, 0, 0.09));
  scroll-margin-top: 16px;
}

atomics-preferences[page] [group] h3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}

atomics-preferences[page] [group][where] h3::after {
  font-size: 12px;
  font-weight: 400;
  color: var(--ds-mute, #66666b);
}

atomics-preferences[page] [group][where='account'] h3::after {
  content: 'Follows your account';
}

atomics-preferences[page] [group][where='device'] h3::after {
  content: 'On this device';
}

atomics-preferences[page] [row] {
  font-size: 14px;
}

atomics-preferences[page] [row] + [row] {
  border-top: 1px solid var(--ds-line, rgba(0, 0, 0, 0.09));
}

atomics-preferences[page] [label] {
  font-weight: 600;
  opacity: 1;
}

atomics-preferences[page] a[row] [go] {
  font-size: 14px;
  color: var(--ds-accent-ink, #2456d6);
  opacity: 1;
}

atomics-preferences[page] [hint] {
  font-size: 13px;
  color: var(--ds-mute, #66666b);
  opacity: 1;
}

@media (max-width: 720px) {
  atomics-preferences[page] [group] {
    padding: 16px;
  }

  /* The theme boards take the card's whole width under their label, or five squeeze to nothing. */
  atomics-preferences[page] [row][column] {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}
