/* shell.css — the chrome. Never repaints itself from user data. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* Themed rather than left at browser defaults — the cheapest signal that a
 * page was built rather than assembled. */
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:root { caret-color: var(--accent); scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.icon { flex: none; display: block; }

/* An explicit display wins over the hidden attribute, so a component with
 * display:flex quietly ignores `hidden`. This settles it once. */
[hidden] { display: none !important; }

/* ---- app frame ------------------------------------------------------- */
#app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  height: 100%;
}

.content {
  min-width: 0;
  height: 100%;
  overflow: auto;
}

/* ---- rail ------------------------------------------------------------
 * A list, not a launcher. Modules are sections of one workspace, so they
 * stay on screen: switching costs one click and no memory. */
.rail {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3);
  background: var(--panel);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius);
  text-align: left;
  width: 100%;
}
.rail__brand:not(:disabled):hover { background: var(--panel-2); }
.rail__brand:disabled { cursor: default; }

.rail__brand-name {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  /* Two lines in the vertical rail, one in the horizontal one. A three-word
   * band name would otherwise push the whole grid down the screen. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail__brand-hint {
  font-size: var(--t-meta);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.rail__items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--s-2);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.rail__item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 9px var(--s-3);
  border-radius: var(--radius);
  color: var(--muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.rail__item:hover { background: var(--panel-2); color: var(--text); }

.rail__item.is-active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}
.rail__item.is-active .icon { color: var(--accent); }

.rail__label {
  font-size: var(--t-body);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail__me {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: var(--s-2);
  align-items: center;
  padding: var(--s-2) var(--s-3);
  border-top: 1px solid var(--line);
  margin: 0 calc(var(--s-3) * -1) calc(var(--s-3) * -1);
  padding-inline: var(--s-5);
}
.rail__me .disc { grid-row: 1 / 3; }
.rail__me-name {
  font-size: var(--t-card);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail__me-role {
  font-size: var(--t-meta);
  color: var(--muted);
  text-transform: capitalize;
}

/* ---- member disc -----------------------------------------------------
 * A person, not a channel: muted tone, dark initials. Light initials on
 * these discs measure 2.7-3.5:1 and fail. */
.disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--disc-size, 22px);
  height: var(--disc-size, 22px);
  border-radius: 50%;
  background: var(--disc-color, var(--m-4));
  color: var(--on-member);
  font-size: calc(var(--disc-size, 22px) * 0.4);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  flex: none;
  user-select: none;
}

.disc--empty {
  background: none;
  border: 1px dashed var(--faint);
  color: var(--faint);
}

/* ---- responsive ------------------------------------------------------
 * The same degradation Linkophony's editor nav uses, so someone moving
 * between the two products does not learn two navigations. */
@media (max-width: 1099px) {
  #app { grid-template-columns: var(--rail-w-collapsed) minmax(0, 1fr); }
  .rail { padding: var(--s-2); align-items: center; }
  .rail__label, .rail__brand-hint, .rail__me-name, .rail__me-role { display: none; }
  .rail__brand { align-items: center; padding: var(--s-2); }
  .rail__brand-name {
    font-size: 0; /* keeps the accessible name, hides the glyphs */
  }
  .rail__brand-name::first-letter { font-size: 1rem; }
  .rail__item { justify-content: center; padding: 10px; }
  .rail__me { padding-inline: var(--s-2); margin-inline: calc(var(--s-2) * -1); }
}

@media (max-width: 819px) {
  #app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .rail {
    flex-direction: row;
    align-items: center;
    gap: var(--s-1);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    padding: var(--s-2) var(--s-3);
  }
  .rail__items { flex-direction: row; margin: 0; overflow: visible; }
  .rail__brand { width: auto; flex: none; min-width: 0; }
  .rail__brand-name {
    font-size: 0.875rem;
    -webkit-line-clamp: 1;
    max-width: 28vw;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .rail__brand-name::first-letter { font-size: inherit; }
  .rail__label { display: inline; }
  .rail__me {
    margin: 0;
    padding: 0 0 0 var(--s-2);
    border-top: 0;
    border-left: 1px solid var(--line);
    margin-left: auto;
  }
}

/* ---- toasts ---------------------------------------------------------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: var(--s-5);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  z-index: 60;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px var(--s-4);
  border-radius: var(--radius-lg);
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  font-size: var(--t-card);
  max-width: min(92vw, 460px);
  animation: toast-in var(--t-base) var(--ease);
  cursor: pointer;
}
.toast--error { border-left: 2px solid var(--danger); }
.toast--success { border-left: 2px solid var(--success); }
.toast.is-leaving { opacity: 0; transition: opacity 200ms var(--ease); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---- fatal ----------------------------------------------------------- */
.fatal {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  height: 100%;
  padding: var(--s-6);
  text-align: center;
  color: var(--muted);
}
.fatal .icon { color: var(--danger); }
.fatal__title { font-size: 1.0625rem; font-weight: 600; color: var(--text); margin: 0; }
.fatal__detail { margin: 0; font-size: var(--t-card); max-width: 42ch; }

/* ---- shared bits modules use ----------------------------------------- */
.view {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.view__bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--line);
  min-height: var(--header-h);
  flex: none;
}

.view__title {
  font-size: var(--t-view);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.view__body { flex: 1; min-height: 0; overflow: auto; padding: var(--s-5); }

@media (max-width: 819px) {
  .view__body { padding: var(--s-3); }
}

.label {
  margin: 0;   /* it is usually a <p>; the UA margin is nobody's intent */
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px var(--s-3);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: var(--t-card);
  font-weight: 600;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn:hover { background: var(--panel-2); border-color: var(--faint); }
.btn:active { transform: scale(.985); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-7) var(--s-5);
  color: var(--muted);
  text-align: center;
}
.empty__title { color: var(--text); font-weight: 600; }
.empty__hint { font-size: var(--t-card); max-width: 40ch; }

/* ---- side panel -------------------------------------------------------
 * Shared by every module. A panel, not a modal: you edit a thing while
 * still looking at the list it came from, and losing that context is
 * losing the reason you opened it. The content gives up width rather than
 * being covered.
 *
 * Lived in the calendar module until gigs needed it -- nothing about it
 * was ever specific to calendars. */
/* The grid gives up width rather than being covered. Editing a post while
 * unable to see Saturday and Sunday is editing it without the context that
 * made you open it. */
body.has-panel #app { padding-right: var(--panel-w); }
#app { transition: padding-right var(--t-base) var(--ease); }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  z-index: 50;
  animation: panel-in var(--t-base) var(--ease);
}

@keyframes panel-in {
  from { transform: translateX(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  flex: none;
}

.panel__title { font-size: 1rem; font-weight: 700; margin: 0; letter-spacing: -0.015em; }

.panel__close {
  color: var(--muted);
  padding: 4px;
  border-radius: var(--radius);
}
.panel__close:hover { color: var(--text); background: var(--panel-2); }

.panel__form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
  overflow-y: auto;
  flex: 1;
}

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }

.field__label {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.input {
  font: inherit;
  font-size: var(--t-card);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  width: 100%;
  min-width: 0;
}
.input:hover { border-color: var(--faint); }
.input:focus { outline: none; border-color: var(--accent); }
.input--area { resize: vertical; line-height: 1.45; }

/* The native pickers are dark-scheme aware only if told. */
.input[type="date"], .input[type="time"] { color-scheme: dark; }

/* Groups a long form into the order the day happens. */
.panel__section {
  margin: var(--s-2) 0 calc(var(--s-1) * -1);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
}

.panel__error {
  margin: 0;
  font-size: var(--t-card);
  color: var(--danger);
}

.panel__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.panel__spacer { flex: 1; }
.panel__delete { color: var(--danger); border-color: transparent; }
.panel__delete:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}

.panel__note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius);
  background: var(--panel-2);
  font-size: var(--t-meta);
  color: var(--muted);
}
.panel__note .icon { color: var(--accent); flex: none; }

@media (max-width: 819px) {
  /* No room to push at this width, so the panel takes the screen. */
  .panel { width: 100vw; }
  body.has-panel #app { padding-right: 0; }
}


/* ---- dev login -------------------------------------------------------
 * Local only. Styled enough to be pleasant, deliberately marked so it is
 * never mistaken for the real sign-in. */
.devlogin {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--s-5);
}

.devlogin__card {
  width: min(100%, 380px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-2);
}

.devlogin__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: var(--s-1) 0 var(--s-2);
}

.devlogin__hint {
  margin: 0 0 var(--s-4);
  font-size: var(--t-card);
  color: var(--muted);
}

.devlogin__rows { display: flex; flex-direction: column; gap: 2px; }

.devlogin__row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2);
  border-radius: var(--radius);
  text-align: left;
  transition: background var(--t-fast) var(--ease);
}
.devlogin__row:hover { background: var(--panel-2); }
.devlogin__row:active { transform: scale(.99); }

.devlogin__who { display: flex; flex-direction: column; line-height: 1.25; }
.devlogin__name { font-weight: 600; font-size: var(--t-card); }
.devlogin__role { font-size: var(--t-meta); color: var(--muted); text-transform: capitalize; }

/* ---- menu -------------------------------------------------------------
 * Used by the workspace switcher, the member menu and per-member actions. */
.menu {
  position: fixed;
  left: var(--menu-left, 0);
  top: var(--menu-top, auto);
  bottom: var(--menu-bottom, auto);
  min-width: 208px;
  max-width: min(88vw, 300px);
  padding: var(--s-1);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  z-index: 70;
  animation: menu-in var(--t-fast) var(--ease);
}
.menu.is-above { transform-origin: bottom left; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

.menu__item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  padding: 7px var(--s-2);
  border-radius: var(--radius);
  text-align: left;
  color: var(--text);
}
.menu__item:hover { background: var(--panel); }
.menu__item .icon { color: var(--muted); }
.menu__item.is-danger { color: var(--danger); }
.menu__item.is-danger .icon { color: var(--danger); }
.menu__item.is-danger:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.menu__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.menu__label {
  font-size: var(--t-card);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu__hint { font-size: var(--t-meta); color: var(--muted); }
.menu__check { color: var(--accent) !important; }
.menu__sep { height: 1px; background: var(--line); margin: var(--s-1) 0; }

/* ---- rail: brand and member become menu triggers ---------------------- */
.rail__brand[aria-expanded="true"],
.rail__me[aria-expanded="true"] { background: var(--panel-2); }

.rail__me {
  width: 100%;
  text-align: left;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.rail__me:hover { background: var(--panel-2); }
.rail__me.is-active { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ---- settings surfaces ------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: var(--s-3); }
.stack--wide { gap: var(--s-4); max-width: 640px; }

.card-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  max-width: 640px;
  margin-bottom: var(--s-4);
}

.card-panel__head { margin-bottom: var(--s-4); }
.card-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.card-panel__desc {
  margin: 4px 0 0;
  font-size: var(--t-card);
  color: var(--muted);
  max-width: 52ch;
}

.form { display: flex; flex-direction: column; gap: var(--s-3); }
.form__actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.form__status { margin: 0; font-size: var(--t-card); color: var(--danger); }

.field__hint {
  margin: 0;
  font-size: var(--t-meta);
  color: var(--muted);
  max-width: 52ch;
}

.kv { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.kv__key { font-size: var(--t-card); color: var(--muted); }
.kv__value { font-size: var(--t-card); font-weight: 600; margin: 0; }
.kv__value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--t-meta);
  color: var(--text);
  word-break: break-all;
}

/* ---- colour swatches --------------------------------------------------- */
.swatches { display: flex; gap: var(--s-2); flex-wrap: wrap; }

.swatch {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--on-member);
  transition: transform var(--t-fast) var(--ease);
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-chosen {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--text);
}
.swatch__taken {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  border: 1px solid var(--panel);
  font-size: 0;
}

/* ---- toggle rows and switches ------------------------------------------ */
.toggle-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.toggle-row__label { font-size: var(--t-body); font-weight: 600; }
.toggle-row__hint { font-size: var(--t-meta); color: var(--muted); }

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  flex: none;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.switch.is-on { background: var(--accent); border-color: var(--accent); }
.switch:disabled { opacity: .45; cursor: not-allowed; }

.switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.switch.is-on .switch__knob { transform: translateX(16px); background: var(--on-accent); }

/* ---- member rows ------------------------------------------------------- */
.member-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child { border-bottom: 0; }
.member-row.is-pending { opacity: .8; }

.member-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-row__name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--t-body);
  font-weight: 600;
  min-width: 0;
}
.member-row__name > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-row__you {
  font-size: var(--t-meta);
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  padding: 1px 5px;
  border-radius: 3px;
  flex: none;
}
.member-row__meta {
  font-size: var(--t-meta);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-row__role {
  font-size: var(--t-meta);
  font-weight: 600;
  text-transform: capitalize;
  color: var(--muted);
  flex: none;
}

.icon-btn {
  padding: 5px;
  border-radius: var(--radius);
  color: var(--muted);
  flex: none;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

.btn--small { padding: 4px 9px; font-size: var(--t-meta); }

/* ---- join -------------------------------------------------------------- */
.content--bare { grid-column: 1 / -1; }

.join {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: var(--s-5);
  grid-column: 1 / -1;
}

.join__card {
  width: min(100%, 400px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-2);
}
.join__card .icon { color: var(--accent); }

.join__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.join__hint { margin: 0; font-size: var(--t-card); color: var(--muted); }
.join__meta { margin: 0; font-size: var(--t-meta); color: var(--faint); }
.join__error { margin: 0; font-size: var(--t-card); color: var(--danger); }

.spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 819px) {
  .card-panel { padding: var(--s-3); }
  .menu { max-width: min(92vw, 300px); }
}

/* ---- account surface ---------------------------------------------------
 * app.{domain}: no band, so no rail. Chrome that leads nowhere is worse
 * than no chrome. */
.account {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: var(--s-5);
  grid-column: 1 / -1;
}

.account__card {
  width: min(100%, 460px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.account__card--narrow { max-width: 400px; align-items: flex-start; }
.account__card .icon { color: var(--accent); }

.account__head { position: relative; }
.account__title {
  margin: var(--s-1) 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.account__signout {
  position: absolute;
  top: 0;
  right: 0;
  font-size: var(--t-meta);
  font-weight: 600;
  color: var(--muted);
  padding: 4px 7px;
  border-radius: var(--radius);
}
.account__signout:hover { color: var(--text); background: var(--panel-2); }

.account__actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  padding-top: var(--s-1);
}

/* ---- a band in the list ------------------------------------------------ */
.band-rows { display: flex; flex-direction: column; gap: 4px; }

.band-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.band-row:hover { background: var(--panel-2); border-color: var(--faint); }
.band-row:active { transform: scale(.995); }
.band-row:hover .band-row__go { color: var(--accent); transform: translateX(2px); }

/* A band's mark is chrome, not user colour: it identifies a workspace, and
 * the rule is that chrome never repaints itself from user data. */
.band-row__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: var(--t-meta);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  flex: none;
}

.band-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.band-row__name {
  font-size: var(--t-body);
  font-weight: 600;
  letter-spacing: -0.008em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.band-row__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-meta);
  color: var(--muted);
  min-width: 0;
}
.band-row__meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.band-row__dot { color: var(--faint); flex: none; }
.band-row__role { text-transform: capitalize; flex: none; }
.band-row__go {
  color: var(--muted);
  flex: none;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

/* Availability feedback while typing a new band's address. */
.field__hint.is-ok { color: var(--success); }
.field__hint.is-bad { color: var(--danger); }

@media (max-width: 819px) {
  .account { padding: var(--s-3); align-items: flex-start; }
  .account__card { padding: var(--s-4); }
}
