/* Dreams shell – the frame every service shares: side panel, top bar, account menu, sign-in card and
   the guest gate. Source: packages/shell/static, apps get a copy through `pnpm shell:sync`.
   Needs tokens.css before it; every class starts with sh- so app styles never collide with it. */

:root {
  --sh-side-w: 308px;
  --sh-side-narrow: 64px;
  --sh-top-h: 56px;
  --sh-on-accent: #ffffff;
}

[class^="sh-"],
[class*=" sh-"],
[class^="sh-"] *,
[class*=" sh-"] * {
  box-sizing: border-box;
}

/* A link that looks like a button never gets the underline of a text link, whatever the app says */
:is(.sh-btn, .sh-brand, .sh-nav-item, .sh-menu-item, .sh-tab, .sh-user):is(
  :link,
  :visited,
  :hover,
  :focus,
  :active
) {
  text-decoration: none;
}

.sh-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sh-i {
  width: 1em;
  height: 1em;
  flex: none;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sh-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons of the frame */
.sh-icon-btn {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--r-1, 8px);
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.sh-icon-btn:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-icon-btn:focus-visible,
.sh-btn:focus-visible,
.sh-nav-item:focus-visible,
.sh-user:focus-visible,
.sh-menu-item:focus-visible,
.sh-brand:focus-visible {
  outline: 2px solid var(--chip-on-ring);
  outline-offset: 1px;
}
.sh-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r-2, 10px);
  font: inherit;
  font-size: var(--fs-md, 13px);
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.sh-btn .sh-i {
  font-size: 16px;
}
.sh-btn-primary {
  background: var(--g-primary);
  color: var(--on-brand, var(--sh-on-accent));
}
.sh-btn-primary:hover {
  color: var(--on-brand, var(--sh-on-accent));
  filter: brightness(1.06);
}
.sh-btn-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}
.sh-btn-quiet:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-btn-wide {
  width: 100%;
  min-height: 44px;
  font-size: var(--fs-base, 14px);
}

/* Theme picker: a swatch is the surface of the theme as a ring around its accent */
.sh-swatch {
  --sh-sw-ring: var(--sh-swatch-light);
  --sh-sw-disk: var(--sh-swatch-dreams);
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
  padding: 3px;
  border-radius: 50%;
  background: var(--sh-sw-ring);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.sh-swatch::before {
  content: "";
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background: var(--sh-sw-disk);
}
.sh-swatch-now {
  --sh-sw-ring: var(--card);
  --sh-sw-disk: var(--g-brand);
}
.sh-swatch-colors-auto,
.sh-swatch-dreams-auto {
  --sh-sw-ring: linear-gradient(135deg, var(--sh-swatch-light) 50%, var(--sh-swatch-dark) 50%);
}
.sh-swatch-dreams-dark,
.sh-swatch-colors-dark {
  --sh-sw-ring: var(--sh-swatch-dark);
}
.sh-swatch-colors-auto,
.sh-swatch-colors-light,
.sh-swatch-colors-dark {
  --sh-sw-disk: var(--sh-swatch-colors);
}
.sh-swatch-mono {
  --sh-sw-ring: var(--sh-swatch-grey);
  --sh-sw-disk: var(--sh-swatch-mono);
}
.sh-menu.sh-theme-menu {
  width: 232px;
}
.sh-theme-menu .sh-theme-on {
  margin-left: auto;
  visibility: hidden;
}
.sh-theme-menu [aria-checked="true"] {
  background: var(--badge-bg);
}
.sh-theme-menu [aria-checked="true"] .sh-theme-on {
  visibility: visible;
  color: var(--badge-ink);
}

/* Brand: the Dreams mark and the name of the service */
.sh-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border-radius: var(--r-1, 8px);
  color: var(--ink);
  text-decoration: none;
}
.sh-brand:hover {
  color: var(--ink);
}
.sh-mark {
  width: 28px;
  height: 28px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: var(--sh-mark-g, var(--g-brand));
  color: var(--on-brand, var(--sh-on-accent));
}
.sh-mark .sh-i {
  font-size: 16px;
  fill: currentColor;
  stroke: none;
}
.sh-mark-glyph .sh-i {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}
.sh-mark-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}
.sh-mark-lg .sh-i {
  font-size: 30px;
}
.sh-brand-name {
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-lg, 16px);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-brand-ver {
  flex: none;
  margin-left: -4px;
  color: var(--ink-4);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sh-menu-ver {
  margin-left: auto;
  padding-left: 12px;
  color: var(--ink-4);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sh-brand-name span {
  color: var(--ink-3);
  font-weight: 700;
}

/* Frame */
.sh-app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sh-side-w) minmax(0, 1fr);
}
.sh-side {
  position: sticky;
  top: 0;
  z-index: var(--z-drawer, 40);
  height: 100dvh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--card);
}
.sh-side-head {
  min-height: var(--sh-top-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 12px;
}
.sh-side-head .sh-brand {
  flex: 1;
}
.sh-side-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sh-side-foot {
  display: grid;
  gap: 2px;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line);
}
.sh-side-foot:empty {
  display: none;
}
/* The edge that changes the panel width; shell.js keeps the width in the dreams_nav_w cookie */
.sh-side-grip {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  z-index: 1;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}
.sh-side-grip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: transparent;
  transition: background-color 0.15s;
}
.sh-side-grip:hover::after,
.sh-side-grip:focus-visible::after,
html.sh-resizing .sh-side-grip::after {
  background: var(--chip-on-ring);
}
.sh-side-grip:focus-visible {
  outline: none;
}
html.sh-resizing,
html.sh-resizing * {
  cursor: col-resize !important;
  user-select: none;
}
.sh-collapse .sh-expand-ico {
  display: none;
}

.sh-nav {
  display: grid;
  gap: 2px;
}
.sh-nav-item {
  position: relative;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-1, 8px);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-md, 13px);
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sh-nav-item:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-nav-item[aria-current="page"],
.sh-nav-item.sh-on {
  background: var(--badge-bg);
  color: var(--badge-ink);
}
.sh-nav-ico {
  width: 16px;
  flex: none;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  color: var(--ico-soft);
}
.sh-nav-ico svg {
  width: 1em;
  height: 1em;
}
.sh-nav-item[aria-current="page"] .sh-nav-ico,
.sh-nav-item.sh-on .sh-nav-ico {
  color: currentColor;
}
.sh-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-nav-count {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: var(--r-pill, 999px);
  background: var(--bad);
  color: var(--sh-on-accent);
  font-size: var(--fs-xs, 11px);
  font-weight: 800;
}
.sh-nav-count[hidden] {
  display: none;
}
.sh-nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 14px 10px 6px;
  color: var(--ink-4);
  font-size: var(--fs-cap, 10px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sh-nav-rule {
  height: 1px;
  flex: none;
  margin: 8px 4px;
  background: var(--line);
}

/* A person's face: the picture and the initials are both inside, html[data-faces] picks one */
.sh-face {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--sh-face, var(--face-grey));
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.sh-face-sm {
  width: 22px;
  height: 22px;
  font-size: 9px;
}
.sh-face-lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.sh-face-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.sh-face-glyph {
  width: 62%;
  height: 62%;
  pointer-events: none;
  user-select: none;
}
.sh-face-glyph + .sh-face-ini {
  display: none;
}
:root[data-faces="initials"] .sh-face:not(.sh-face-bot, .sh-face-as-emoji) .sh-face-glyph {
  display: none;
}
:root[data-faces="initials"]
  .sh-face:not(.sh-face-bot, .sh-face-as-emoji)
  .sh-face-glyph
  + .sh-face-ini {
  display: inline;
}
.sh-face-c-red {
  --sh-face: var(--face-red);
}
.sh-face-c-orange {
  --sh-face: var(--face-orange);
}
.sh-face-c-amber {
  --sh-face: var(--face-amber);
}
.sh-face-c-yellow {
  --sh-face: var(--face-yellow);
}
.sh-face-c-lime {
  --sh-face: var(--face-lime);
}
.sh-face-c-green {
  --sh-face: var(--face-green);
}
.sh-face-c-teal {
  --sh-face: var(--face-teal);
}
.sh-face-c-cyan {
  --sh-face: var(--face-cyan);
}
.sh-face-c-sky {
  --sh-face: var(--face-sky);
}
.sh-face-c-blue {
  --sh-face: var(--face-blue);
}
.sh-face-c-indigo {
  --sh-face: var(--face-indigo);
}
.sh-face-c-violet {
  --sh-face: var(--face-violet);
}
.sh-face-c-purple {
  --sh-face: var(--face-purple);
}
.sh-face-c-pink {
  --sh-face: var(--face-pink);
}
.sh-face-c-rose {
  --sh-face: var(--face-rose);
}
.sh-face-c-grey {
  --sh-face: var(--face-grey);
}

.sh-person .sh-face,
.sh-menu .sh-face,
.sh-account .sh-face {
  display: inline-grid;
  gap: 0;
}

/* The mark of a company service: its tile and glyph as on its tab icon, grey in Mono */
.sh-svc {
  --sh-svc-g: var(--svc-id-g);
  --sh-svc-ink: #ffffff;
  width: var(--sh-svc-size, 28px);
  height: var(--sh-svc-size, 28px);
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 25%;
  background: var(--sh-svc-g);
  color: var(--sh-svc-ink);
}
.sh-svc .sh-i {
  font-size: calc(var(--sh-svc-size, 28px) * 0.6);
  stroke-width: 2.4;
}
.sh-svc-id .sh-i {
  fill: currentColor;
  stroke: none;
}
.sh-svc-rustore .sh-i {
  font-size: var(--sh-svc-size, 28px);
}
.sh-svc-docs {
  --sh-svc-g: var(--svc-docs-g);
}
.sh-svc-tracker {
  --sh-svc-g: var(--svc-tracker-g);
}
.sh-svc-files {
  --sh-svc-g: var(--svc-files-g);
  --sh-svc-ink: var(--svc-files-ink);
}
.sh-svc-scrapers {
  --sh-svc-g: var(--svc-scrapers-g);
}
.sh-svc-dashboard {
  --sh-svc-g: var(--svc-dashboard-g);
}
.sh-svc-hr {
  --sh-svc-g: var(--svc-hr-g);
}
.sh-svc-mail {
  --sh-svc-g: var(--svc-mail-g);
}
.sh-svc-rustore {
  --sh-svc-g: var(--svc-rustore-g);
}
.sh-svc-bot {
  --sh-svc-g: var(--svc-bot-g);
}
:root[data-palette="mono"] .sh-svc {
  filter: grayscale(1);
}
.sh-menu-item > .sh-svc {
  --sh-svc-size: 20px;
}

/* The services of the account in the account menu: one item each, the list grows with the company */
.sh-apps {
  display: grid;
  gap: 2px;
}
.sh-apps:not(:has(.sh-app-link:not([hidden]))) {
  display: none;
}
.sh-app-link[hidden] {
  display: none;
}
.sh-app-link[aria-current="true"] {
  background: var(--badge-bg);
}

/* The faces switch in the account menu */
.sh-faces {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 10px;
  color: var(--ink-3);
  font-size: var(--fs-md, 13px);
  font-weight: 700;
}
.sh-faces span {
  flex: 1;
}
.sh-faces button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-1, 8px);
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  cursor: pointer;
}
.sh-faces button:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-faces button[aria-checked="true"] {
  background: var(--badge-bg);
  color: var(--badge-ink);
}

/* A face with a name; hover or focus shows the card: name, Telegram, email */
.sh-person {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  vertical-align: middle;
  border-radius: var(--r-pill, 999px);
  outline: none;
}
.sh-person .sh-person-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-person .sh-person-card {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-pop, 40);
  min-width: 220px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-3, 12px);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: var(--fs-sm, 12px);
  font-weight: 600;
  max-width: calc(100vw - 32px);
  white-space: normal;
  overflow-wrap: anywhere;
}
.sh-person:hover .sh-person-card,
.sh-person:focus-within .sh-person-card,
.sh-person:hover > .sh-person-card {
  display: flex;
}
.sh-person .sh-person-lines {
  display: grid;
  gap: 2px;
}
.sh-person .sh-person-lines b {
  font-size: var(--fs-base, 14px);
}
.sh-person .sh-person-lines a {
  color: var(--violet);
  text-decoration: none;
}
.sh-person .sh-person-lines a:hover {
  text-decoration: underline;
}

/* The rights of an API key */
.sh-key-rights {
  display: grid;
  gap: 12px;
}
.sh-key-presets {
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-3, 12px);
  background: var(--none-bg);
}
.sh-key-presets button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-2, 10px);
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: var(--fs-md, 13px);
  font-weight: 800;
  cursor: pointer;
}
.sh-key-presets button[aria-checked="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px var(--line);
}
.sh-key-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 16px;
}
.sh-key-group {
  display: grid;
  align-content: start;
  gap: 2px;
}
.sh-key-group-name {
  padding: 0 6px 4px;
  color: var(--ink-4);
  font-size: var(--fs-cap, 10px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sh-key-action {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  border: 0;
  border-radius: var(--r-1, 8px);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-md, 13px);
  text-align: left;
  cursor: pointer;
}
.sh-key-action:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-key-box {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
}
.sh-key-action[aria-checked="true"] .sh-key-box {
  border-color: var(--fill);
  background: var(--fill) center / 12px no-repeat var(--sh-check);
}
.sh-key-danger,
.sh-key-danger:hover {
  color: var(--bad);
}
.sh-key-danger[aria-checked="true"] .sh-key-box {
  border-color: var(--bad);
  background-color: var(--bad);
}

/* The page of keys (keypage.tsx): one look in every service */
.sh-keys-head {
  max-width: 1080px;
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}
.sh-keys-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-2xl, 24px);
  font-weight: 800;
  line-height: 1.2;
}
.sh-keys-head p {
  margin: 0;
  max-width: 72ch;
  color: var(--ink-2);
  font-size: var(--fs-base, 14px);
}
.sh-keys-docs {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--violet);
  font-size: var(--fs-md, 13px);
  font-weight: 700;
  text-decoration: none;
}
.sh-keys-docs:hover {
  text-decoration: underline;
}
.sh-keys {
  max-width: 1080px;
  display: grid;
  gap: 16px;
}
.sh-key-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3, 12px);
  background: var(--card);
}
.sh-key-form {
  display: grid;
  gap: 14px;
}
.sh-key-name {
  display: grid;
  gap: 6px;
  color: var(--ink-4);
  font-size: var(--fs-cap, 10px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sh-key-name input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2, 10px);
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-base, 14px);
  letter-spacing: 0;
  text-transform: none;
}
.sh-key-name input:focus-visible,
.sh-key-scope-find input:focus-visible {
  outline: none;
  border-color: var(--violet);
  box-shadow: var(--ring);
}
.sh-key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sh-key-spans {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-3, 12px);
  background: var(--none-bg);
}
.sh-key-spans button {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-2, 10px);
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: var(--fs-md, 13px);
  font-weight: 800;
  cursor: pointer;
}
.sh-key-spans button[aria-checked="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px var(--line);
}
.sh-key-scope {
  position: relative;
}
.sh-key-pick {
  min-height: 36px;
  max-width: 320px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2, 10px);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-md, 13px);
  font-weight: 800;
  cursor: pointer;
}
.sh-key-pick span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-key-pick:hover {
  background: var(--hover-tint);
}
.sh-key-pick .sh-i {
  flex: none;
  color: var(--ico);
}
.sh-key-scope-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-pop, 60);
  width: min(320px, calc(100vw - 32px));
  max-height: 360px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-3, 12px);
  background: var(--card);
  box-shadow: var(--shadow);
}
.sh-key-scope-pop[hidden] {
  display: none;
}
.sh-key-scope-find {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--ico);
}
.sh-key-scope-find input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-1, 8px);
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-md, 13px);
}
.sh-key-scope-list {
  min-height: 0;
  display: grid;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sh-key-scope-group {
  display: grid;
  gap: 2px;
}
.sh-key-scope-pop [role^="menuitem"] {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-1, 8px);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-md, 13px);
  text-align: left;
  cursor: pointer;
}
.sh-key-scope-pop [role^="menuitem"][hidden] {
  display: none;
}
.sh-key-scope-pop [role^="menuitem"]:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-key-scope-pop [role="menuitemradio"] .sh-key-box {
  border-radius: 50%;
}
.sh-key-scope-pop [aria-checked="true"] .sh-key-box {
  border-color: var(--fill);
  background: var(--fill) center / 12px no-repeat var(--sh-check);
}
.sh-key-scope-all {
  font-weight: 800;
}
.sh-key-scope-none {
  margin: 0;
  padding: 8px;
  color: var(--ink-4);
  font-size: var(--fs-md, 13px);
}
.sh-key-error {
  margin: 0;
  color: var(--bad);
  font-size: var(--fs-md, 13px);
  font-weight: 700;
}
.sh-key-error[hidden] {
  display: none;
}
.sh-key-submit {
  display: flex;
  justify-content: flex-end;
}
.sh-key-reveal {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--warn);
  border-radius: var(--r-3, 12px);
  background: var(--warn-bg);
}
.sh-key-reveal[hidden] {
  display: none;
}
.sh-key-reveal-t {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}
.sh-key-reveal-t .sh-i {
  color: var(--warn);
}
.sh-key-reveal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sh-key-reveal-row code {
  flex: 1 1 280px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--r-2, 10px);
  background: var(--card);
  color: var(--ink);
  font-family: var(--ff-mono, monospace);
  font-size: var(--fs-md, 13px);
  overflow-wrap: anywhere;
  user-select: all;
}
.sh-key-reveal-p,
.sh-key-note {
  margin: 0;
  color: var(--ink-3);
  font-size: var(--fs-md, 13px);
}
.sh-key-list {
  display: grid;
  gap: 2px;
}
.sh-key-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--r-2, 10px);
}
.sh-key-item:hover {
  background: var(--row-hover);
}
.sh-key-off {
  opacity: 0.6;
}
.sh-key-ico {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-2, 10px);
  background: var(--none-bg);
  color: var(--ico);
  font-size: 16px;
}
.sh-key-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}
.sh-key-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  color: var(--ink);
}
.sh-key-hint {
  color: var(--ink-4);
  font-family: var(--ff-mono, monospace);
  font-size: var(--fs-sm, 12px);
}
.sh-key-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill, 999px);
  background: var(--none-bg);
  color: var(--ink-3);
  font-size: var(--fs-xs, 11px);
  font-weight: 800;
}
.sh-key-state-active {
  background: var(--ok-bg);
  color: var(--ok);
}
.sh-key-state-revoked {
  background: var(--bad-bg);
  color: var(--bad);
}
.sh-key-facts {
  color: var(--ink-3);
  font-size: var(--fs-md, 13px);
  overflow-wrap: anywhere;
}
.sh-key-labels summary {
  width: fit-content;
  color: var(--ink-2);
  font-size: var(--fs-md, 13px);
  font-weight: 700;
  cursor: pointer;
}
.sh-key-labels span {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: var(--fs-sm, 12px);
}
.sh-key-revoke {
  flex: none;
  min-height: 32px;
  color: var(--bad);
}
.sh-key-revoke:hover,
.sh-key-armed {
  border-color: var(--bad);
  background: var(--bad-bg);
  color: var(--bad);
}
.sh-key-revoke-form {
  flex: none;
  margin: 0;
}
.sh-key-acts {
  flex: none;
  display: flex;
  gap: 6px;
}
.sh-key-edit-open {
  min-height: 32px;
}
.sh-key-edit {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2, 10px);
  background: var(--card-2);
}
.sh-key-edit[hidden] {
  display: none;
}
.sh-key-submit {
  gap: 8px;
}
.sh-key-empty {
  margin: 0;
  padding: 12px 8px;
  color: var(--ink-3);
}
/* Phone: the buttons go under the text, aligned with it */
@media (max-width: 640px) {
  .sh-key-item {
    flex-wrap: wrap;
  }
  .sh-key-main {
    flex: 1 1 calc(100% - 44px);
  }
  .sh-key-acts {
    flex: 1 0 100%;
    flex-wrap: wrap;
    padding-left: 44px;
  }
}

/* Tabs of a section */
.sh-tabs {
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: var(--r-3, 12px);
  background: var(--none-bg);
}
.sh-tab {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: var(--r-2, 10px);
  color: var(--ink-3);
  font-size: var(--fs-md, 13px);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.sh-tab:hover {
  color: var(--ink);
}
.sh-tab[aria-current="page"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px var(--line);
}
/* A hidden scrollbar hid the last tab on phones: tabs wrap instead */
@media (max-width: 640px) {
  .sh-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .sh-tab {
    padding: 0 10px;
  }
}
.sh-tab-count {
  color: var(--ink-4);
  font-weight: 700;
}

.sh-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top bar: the page fills title and tools, the frame adds theme and account */
.sh-top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: var(--z-sticky, 6);
  min-height: var(--sh-top-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px);
}
.sh-top-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.sh-top-title h1 {
  margin: 0;
  overflow: hidden;
  font-size: var(--fs-xl, 20px);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-top-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.sh-top-tools:empty {
  display: none;
}
.sh-account {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}
.sh-burger {
  display: none;
}

/* Account */
.sh-user {
  max-width: 220px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border: 0;
  border-radius: var(--r-pill, 999px);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-md, 13px);
  font-weight: 700;
  cursor: pointer;
}
.sh-user:hover,
.sh-user[aria-expanded="true"] {
  background: var(--hover-tint);
}
.sh-user-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-user > .sh-i {
  font-size: 14px;
  color: var(--ico);
}
.sh-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--t-violet);
  color: var(--sh-on-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.sh-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.sh-avatar.sh-guest {
  background: var(--none-bg);
  color: var(--ink-3);
}
.sh-avatar.sh-guest .sh-i {
  font-size: 16px;
}
.sh-guest-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: var(--r-pill, 999px);
  background: var(--none-bg);
  color: var(--ink-3);
  font-size: var(--fs-sm, 12px);
  font-weight: 700;
  white-space: nowrap;
}
.sh-guest-pill .sh-i {
  font-size: 14px;
}
.sh-account .sh-btn-primary {
  min-height: 34px;
}

.sh-menu-wrap {
  position: relative;
}
.sh-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-pop, 40);
  width: 280px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-3, 12px);
  background: var(--card);
  box-shadow: var(--shadow);
}
.sh-menu[hidden] {
  display: none;
}
.sh-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 10px;
}
.sh-menu-head div {
  min-width: 0;
  display: grid;
}
.sh-menu-head b {
  overflow: hidden;
  font-size: var(--fs-base, 14px);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-menu-head small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: var(--fs-sm, 12px);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-menu-rule {
  height: 1px;
  margin: 4px 0;
  background: var(--line);
}
.sh-menu form {
  margin: 0;
}
.sh-menu-item {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-1, 8px);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-md, 13px);
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sh-menu-item:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-menu-item > .sh-i,
.sh-menu-item > .sh-menu-ico {
  font-size: 16px;
  color: var(--ico);
}
.sh-menu-ico {
  width: 16px;
  flex: none;
  display: inline-grid;
  place-items: center;
}
.sh-menu-ico svg {
  width: 1em;
  height: 1em;
}
.sh-menu-item .sh-ext {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-4);
}
.sh-menu-item.sh-danger,
.sh-menu-item.sh-danger > .sh-i {
  color: var(--bad);
}

/* The menu of a row (window.dreamsMenu): the look of the account menu, placed by the script */
.sh-row-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  width: max-content;
  min-width: 200px;
  max-width: min(320px, calc(100vw - 24px));
  z-index: var(--z-sheet, 60);
}
.sh-menu-title {
  padding: 8px 10px 2px;
  color: var(--ink-4);
  font-size: var(--fs-sm, 12px);
  font-weight: 800;
}
.sh-menu-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-menu-hint {
  margin-left: auto;
  padding-left: 12px;
  color: var(--ink-4);
  font-size: var(--fs-sm, 12px);
  font-weight: 700;
}
.sh-menu-item:disabled {
  opacity: 0.45;
  cursor: default;
}
.sh-menu-item > .sh-menu-lock {
  margin-left: auto;
  flex: none;
  font-size: 14px;
  color: var(--ink-3);
}
.sh-menu-note {
  max-width: 290px;
  padding: 8px 10px 10px;
  color: var(--ink-4);
  font-size: var(--fs-sm, 12px);
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
}
.sh-menu-item:disabled:hover {
  background: transparent;
}

/* Dragging a row (shell.js): the ghost follows the pointer, a line or a frame shows the place */
html.sh-row-dragging,
html.sh-row-dragging * {
  cursor: grabbing !important;
  -webkit-user-select: none;
  user-select: none;
}
[data-sh-drag] {
  -webkit-touch-callout: none;
}
.sh-dragging {
  opacity: 0.4;
}
/* the row classes of a service must not win over the ghost: it is a clone of such a row */
html .sh-drag-ghost {
  position: fixed;
  z-index: calc(var(--z-sheet, 60) + 10);
  margin: 0;
  background: var(--card);
  border-radius: var(--r-1, 8px);
  box-shadow: var(--shadow);
  opacity: 0.94;
  pointer-events: none;
}
.sh-drop-line {
  position: fixed;
  z-index: calc(var(--z-sheet, 60) + 10);
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: var(--violet);
  pointer-events: none;
}
.sh-drop-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
}
.sh-drop-in {
  border-radius: var(--r-1, 8px);
  background: var(--badge-bg);
  box-shadow: inset 0 0 0 2px var(--violet);
}

/* Narrow side panel: the person folds it, the choice lives in the dreams_nav cookie */
@media (min-width: 1025px) {
  html.sh-narrow .sh-app {
    grid-template-columns: var(--sh-side-narrow) minmax(0, 1fr);
  }
  html.sh-narrow .sh-side-head {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 6px;
  }
  html.sh-narrow .sh-side-head .sh-brand {
    flex: none;
  }
  html.sh-narrow :is(.sh-brand-name, .sh-brand-ver, .sh-nav-label, .sh-nav-title, .sh-wide-only) {
    display: none;
  }
  html.sh-narrow .sh-side-body,
  html.sh-narrow .sh-side-foot {
    padding-left: 10px;
    padding-right: 10px;
    align-items: center;
  }
  html.sh-narrow .sh-nav-item {
    width: 44px;
    justify-content: center;
    padding: 0;
  }
  html.sh-narrow .sh-nav-count {
    position: absolute;
    top: 5px;
    right: 6px;
    min-width: 8px;
    width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
  }
  html.sh-narrow .sh-nav-rule {
    width: 32px;
  }
  html.sh-narrow .sh-collapse .sh-collapse-ico {
    display: none;
  }
  html.sh-narrow .sh-collapse .sh-expand-ico {
    display: inline-block;
  }
}

/* Tablet and phone: the side panel is a drawer */
@media (max-width: 1024px) {
  .sh-app {
    grid-template-columns: minmax(0, 1fr);
  }
  .sh-side-grip {
    display: none;
  }
  .sh-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    visibility: hidden;
    transition:
      transform var(--d2, 240ms) var(--ease, ease),
      visibility 0s linear var(--d2, 240ms);
    box-shadow: var(--shadow);
  }
  html.sh-drawer .sh-side {
    transform: none;
    visibility: visible;
    transition: transform var(--d2, 240ms) var(--ease, ease);
  }
  html.sh-drawer body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-drawer, 40) - 1);
    background: var(--scrim);
  }
  .sh-burger {
    display: inline-grid;
    margin-left: -8px;
  }
  .sh-collapse {
    display: none;
  }
  .sh-top {
    padding: 8px 10px 8px 16px;
  }
}
@media (max-width: 720px) {
  /* the theme window hangs from the right edge of the topbar, not from its button */
  .sh-top .sh-theme {
    position: static;
  }
  .sh-top .sh-menu.sh-theme-menu {
    right: 10px;
  }
  .sh-top {
    gap: 6px;
    padding-left: 12px;
  }
  .sh-top-title h1 {
    font-size: var(--fs-lg, 16px);
  }
  .sh-user {
    padding-right: 3px;
  }
  .sh-user-name,
  .sh-user > .sh-i,
  .sh-guest-pill span {
    display: none;
  }
  .sh-account {
    border-left: 0;
    padding-left: 0;
    gap: 2px;
  }
}

/* Sign-in card: one page for every service */
.sh-auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--page-glow, var(--bg));
}
.sh-auth-theme {
  position: fixed;
  top: 14px;
  right: 14px;
}
.sh-card {
  width: min(400px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 32px 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-5, 18px);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}
.sh-card-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.sh-card-brand small {
  color: var(--ink-4);
  font-size: var(--fs-cap, 10px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sh-card h1,
.sh-card h2 {
  margin: 0;
  font-size: var(--fs-2xl, 26px);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--g-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sh-card p {
  margin: 0;
  color: var(--ink-3);
  font-size: var(--fs-base, 14px);
  line-height: 1.5;
}
.sh-card form {
  width: 100%;
  margin: 0;
}
.sh-card-actions {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.sh-card-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-4);
  font-size: var(--fs-sm, 12px);
}
.sh-card-or::before,
.sh-card-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.sh-card-alert {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-2, 10px);
  background: var(--alert-bg);
  color: var(--alert-ink);
  font-size: var(--fs-md, 13px);
  font-weight: 700;
}
.sh-card-note {
  color: var(--ink-4);
  font-size: var(--fs-sm, 12px);
}
.sh-card-note a {
  color: var(--violet);
}

/* Guest gate: the public part shows through, the card asks once and remembers a close for 30 days */
.sh-gate {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet, 60);
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 38%, transparent);
  backdrop-filter: blur(1.5px);
}
html.sh-gate-off .sh-gate,
.sh-gate[hidden] {
  display: none;
}
.sh-gate .sh-card {
  position: relative;
  background: color-mix(in srgb, var(--card) 84%, transparent);
  backdrop-filter: blur(14px);
}
.sh-gate-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* A phone keeps the page name readable; tools that do not fit scroll sideways */
@media (max-width: 720px) {
  .sh-top-title > h1,
  .sh-top-title > nav {
    min-width: 5.5em;
    flex: 0 1 auto;
  }
  .sh-top-tools {
    min-width: 0;
    flex: 0 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* Paper gets the page, not the frame */
@media print {
  .sh-side,
  .sh-top,
  .sh-gate,
  .sh-sprite {
    display: none !important;
  }
  .sh-app {
    display: block;
  }
}

/* Project links: the button of a bar and the popover of the shell's own menu */
.sh-links {
  display: block;
  flex: none;
}
.sh-links-btn {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-1, 8px);
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.sh-links-btn:hover,
.sh-links-btn[aria-expanded="true"] {
  background: var(--hover-tint);
  color: var(--ink);
}
.sh-links-btn:focus-visible,
.sh-links-head:focus-visible {
  outline: 2px solid var(--chip-on-ring);
  outline-offset: 1px;
}
.sh-links-signs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sh-links-signs .sh-links-sign {
  font-size: 14px;
}
/* Fixed with auto offsets keeps the popover under the button and outside the clipped title */
.sh-links-pop {
  position: fixed;
  top: auto;
  right: auto;
  left: auto;
  margin-top: 8px;
  width: 340px;
  max-width: calc(100vw - 24px);
}
.sh-links-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding: 6px 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-base, 14px);
  text-decoration: none;
}
.sh-links-head b {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-links-head .sh-ext {
  flex: none;
  font-size: 13px;
  color: var(--ink-4);
}
.sh-links-row {
  min-height: 48px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.sh-links-row > .sh-links-sign {
  font-size: 18px;
}
div.sh-links-row {
  cursor: default;
}
div.sh-links-row:hover {
  background: transparent;
}
.sh-links-text {
  min-width: 0;
  flex: 1;
  display: grid;
}
.sh-links-t,
.sh-links-s {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-links-t {
  font-size: var(--fs-md, 13px);
}
.sh-links-s {
  color: var(--ink-3);
  font-size: var(--fs-sm, 12px);
  font-weight: 600;
}
@media (max-width: 720px) {
  .sh-links {
    position: static;
  }
  /* fixed, as on a wide screen: a bar that scrolls sideways (the tracker's board bar) must not clip it */
  .sh-links-pop {
    position: fixed;
    top: auto;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    margin-top: 4px;
  }
}
/* The button never gives way: a narrow bar shows the link icon only, and the title next to it shrinks */
.sh-top-title > .sh-links {
  flex: none;
}
@media (max-width: 1099px) {
  .sh-links-signs {
    display: none;
  }
  .sh-links-btn {
    width: 36px;
    justify-content: center;
    padding: 0;
  }
}
/* A phone has no room for the name next to the tools: the button leads the title, the tools on the right stay as on any page */
@media (max-width: 720px) {
  .sh-top-title > .sh-links {
    order: -1;
  }
  .sh-top-title:has(> .sh-links) {
    min-width: 36px;
  }
}

/* The bell of all services (docs/notify.md) */
.sh-bell {
  position: relative;
  flex: none;
}
.sh-bell[hidden] {
  display: none;
}
.sh-bell-btn {
  position: relative;
}
.sh-bell-count {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bad);
  color: var(--sh-on-accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  pointer-events: none;
}
.sh-bell-count[hidden] {
  display: none;
}
.sh-bell-pop {
  width: 380px;
  max-height: min(560px, calc(100dvh - 80px));
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 6px;
}
.sh-bell-list {
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
}
.sh-bell-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  border-radius: var(--r-1, 8px);
}
.sh-bell-item:hover {
  background: var(--hover-tint);
}
.sh-bell-link {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
}
.sh-bell-link .sh-svc {
  --sh-svc-size: 28px;
  margin-top: 1px;
}
.sh-bell-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.sh-bell-title {
  font-size: var(--fs-md, 13px);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sh-bell-unread .sh-bell-title {
  font-weight: 800;
}
.sh-bell-unread .sh-bell-link::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc-l);
}
.sh-bell-body {
  overflow: hidden;
  color: var(--ink-3);
  font-size: var(--fs-sm, 12px);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-bell-when {
  color: var(--ink-4);
  font-size: var(--fs-sm, 12px);
}
.sh-bell-done {
  width: 30px;
  height: 30px;
  margin: 6px 4px 0 0;
  color: var(--ico);
  opacity: 0;
}
.sh-bell-item:hover .sh-bell-done,
.sh-bell-done:focus-visible {
  opacity: 1;
}
.sh-bell-note {
  margin: 0;
  padding: 22px 12px;
  color: var(--ink-3);
  font-size: var(--fs-md, 13px);
  text-align: center;
}
.sh-bell-foot {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.sh-bell-foot .sh-menu-item {
  width: auto;
  flex: 1;
  white-space: nowrap;
}
.sh-bell-foot .sh-menu-item[hidden] {
  display: none;
}
.sh-bell-settings {
  color: var(--ico);
}
@media (hover: none) {
  .sh-bell-done {
    opacity: 1;
  }
}
@media (max-width: 640px) {
  .sh-bell {
    position: static;
  }
  .sh-bell-pop {
    position: fixed;
    top: 56px;
    right: 8px;
    left: 8px;
    width: auto;
  }
}
