:root {
  color-scheme: dark;
  --base: #15191e;
  --surface: #22282e;
  --side: #191e23;
  --field: #1a1f24;
  --ink: #f5f6f7;
  --muted: #c6cbd0;
  --quiet: #aeb6bf;
  --line: #343c44;
  --control-line: #687480;
  --accent: #bd3438;
  --accent-ink: #ff898a;
  --accent-soft: #38272d;
  --accent-soft-hover: #4b2c33;
  --accent-line: #e56b6b;
  --rail-raised: #303840;
  --focus: #ff9b9c;
  --display: "Segoe UI", system-ui, sans-serif;
  --good: #8bd9af;
  --error: #ff9d9f;
  --s1: .25rem;
  --s2: .5rem;
  --s3: .75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s7: 1.75rem;
  --s8: 2rem;
  --s9: 2.5rem;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text: .9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --round-sm: .375rem;
  --round: .625rem;
  --round-lg: 1rem;
  --round-xl: 1.5rem;
  --pill: 3rem;
  --target: 2.75rem;
  --shadow: 0 20px 60px #080a0d88;
  --float-shadow: 0 5px 9px #07090b9c, 0 15px 32px #08090d66;
  --metal: linear-gradient(155deg, #30373e, #22282e);
  --steel: linear-gradient(155deg, #30363d, #20262c 46%, #1c2228);
  --red-surface: linear-gradient(155deg, #c93c3e, #ae292f);
  --bevel: inset 0 1px #ffffff16, 0 3px 5px #090c0fb0;
  --red-shadow: inset 0 1px #ffffff38, 0 3px 6px #110607aa, 0 0 12px #ef555533;
  --recess: inset 0 2px 5px #0b0d1080, 0 1px #ffffff0c;
  --ease: 140ms ease;
  --bar-height: 4.75rem;
  --left-width: 21rem;
  --right-width: 18rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; }
body {
  height: 100dvh;
  margin: 0;
  padding: 0 var(--s8) var(--s6);
  background: radial-gradient(ellipse at 15% 0, #353b42, var(--base) 65%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font: var(--text)/1.5 "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: var(--accent-ink); text-underline-offset: .16em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; width: 0; height: 0; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  top: var(--s3);
  left: var(--s3);
  z-index: 2;
  padding: var(--s2) var(--s4);
  border-radius: var(--round-sm);
  background: var(--surface);
}

.topbar, .workspace { width: 100%; max-width: 100rem; margin-inline: auto; }
.topbar {
  min-height: var(--bar-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  flex: none;
}
.brand { display: flex; align-items: center; gap: var(--s3); }
.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  flex: none;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--control-line);
  border-radius: 50%;
  box-shadow: var(--bevel);
}
.brand-mark img { position: absolute; top: 50%; left: 50%; width: 152%; transform: translate(-50%, -41.5%); }
.brand-name { font: 800 1.55rem/.95 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.brand-note {
  margin-left: var(--s2);
  padding-left: var(--s4);
  border-left: 1px solid var(--control-line);
  text-transform: uppercase;
  color: var(--muted);
  font: 700 .6875rem/1.36 var(--display);
  letter-spacing: .13em;
}
.connection {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--good);
  font-size: var(--text-xs);
  font-weight: 650;
  white-space: nowrap;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--metal);
  box-shadow: var(--bevel);
}
.connection::before { content: ""; width: .4375rem; height: .4375rem; border-radius: 50%; background: currentColor; }
.connection.is-offline { color: var(--error); border-color: currentColor; }
.button {
  min-height: 2.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  border: 1px solid transparent;
  border-radius: var(--round-sm);
  font-size: var(--text-sm);
  font-weight: 650;
  transition: background var(--ease), color var(--ease);
}
.button-primary { color: #fff; border-color: var(--accent-line); background: var(--red-surface); box-shadow: var(--red-shadow); }
.button-primary:hover:not(:disabled) { filter: brightness(1.06); }
.button-primary:active:not(:disabled) { background: var(--accent); box-shadow: var(--recess); }
.button-quiet { background: transparent; color: var(--accent-ink); }
.button-quiet:hover { background: var(--accent-soft); }
.button-quiet:active { background: var(--accent-soft-hover); }

.account-entry { display: grid; flex: 1; min-height: 0; overflow: auto; padding: var(--s5); }
.account-shell {
  display: grid;
  grid-template-columns: 1fr minmax(22rem, .88fr);
  width: min(100%, 58rem);
  min-height: 35rem;
  margin: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--round-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.account-club {
  display: grid;
  align-content: center;
  gap: var(--s5);
  min-width: 0;
  padding: var(--s6) var(--s4);
  background: radial-gradient(ellipse at center, #383b43, #14181e 74%);
}
.club-wordmark { aspect-ratio: 3.25; overflow: hidden; mix-blend-mode: screen; }
.club-wordmark img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; }
.club-caption { display: flex; align-items: center; gap: var(--s3); margin-inline: 12%; color: var(--muted); font: 700 var(--text-xs)/1.4 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.club-caption::before, .club-caption::after { content: ""; flex: 1; height: 1px; background: var(--accent); }
.account-card {
  min-width: 0;
  align-self: center;
  padding: clamp(var(--s5), 5vw, 3rem);
}
.account-card h1 { margin-block: var(--s6) var(--s2); font: 800 clamp(1.9rem, 3.5vw, 2.55rem)/1.08 var(--display); letter-spacing: -.04em; }
.account-description { margin-bottom: var(--s5); color: var(--muted); }
.account-card fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#account-fields { display: grid; gap: var(--s4); }
.account-method { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.account-method legend, .account-field label { margin-bottom: var(--s1); font-weight: 650; }
.account-method label { display: flex; min-height: 2.75rem; align-items: center; gap: var(--s2); padding: var(--s2); border: 1px solid var(--control-line); border-radius: var(--round-sm); background: var(--metal); box-shadow: var(--bevel); cursor: pointer; font-size: var(--text-sm); }
.account-method label:hover { background: var(--field); }
.account-method label:has(:checked) { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-ink); box-shadow: var(--recess); }
.account-method label:has(:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.account-method input { flex: none; margin: 0; accent-color: var(--accent-ink); }
.account-field { display: grid; }
.account-field input { width: 100%; min-height: 2.75rem; padding: var(--s2) var(--s3); border: 1px solid var(--control-line); border-radius: var(--round-sm); background: var(--field); box-shadow: var(--recess); color: var(--ink); font-size: 1rem; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1); }
.password-field .button { padding-inline: var(--s2); }
.account-card .button { min-height: 2.75rem; }
#account-switch { justify-self: center; }
.account-field p { margin-top: var(--s1); color: var(--muted); font-size: var(--text-sm); }
.account-error { color: var(--error); }
.account-error:not(:empty) { margin-top: var(--s3); }
.account-card > a { display: inline-block; margin-top: var(--s4); font-size: var(--text-sm); }
.rules-consent { display: grid; gap: var(--s1); color: var(--muted); }
.rules-consent input { accent-color: var(--accent-ink); }
.web-delete .rules-consent { display: flex; align-items: center; gap: var(--s2); }
.policy-body { height: auto; min-height: 100dvh; overflow: auto; }
.policy-page { width: min(100%, 42rem); margin-inline: auto; padding: var(--s6) 0; overflow-wrap: anywhere; }
.policy-page h1 { margin-block: var(--s4); }
.policy-page h2 { margin-block: var(--s6) var(--s2); }
.policy-page p { margin-block: var(--s2); }
.web-delete { max-width: 26rem; }
.web-delete > fieldset { display: grid; gap: var(--s4); margin-block: var(--s4); }
#profile-feedback { color: var(--error); }
#profile-feedback:empty { margin: 0; }
.button svg { width: 1.125rem; height: 1.125rem; }
.profile-button {
  width: var(--target);
  height: var(--target);
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--metal);
  box-shadow: var(--bevel);
  font-weight: 650;
  font-size: var(--text-sm);
}
.profile-button:hover { background: var(--accent-soft); }
.profile-button:active { box-shadow: var(--recess); }
.profile-button .avatar { width: 2.25rem; height: 2.25rem; }
.avatar, .room-icon {
  width: 2.625rem;
  height: 2.625rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 750;
}
.avatar { position: relative; width: 2.125rem; height: 2.125rem; border-radius: 50%; }
.avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.room-icon img { width: 100%; height: 100%; object-fit: cover; }
.tone-lilac { background: var(--accent-soft); color: var(--accent-ink); }
.tone-apricot, .tone-mint, .tone-blue { background: var(--rail-raised); color: var(--ink); }

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--left-width) minmax(0, 1fr) var(--right-width);
  border: 1px solid var(--line);
  border-radius: var(--round-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.room-pane, .details-pane, .chat-pane { min-width: 0; min-height: 0; }
.room-pane, .details-pane { background: var(--steel); }
.room-pane {
  display: flex;
  flex-direction: column;
  overflow: auto;
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: var(--s7) var(--s4) var(--s4);
}
.room-pane-header { flex: none; }
.rooms-heading { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); }
.room-pane h2 { font: 750 var(--text-2xl)/1.1 var(--display); letter-spacing: -.03em; }
#invite-button { margin-left: auto; width: var(--target); min-height: var(--target); padding: 0; border-radius: 50%; }
.eyebrow { color: var(--accent-ink); font: 700 var(--text-xs)/1.4 var(--display); letter-spacing: .13em; text-transform: uppercase; }
.search-field {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s3);
  min-height: 2.625rem;
  border: 1px solid var(--control-line);
  border-radius: var(--pill);
  background: var(--field);
  box-shadow: var(--recess);
  color: var(--quiet);
}
.search-field svg { width: 1rem; height: 1rem; }
.search-field:focus-within { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.search-field input { min-width: 0; width: 100%; padding-block: var(--s2); border: 0; outline: 0; background: none; color: var(--ink); font-size: var(--text-sm); }
::placeholder { color: var(--quiet); opacity: 1; }
.room-pane .search-field:focus-within, .room-pane :focus-visible { outline-color: var(--focus); }
.room-list { display: grid; align-content: start; margin-top: var(--s2); overflow: auto; scrollbar-width: thin; }
.room {
  display: flex;
  align-items: center;
  text-align: left;
  gap: var(--s3);
  min-width: 0;
  min-height: 4.625rem;
  padding: var(--s2) var(--s1);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  transition: background var(--ease), color var(--ease);
}
.room:hover { background: var(--rail-raised); }
.room:active { border-color: var(--control-line); box-shadow: var(--recess); }
.room[aria-current="true"] { background: #ffffff09; }
.room[aria-current="true"]:hover { background: var(--rail-raised); }
.room[aria-current="true"] .room-copy strong { color: var(--accent-ink); }
.room:focus-visible { outline-offset: -2px; }
.room .room-icon, .chat-header .room-icon { border: 2px solid var(--line); box-shadow: var(--bevel); }
.room-copy { display: grid; min-width: 0; flex: 1; gap: var(--s1); line-height: 1.2; }
.room-copy strong, .room-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-copy strong { font-size: var(--text); font-weight: 700; }
.room-copy > span { color: var(--muted); font-size: var(--text-xs); }
.room-time { align-self: center; color: var(--quiet); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.room-dock {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: auto;
  padding: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--metal);
  box-shadow: var(--float-shadow);
}
.room-dock .icon-button[aria-current="true"] { color: var(--accent-ink); background: var(--field); }

.status-strip { flex: none; min-width: 0; margin-top: var(--s4); }
.status-strip h3 { color: var(--muted); font-size: var(--text-sm); margin-inline: var(--s1); }
.status-track, .story-list { display: flex; align-items: flex-start; gap: var(--s2); }
.status-track { overflow-x: auto; padding: var(--s1) var(--s1) var(--s2); scrollbar-width: thin; }
.status-tile {
  flex: none;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--s1);
  width: 6rem;
  padding: var(--s1);
  border: 0;
  border-radius: var(--round);
  background: transparent;
  color: var(--ink);
  text-align: center;
  font-size: var(--text-xs);
  line-height: 1.25;
}
button.status-tile:hover { background: var(--rail-raised); }
.status-tile > span:not(.status-ring) { max-width: 100%; }
.status-tile > span:not(.status-ring, .status-tile-label) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-tile > .status-tile-label { color: var(--muted); overflow-wrap: anywhere; }
.status-ring { display: grid; place-items: center; width: 3rem; height: 3rem; border: 2px solid var(--control-line); border-radius: 50%; background: var(--metal); box-shadow: var(--bevel); }
.status-ring.has-story { border-color: var(--accent-ink); }
#open-status .status-ring { border-style: dashed; color: var(--accent-ink); }
.status-note { color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.status-note:empty { display: none; }
dialog .status-form { gap: var(--s2); }
.status-form + .status-form { border-top: 1px solid var(--line); padding-top: var(--s4); margin-top: var(--s4); }
.status-form .status-note { margin: 0; }
#activity-select { min-height: var(--target); padding: var(--s2); border: 1px solid var(--control-line); border-radius: var(--round-sm); color: var(--ink); background: var(--field); }
.story-sources, .story-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.story-sources .button { padding-inline: var(--s2); }
#story-preview video, #story-player video { display: block; width: 100%; max-height: 52dvh; border-radius: var(--round); background: var(--base); }
.story-controls { margin-top: var(--s3); }
#next-story { margin-left: auto; }
#story-viewer-title { min-width: 0; overflow-wrap: anywhere; }

.chat-pane { display: flex; flex-direction: column; background: var(--side); }
.chat-header {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s6);
  background: transparent;
  flex: none;
}
.chat-heading { min-width: 0; }
.chat-heading h1 { font: 800 var(--text-xl)/1.1 var(--display); letter-spacing: -.025em; }
.chat-heading p { margin-top: var(--s1); color: var(--quiet); font-size: var(--text-xs); }
.chat-tools { display: flex; margin-left: auto; gap: var(--s1); }
.icon-button {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--target);
  height: var(--target);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--metal);
  box-shadow: var(--bevel);
  transition: background var(--ease), color var(--ease);
}
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--field); color: var(--accent-ink); }
.icon-button:active { background: var(--accent-soft); box-shadow: var(--recess); }
.back-button { display: none; }
.message-search-wrap { padding: var(--s2) var(--s6); border-bottom: 1px solid var(--line); }
.message-search-row { display: flex; gap: var(--s2); }
.message-search-row .search-field { flex: 1; min-width: 0; }
.search-results:not(:empty) { margin-top: var(--s1); color: var(--muted); font-size: var(--text-xs); }
.chat-feed { position: relative; min-height: 0; flex: 1; display: flex; }
.chat-log {
  min-width: 0;
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--control-line) transparent;
}
.chat-log:focus-visible { outline-offset: -3px; }
.latest-messages {
  position: absolute;
  right: var(--s4);
  bottom: var(--s4);
  border-color: var(--control-line);
  border-radius: 2rem;
  background: var(--surface);
  color: var(--accent-ink);
  box-shadow: var(--float-shadow);
}
.latest-messages:hover { background: var(--accent-soft); }
.latest-messages:active { background: var(--accent-soft-hover); }
.latest-messages svg { transform: rotate(-90deg); }
.message-list {
  max-width: 61rem;
  margin: auto;
  padding: var(--s5) var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.day-divider { display: flex; align-items: center; gap: var(--s3); text-align: center; color: var(--quiet); font-size: var(--text-xs); font-weight: 650; }
.day-divider > span { margin-inline: auto; padding: var(--s1) var(--s3); }
.message { display: flex; align-items: flex-start; gap: var(--s2); min-width: 0; }
.message-avatar { margin-top: var(--s1); }
.message-body { min-width: 0; max-width: min(87%, 38rem); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); }
.message-body:has(.message-media) { width: min(22rem, 87%); }
.message-body:has(.voice-message) { width: min(19rem, 87%); }
.message-body:has(.circle-message) { width: min(12rem, 87%); }
.message-meta { display: flex; align-items: baseline; gap: var(--s2); color: var(--ink); font-size: var(--text-xs); }
.message-meta strong { font-weight: 750; overflow-wrap: anywhere; }
.message-meta time { color: var(--quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.message-actions { min-width: 2rem; min-height: 2rem; padding: 0 var(--s1); border: 0; border-radius: var(--round-sm); background: transparent; color: var(--muted); font-size: var(--text-lg); }
.message-actions:hover { background: var(--accent-soft); color: var(--accent-ink); }
.review-label { color: var(--accent-ink); }
.message-receipt { align-self: flex-end; color: var(--quiet); font-size: var(--text-xs); line-height: 1.3; font-weight: 600; }
.message-receipt.is-seen { color: var(--accent-ink); }
.bubble {
  max-width: 100%;
  margin: 0;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--round) var(--round) var(--round) var(--s1);
  background: var(--base);
  box-shadow: var(--bevel);
  color: var(--ink);
  font-size: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.is-own { justify-content: flex-end; }
.is-own .message-body { align-items: flex-end; }
.is-own .bubble { background: var(--red-surface); border-color: var(--accent-line); border-radius: var(--round) var(--round) var(--s1) var(--round); color: white; }
.is-own .bubble a { color: inherit; }
.is-own .bubble a:focus-visible { outline-color: white; }
.bubble time { margin-inline-start: var(--s1); color: var(--quiet); font-size: var(--text-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.is-own .bubble time { color: inherit; }
.message-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--round);
  overflow: hidden;
  background: var(--rail-raised);
  color: white;
  margin-block: var(--s1) 0;
}
.message-media img { display: block; width: 100%; height: 10.25rem; object-fit: cover; }
.message-media:hover img { filter: brightness(.93); }
video.message-media { max-height: 17rem; background: var(--base); }
.voice-message { display: block; width: 100%; }
.circle-message {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--base);
}
.circle-message video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.circle-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #0d0e10ce;
  color: #fff;
}
.media-expand { position: absolute; right: var(--s2); bottom: var(--s2); width: 1.75rem; height: 1.75rem; display: grid; place-items: center; background: #0d0e10dc; border-radius: var(--round-sm); }
.media-expand svg { width: .9375rem; height: .9375rem; }
.message-body > a[download]:not(.file-download) { font-size: var(--text-xs); padding: var(--s1) 0; }
.list-empty { padding: var(--s3); color: var(--muted); font-size: var(--text-sm); }
.message-list > .list-empty { margin: var(--s7) auto; text-align: center; }

.composer { position: relative; flex: none; padding: var(--s3) var(--s6); background: var(--side); }
.composer-row {
  display: flex;
  align-items: flex-end;
  gap: var(--s2);
}
.composer-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: var(--s1);
  padding-inline: var(--s1);
  border: 1px solid var(--control-line);
  border-radius: var(--pill);
  background: var(--field);
  box-shadow: var(--recess);
}
.composer-field:focus-within { border-color: var(--focus); }
.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  max-height: 7rem;
  padding: var(--s3) var(--s1);
  border: none;
  resize: none;
  field-sizing: content;
  border-radius: var(--round-sm);
  background: transparent;
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.35;
}
.composer-field .icon-button { color: var(--accent-ink); border-color: transparent; background: transparent; box-shadow: none; }
.composer-field .icon-button:hover, .composer-field .icon-button[aria-expanded="true"] { background: var(--accent-soft); }
#record-button, .send-button { min-width: var(--target); width: var(--target); min-height: var(--target); padding: 0; border-radius: 50%; }
.send-button svg { width: 1.125rem; height: 1.125rem; }
.composer-hint { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s2); color: var(--quiet); font-size: .6875rem; }
.composer-hint kbd { color: var(--muted); font: inherit; font-weight: 700; }
.composer-hint span { margin-inline: var(--s1); }
.emoji-menu {
  position: absolute;
  z-index: 2;
  right: var(--s4);
  bottom: calc(100% + var(--s2));
  width: min(21rem, calc(100% - var(--s8)));
  max-height: 46dvh;
  overflow: auto;
  padding: var(--s2);
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: var(--round);
  box-shadow: var(--float-shadow);
}
.picker-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1); margin-bottom: var(--s2); }
.picker-tabs button { min-height: 2.75rem; border: 1px solid var(--line); border-radius: var(--round-sm); background: var(--field); color: var(--muted); font-size: var(--text-sm); font-weight: 700; }
.picker-tabs button[aria-selected="true"] { border-color: var(--accent-ink); background: var(--accent-soft); color: var(--accent-ink); }
.emoji-grid, .sticker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); }
.emoji-option { min-height: 2.75rem; padding: var(--s1); background: transparent; border: 0; border-radius: var(--round-sm); font-size: var(--text-lg); }
.sticker-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.sticker-toolbar .button { min-height: 2.75rem; padding-inline: var(--s2); }
.sticker-option { display: grid; padding: var(--s1); border: 1px solid var(--line); border-radius: var(--round-sm); background: var(--field); color: var(--ink); }
.sticker-option .sticker-patch { padding-inline: 0; overflow-wrap: anywhere; }
.picker-tabs button:hover, .emoji-option:hover, .sticker-option:hover { background: var(--accent-soft); }
.picker-tabs button:active, .emoji-option:active, .sticker-option:active { background: var(--accent-soft-hover); }
.sticker-patch { display: inline-grid; place-items: center; align-content: center; gap: var(--s1); min-width: 0; padding: var(--s2) var(--s1); color: var(--ink); text-align: center; text-transform: uppercase; font: 850 var(--text-xs)/1.1 var(--display); }
.sticker-patch svg { width: var(--s7); height: var(--s7); fill: none; stroke: var(--accent-ink); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.message-sticker { width: min(9rem, 100%); min-height: 7rem; gap: var(--s2); padding: var(--s3); border: 2px dashed var(--accent-ink); border-radius: var(--round-lg); background: var(--accent-soft); font-size: var(--text-lg); }
.message-sticker svg { width: var(--s9); height: var(--s9); }
.imported-sticker { display: block; width: min(9rem, 100%); height: 9rem; object-fit: contain; }
.sticker-thumbnail { flex: none; width: var(--s8); height: var(--s8); object-fit: contain; }
.import-sticker { width: 100%; min-height: 2.75rem; margin-bottom: var(--s2); background: var(--field); border-color: var(--line); }
.draft-attachment .sticker-patch { display: inline-flex; gap: var(--s2); }
.draft-attachment .sticker-patch svg { width: var(--s5); height: var(--s5); }
.feedback:not(:empty) { margin-bottom: var(--s2); color: var(--error); font-size: var(--text-sm); }
.attachment-preview { margin-bottom: var(--s2); font-size: var(--text-sm); }
.reply-preview, .message-reply { border: 0; border-left: 3px solid #f35454; background: #22282d; color: inherit; border-radius: 6px; text-align: left; }
.reply-preview { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 8px; }
.reply-preview[hidden] { display: none; }
.reply-preview-copy, .message-reply { min-width: 0; }
.reply-preview-copy { flex: 1; }
.reply-preview-copy strong, .reply-preview-copy span, .message-reply strong, .message-reply span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-preview-copy strong, .message-reply strong { color: #ff7777; font-size: .8rem; }
.reply-preview-copy span, .message-reply span { font-size: .85rem; }
.message-reply { display: block; width: 100%; max-width: 100%; padding: 7px 10px; margin-bottom: 4px; }
button.message-reply { cursor: pointer; }
.message-reply:focus-visible { outline: 2px solid #ff7777; outline-offset: 2px; }
.reply-target { animation: reply-highlight 1.5s ease-out; }
@keyframes reply-highlight { from { filter: brightness(1.8); } to { filter: none; } }
@media (prefers-reduced-motion: reduce) { .reply-target { animation: none; } }
.draft-attachment { display: inline-flex; align-items: center; gap: var(--s2); max-width: 100%; background: var(--accent-soft); color: var(--accent-ink); padding-left: var(--s3); border-radius: var(--round-sm); }
.attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.details-pane { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.details-header { min-height: 4.75rem; padding: var(--s3) var(--s4) var(--s3) var(--s5); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--metal); }
.details-header h2 { font-size: var(--text-lg); letter-spacing: -.025em; font-weight: 750; }
.details-header .icon-button svg { width: 1.125rem; height: 1.125rem; }
.details-content { min-height: 0; padding: 0 var(--s5) var(--s5); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; }
.group-card { display: grid; justify-items: center; margin-top: var(--s4); padding: var(--s5) var(--s2); text-align: center; border: 1px solid var(--control-line); border-radius: var(--round-lg); background: var(--metal); box-shadow: var(--bevel); }
.group-icon {
  width: 5.5rem;
  height: 5.5rem;
  border: .375rem solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--metal) padding-box;
  box-shadow: inset 0 0 0 2px var(--side), inset 0 0 0 4px var(--accent), var(--bevel);
}
.group-icon img { width: 2.875rem; height: 2.875rem; object-fit: cover; object-position: center; border-radius: 50%; }
.group-icon svg { width: 1.875rem; height: 1.875rem; }
.group-card h3 { margin-top: var(--s2); font: 700 var(--text-xl)/1.15 var(--display); letter-spacing: -.035em; }
.group-card p { font-size: var(--text-xs); color: var(--quiet); margin-top: var(--s1); }
.members-section, .media-section { padding-top: var(--s4); }
.members-section { padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.members-section h3, .media-section h3 { display: flex; align-items: center; gap: var(--s2); font-size: var(--text-sm); font-weight: 750; }
.members-section h3 svg, .media-section h3 svg { width: 1rem; height: 1rem; color: var(--accent-ink); }
.media-scope { margin: var(--s1) 0 0 var(--s6); color: var(--muted); font-size: var(--text-xs); }
.members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.member { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.member .avatar { width: 1.75rem; height: 1.75rem; }
.member-copy { min-width: 0; display: grid; color: var(--muted); font-size: var(--text-xs); }
.member-copy strong { color: var(--ink); font-weight: 650; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.media-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s1);
  margin: var(--s3) 0;
  padding: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--round-sm);
  background: var(--rail-raised);
  box-shadow: var(--recess);
}
.media-tabs button { padding: var(--s1); min-height: 2rem; border: 1px solid transparent; border-radius: .375rem; background: transparent; color: var(--muted); font-size: var(--text-xs); font-weight: 650; }
.media-tabs button:hover { color: var(--accent-ink); background: var(--accent-soft); }
.media-tabs button[aria-pressed="true"] { color: var(--accent-ink); background: var(--metal); border-color: var(--control-line); box-shadow: var(--bevel), inset 0 -2px var(--accent); }
.media-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.media-gallery > .list-empty, .media-gallery > .shared-link { grid-column: 1 / -1; }
.media-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.35;
  padding: 0;
  border: none;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: var(--round-sm);
}
.media-tile img, .media-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile:hover { filter: brightness(.92); }
.media-tile > svg { position: relative; width: 2.25rem; height: 2.25rem; padding: var(--s2); border-radius: var(--round-sm); color: white; background: #0d0e10dc; }
.shared-link { display: flex; align-items: center; gap: var(--s2); padding: var(--s2); border: 1px solid var(--line); background: var(--surface); border-radius: var(--round-sm); font-size: var(--text-xs); }
.shared-link > span { min-width: 0; overflow-wrap: anywhere; }
.shared-link-copy { display: grid; gap: var(--s1); }
.shared-link-copy > span { color: var(--muted); }
.shared-link-icon { display: grid; flex: none; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: .375rem; background: var(--accent-soft); }
.shared-link-icon svg { width: 1rem; height: 1rem; }
.file-download { min-height: 2.75rem; max-width: 100%; color: var(--ink); text-decoration: none; }
.file-download:hover { background: var(--accent-soft); border-color: var(--accent-ink); }
.file-download:active { background: var(--accent-soft-hover); }
.file-download > svg { flex: none; width: var(--s4); height: var(--s4); margin-left: auto; color: var(--accent-ink); }

dialog {
  width: min(28rem, calc(100% - var(--s8)));
  max-height: calc(100dvh - var(--s8));
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--round-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--float-shadow);
}
dialog::backdrop { background: #080b0ec4; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.dialog-heading h2 { font: 700 var(--text-2xl)/1.1 var(--display); letter-spacing: -.035em; }
dialog p { color: var(--muted); margin: var(--s1) 0 var(--s4); }
dialog form { display: grid; gap: var(--s2); }
dialog label { font-weight: 650; font-size: var(--text-sm); }
dialog input { display: block; width: 100%; min-height: 2.75rem; padding: var(--s2) var(--s3); border: 1px solid var(--control-line); border-radius: var(--round-sm); background: var(--field); box-shadow: var(--recess); color: var(--ink); }
#report-reason { min-height: 2.75rem; padding: var(--s2); border: 1px solid var(--control-line); border-radius: var(--round-sm); background: var(--side); color: var(--ink); }
.block-list { list-style: none; padding: 0; }
.block-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); overflow-wrap: anywhere; }
dialog .button { justify-self: start; margin-top: var(--s2); }
.record-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.record-actions .button-secondary { background: var(--accent-soft); color: var(--accent-ink); }
.record-actions .button-secondary:hover { background: var(--accent-soft-hover); }
.record-preview audio, .record-preview video { display: block; width: 100%; }
.record-preview video { max-height: 42dvh; border-radius: var(--round-sm); background: var(--base); }
.record-preview .record-camera {
  width: min(12rem, 100%);
  max-height: none;
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  object-fit: cover;
  transform: scaleX(-1);
}
.record-timer { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); font-variant-numeric: tabular-nums; }
.record-dot { width: .625rem; height: .625rem; border-radius: 50%; background: var(--accent-ink); }
.viewer-dialog { width: min(55rem, calc(100% - var(--s8))); }
.viewer-dialog img, .viewer-dialog video { display: block; max-width: 100%; max-height: 72dvh; margin: auto; border-radius: var(--round-sm); }

@media (min-width: 821px) {
  .workspace[data-details="hidden"] { grid-template-columns: var(--left-width) minmax(0, 1fr); }
  .workspace[data-details="hidden"] .details-pane { display: none; }
}
@media (max-width: 1120px) {
  :root { --left-width: 16rem; --right-width: 15rem; }
  body { padding-inline: var(--s4); }
  .room-pane, .details-content { padding-inline: var(--s3); }
  .details-header, .chat-header, .message-search-wrap, .message-list, .composer { padding-inline: var(--s4); }
}
@media (max-width: 820px) {
  :root { --bar-height: 3.75rem; }
  body { padding: 0; }
  .topbar { display: none; }
  .topbar:has(.is-offline) { display: flex; justify-content: center; min-height: 0; padding: var(--s1); }
  .topbar .brand { display: none; }
  .workspace { display: block; border: 0; border-radius: 0; }
  .room-pane, .chat-pane, .details-pane { height: 100%; border-inline: 0; }
  .workspace:not([data-view="rooms"]) .room-pane,
  .workspace:not([data-view="chat"]) .chat-pane,
  .workspace:not([data-view="details"]) .details-pane { display: none; }
  .room-pane, .details-content { padding-inline: var(--s4); }
  .room-pane { padding-bottom: max(var(--s5), env(safe-area-inset-bottom)); }
  .room-dock { margin-inline: auto; width: min(100%, 26rem); }
  .room-list { margin-bottom: var(--s3); }
  .back-button { display: inline-grid; color: var(--accent-ink); }
  .chat-pane { background: var(--steel); }
  .composer { background: transparent; }
  .chat-header, .details-header { min-height: 4.125rem; padding-block: var(--s2); }
  .message-list { padding-block: var(--s4); }
  .composer { padding-bottom: max(var(--s4), env(safe-area-inset-bottom)); }
  .composer:not(:has(textarea:not(:placeholder-shown), .attachment-preview:not([hidden]))) .send-button,
  .composer:has(textarea:not(:placeholder-shown), .attachment-preview:not([hidden])) #record-button { display: none; }
  .composer textarea, .search-field input, dialog input { font-size: 1rem; }
  .composer-hint { display: none; }
  .media-tabs button { min-height: var(--target); }
  .media-gallery { max-width: 27rem; }
  .brand-note { display: none; }
}
@media (max-width: 720px) {
  .account-shell { width: min(100%, 29rem); min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .account-club { gap: var(--s1); padding-block: var(--s2) var(--s4); }
  .account-card h1 { margin-top: var(--s4); }
}
@media (max-width: 420px) {
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .brand-name { font-size: 1.2rem; }
  .composer, .message-list, .chat-header { padding-inline: var(--s3); }
  .chat-header { gap: var(--s2); }
  .chat-tools { gap: 0; }
  .chat-header > .room-icon { width: 2.125rem; height: 2.125rem; }
  .chat-header > .room-icon svg { width: 1.0625rem; height: 1.0625rem; }
  .chat-heading h1 { font-size: var(--text); }
  .message-media img { height: 8.75rem; }
  .account-entry { padding: var(--s3); }
  .account-method label { gap: var(--s1); }
  #account-fields { gap: var(--s3); }
  .sticker-option { padding-inline: 0; }
  .sticker-option .sticker-patch { font-size: .6875rem; }
  .latest-messages { right: var(--s3); bottom: var(--s3); }
}
.plans-tools, .chat-pins {
  padding-inline: clamp(.625rem, 2.4vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--field);
}
.plans-tools, .chat-pins summary, .event-reminder {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--target);
}
.plans-tools .button, .event-reminder .button { flex: none; }
#next-event, #chat-pins-preview { color: var(--quiet); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pins summary { cursor: pointer; list-style: none; }
.chat-pins summary::-webkit-details-marker { display: none; }
.chat-pins summary svg:first-child, .plans-tools svg, .event-reminder > svg { color: var(--accent-ink); }
.chat-pins summary svg:last-child { margin-left: auto; }
.chat-pins[open] summary svg:last-child { transform: rotate(180deg); }
#chat-pins-label { flex: none; font-weight: 700; font-size: var(--text-sm); }
#chat-pin-list { max-height: min(12rem, 25dvh); overflow: auto; margin: 0; padding: 0 var(--s1) var(--s2); list-style: none; }
#chat-pin-list button {
  width: 100%;
  min-height: var(--target);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-align: start;
  padding: var(--s2);
  overflow-wrap: anywhere;
}
#chat-pin-list button:hover { background: var(--surface); }
.message:focus { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--round); }
.event-message { margin-block-start: var(--s1); max-width: 100%; text-align: start; }
.funds-entry { align-self: stretch; margin: var(--s3) 0; justify-content: flex-start; text-align: left; gap: var(--s3); }
.funds-entry-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none; border: 1px solid var(--accent-line); border-radius: var(--round); color: var(--accent-ink); background: var(--accent-soft); }
.funds-entry-copy { display: grid; min-width: 0; line-height: 1.3; }
.funds-entry-copy > span { color: var(--quiet); font-size: var(--text-xs); font-weight: 400; }
.funds-entry-arrow { margin-left: auto; color: var(--quiet); }
dialog.funds-dialog { width: min(38rem, calc(100% - 1rem)); }
dialog .funds-subtitle, dialog .funds-hint, dialog .fund-meta {
  color: var(--quiet);
  font-size: var(--text-sm);
  margin: var(--s1) 0 var(--s2);
}
#funds-list { margin-top: var(--s4); }
.fund-card { padding: var(--s4); margin-bottom: var(--s3); border: 1px solid var(--line); border-radius: var(--round); background: var(--field); }
.fund-header { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.fund-header h3 { overflow-wrap: anywhere; }
.fund-total { white-space: nowrap; color: var(--accent-ink); }
dialog .fund-progress { margin: var(--s2) 0; color: var(--ink); font-weight: 650; font-size: var(--text-sm); }
dialog .fund-summary { margin: 0 0 var(--s2); color: var(--quiet); font-size: var(--text-xs); }
.fund-meter { height: .35rem; background: var(--line); border-radius: var(--pill); overflow: hidden; }
.fund-meter span { display: block; height: 100%; background: var(--accent-line); }
dialog .fund-event, dialog .fund-copy { margin: var(--s3) 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.fund-shares { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.fund-share { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); border-top: 1px solid var(--line); padding: var(--s2) 0; }
.fund-share > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.fund-share-amount { display: block; color: var(--muted); font-size: var(--text-sm); }
.fund-share-state { display: inline-block; margin-top: var(--s1); padding: .15rem .45rem; border: 1px solid var(--control-line); border-radius: var(--round-sm); color: var(--quiet); font-size: var(--text-xs); }
.fund-share-state.is-confirmed { color: var(--good); border-color: #498267; }
.fund-share-state.is-sent { color: #ffd3a5; border-color: #a8794c; }
.fund-share-actions { display: flex; flex-wrap: wrap; gap: var(--s1); justify-content: flex-end; }
.fund-share-actions .button { margin: 0; font-size: var(--text-sm); }
#funds-form { margin-top: var(--s3); }
#funds-form textarea, #funds-form select { width: 100%; min-height: var(--target); padding: var(--s2); color: var(--ink); background: var(--field); border: 1px solid var(--control-line); border-radius: var(--round-sm); font: inherit; }
#funds-form fieldset { border: 1px solid var(--line); border-radius: var(--round); padding: var(--s2) var(--s3); min-width: 0; }
#funds-form legend { font-weight: 650; }
#fund-members { display: grid; max-height: 13rem; overflow: auto; }
.funds-dialog .fund-member { display: flex; align-items: center; gap: var(--s2); min-height: var(--target); }
.funds-dialog .fund-member input { width: 1.2rem; height: 1.2rem; min-height: 0; flex: none; accent-color: var(--accent); }
#fund-hidden-members, #fund-visibility-members { display: grid; max-height: 13rem; overflow: auto; }
.fund-member:has(input:disabled) { opacity: .6; }
@media (max-width: 420px) {
  dialog.funds-dialog { padding: var(--s3); }
  #funds-form textarea, #funds-form select { font-size: 1rem; }
  .fund-share { align-items: flex-start; flex-direction: column; }
}
.event-reminder {
  width: 100%;
  max-width: 100rem;
  margin-inline: auto;
  padding: var(--s1) var(--s2);
  border-block: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
#event-reminder-text { flex: 1; min-width: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.event-reminder .icon-button { flex: none; }

dialog.calendar-dialog { width: min(34rem, calc(100% - 1rem)); }
.calendar-toolbar, .calendar-day-heading, .calendar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.calendar-actions { justify-content: flex-start; flex-wrap: wrap; }
.calendar-toolbar { margin-block: var(--s3) var(--s2); }
.calendar-toolbar h3, .calendar-day-heading h3 { font-size: var(--text); }
#calendar-month::first-letter, #calendar-date::first-letter { text-transform: uppercase; }
#calendar-prev svg { transform: rotate(180deg); }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .125rem; }
.calendar-week { text-align: center; margin-block-end: var(--s1); color: var(--quiet); font-size: var(--text-xs); }
.calendar-cell {
  position: relative;
  min-height: var(--target);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--round-sm);
  background: var(--field);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.calendar-cell:hover { background: var(--rail-raised); }
.calendar-cell[aria-current="date"] { border-color: var(--control-line); }
.calendar-cell[aria-pressed="true"] { border-color: var(--accent-line); color: var(--ink); background: var(--accent-soft); }
.calendar-cell.has-event::after {
  content: '';
  position: absolute;
  bottom: .23rem;
  left: calc(50% - .125rem);
  width: .25rem;
  height: .25rem;
  border-radius: 50%;
  background: var(--accent-ink);
}
.calendar-day-heading { margin-block-start: var(--s2); }
.calendar-day-heading .button { margin: 0; }
.calendar-event {
  padding: var(--s3);
  margin-block-end: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--round);
  background: var(--field);
  overflow-wrap: anywhere;
}
.calendar-event h4 { display: inline; font-size: var(--text); }
.calendar-time { margin-inline-end: var(--s2); font-variant-numeric: tabular-nums; color: var(--accent-ink); font-weight: 700; }
dialog .calendar-event p { margin-block: var(--s1) 0; }
.calendar-note { white-space: pre-wrap; }
.calendar-hint { font-size: var(--text-sm); color: var(--quiet); }
.calendar-dialog .account-error:empty { display: none; }
#calendar-form { margin-top: var(--s3); }
#calendar-form p { margin-block: 0; }
.calendar-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2); }
#calendar-form input { min-width: 0; }
#calendar-form textarea, #calendar-form select {
  width: 100%;
  min-height: var(--target);
  padding: var(--s2);
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--control-line);
  border-radius: var(--round-sm);
  font: inherit;
}
@media (max-width: 420px) {
  dialog.calendar-dialog { padding: var(--s3); }
  #calendar-form textarea, #calendar-form select { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
