:root {
  font-family: var(--paus-font);
  color: var(--paus-text);
  background: var(--paus-background);
  font-synthesis: none;
  color-scheme: light;
  --krets-soft: #f0f1f5;
  --krets-avatar: #e4e9f9;
  --krets-muted: var(--paus-secondary);
  --krets-on-accent: #ffffff;
  --krets-line: #e6e7ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  -webkit-text-size-adjust: 100%;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--paus-accent);
  cursor: pointer;
  touch-action: manipulation;
  padding: 10px 12px;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--paus-accent);
  outline-offset: 3px;
}
a {
  color: var(--paus-accent);
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  font-weight: 720;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
  font-weight: 680;
}
h3 {
  font-size: 16px;
  margin: 16px 0 8px;
}
small {
  font-size: 13px;
  color: var(--krets-muted);
}
.shell {
  max-width: 620px;
  margin: 0 auto;
  padding: calc(8px + env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    calc(40px + env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
.krets-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 6px;
}
.krets-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.krets-brand img {
  flex-shrink: 0;
}
.krets-nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.icon-button {
  width: 44px;
  height: 44px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--paus-text);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.page-heading h1 {
  overflow-wrap: anywhere;
}
.page-heading p {
  color: var(--krets-muted);
  font-size: 14px;
  margin-top: 7px;
  line-height: 1.5;
}
.primary {
  background: var(--paus-accent);
  color: var(--krets-on-accent);
  font-weight: 650;
  padding: 10px 16px;
  min-height: 44px;
}
.primary:active {
  background: var(--paus-accent-pressed);
}
.secondary {
  background: var(--paus-tint);
  color: var(--paus-accent);
  font-weight: 600;
}
.full {
  display: block;
  width: 100%;
  margin-top: 12px;
}
.text-button {
  padding-inline: 0;
  font-weight: 600;
}
.muted {
  font-size: 13px;
  color: var(--krets-muted);
  line-height: 1.6;
  margin-block: 12px;
}
.danger {
  color: var(--paus-error);
}
.avatar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--krets-avatar);
  color: var(--paus-accent);
  font-size: 15px;
  font-weight: 650;
  flex-shrink: 0;
  letter-spacing: -0.4px;
}
.avatar.small {
  width: 36px;
  height: 36px;
  font-size: 12px;
}
.stories .story-compose {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.own-story {
  position: relative;
  display: block;
  padding: 5px;
}
.own-story .avatar {
  width: 44px;
  height: 44px;
}
.compose-plus {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 23px;
  height: 23px;
  border: 2px solid var(--paus-background);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--krets-on-accent);
  background: var(--paus-accent);
}
.compose-plus svg {
  width: 15px;
  height: 15px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.section-heading h2 {
  font-size: 16px;
}
.section-heading > span {
  font-size: 12px;
  color: var(--krets-muted);
}
.stories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 3px 6px;
  scrollbar-width: none;
}
.stories button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 72px;
  max-width: 76px;
  padding: 0;
  color: var(--paus-text);
  flex-shrink: 0;
}
.story-ring {
  display: block;
  border: 2px solid var(--paus-accent);
  padding: 3px;
  border-radius: 50%;
}
.story-ring .avatar {
  width: 38px;
  height: 38px;
  font-size: 13px;
}
.story-name {
  font-size: 12px;
  width: 72px;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.since-last {
  margin-bottom: 4px;
}
.feed-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.feed-controls > span {
  font-size: 12px;
  color: var(--krets-muted);
}
.segments {
  display: inline-flex;
  padding: 3px;
  border-radius: 13px;
  background: var(--krets-soft);
}
.segments button {
  padding: 8px 16px;
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--krets-muted);
}
.segments button[aria-pressed='true'] {
  background: var(--paus-surface);
  color: var(--paus-text);
  box-shadow: 0 1px 3px #20242d10;
  font-weight: 650;
}
.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post {
  background: var(--paus-surface);
  border: 1px solid var(--krets-line);
  border-radius: 16px;
  overflow: hidden;
}
.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
  gap: 8px;
}
.person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: var(--paus-text);
  text-align: left;
  min-width: 0;
}
.person > span:last-child {
  min-width: 0;
}
.person strong {
  font-size: 15px;
  display: block;
  overflow-wrap: anywhere;
}
.post-time {
  font-size: 12px;
  color: var(--krets-muted);
  display: block;
  margin-top: 2px;
  line-height: 1.3;
}
.new-tag {
  font-size: 11px;
  font-weight: 650;
  background: var(--paus-tint);
  color: var(--paus-accent);
  padding: 5px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}
.post-circles {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--krets-muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.post-circles svg {
  width: 13px;
  height: 13px;
  margin-top: 1px;
}
.person .avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.post-text {
  padding: 6px 12px 8px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}
.media-grid.single {
  grid-template-columns: 1fr;
}
.media {
  background: var(--krets-soft);
  min-height: 160px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.media img,
.media video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: contain;
}
.media > span {
  font-size: 13px;
  color: var(--krets-muted);
  padding: 12px;
}
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 4px;
  padding: 0 6px 2px;
}
.post-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px;
}
.post-actions svg {
  width: 21px;
  height: 21px;
}
.caught-up {
  text-align: center;
  padding: 36px 16px 8px;
  color: var(--krets-muted);
}
.done-icon {
  display: inline-grid;
  place-items: center;
  background: var(--paus-tint);
  color: var(--paus-accent);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin-bottom: 12px;
}
.caught-up h2 {
  font-size: 17px;
  color: var(--paus-text);
  margin-bottom: 7px;
}
.caught-up p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 270px;
  margin: auto;
}
.caught-up .text-button {
  font-size: 13px;
  margin-top: 8px;
}
.load-more {
  width: 100%;
  margin-top: 16px;
  background: var(--paus-surface);
  border: 1px solid var(--krets-line);
}
.scope-back {
  font-size: 14px;
  margin-top: -12px;
  margin-bottom: 12px;
}
.empty {
  text-align: center;
  padding: 48px 12px;
}
.empty p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--krets-muted);
  max-width: 330px;
  margin: 12px auto 24px;
}
.empty h2 {
  font-size: 22px;
}
.empty-symbol {
  width: 64px;
  height: 64px;
  background: var(--paus-tint);
  color: var(--paus-accent);
  display: inline-grid;
  place-items: center;
  border-radius: 20px;
  margin-bottom: 20px;
}
.empty-symbol svg {
  width: 30px;
  height: 30px;
}
.first-circle {
  padding-top: 40px;
}
.sign-in {
  padding-top: 48px;
}
.app-mark {
  display: block;
  margin: 0 auto 24px;
  border-radius: 18px;
}
.sign-in h1 {
  font-size: 28px;
  line-height: 1.25;
}
.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px !important;
}
.privacy-note svg {
  width: 14px;
  height: 14px;
}
.invite-note,
.invite-banner {
  background: var(--paus-tint);
  border-radius: 14px;
  padding: 16px;
}
.invite-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.invite-banner > div {
  flex: 1;
  min-width: 150px;
}
.invite-banner p {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
}
.invite-banner > svg {
  color: var(--paus-accent);
}
.error,
.offline {
  color: var(--paus-error);
  background: var(--paus-error-surface);
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.error-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.error-row button {
  color: inherit;
}
.notice {
  font-size: 13px;
  color: var(--paus-accent);
  background: var(--paus-tint);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.loading {
  padding: 40px 16px;
  text-align: center;
  color: var(--krets-muted);
  font-size: 14px;
}
.sheet {
  width: min(560px, calc(100% - 32px));
  max-height: calc(var(--viewport-height, 100dvh) - 48px);
  border: 1px solid var(--krets-line);
  border-radius: 22px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--paus-surface);
  color: var(--paus-text);
  overscroll-behavior: contain;
}
.sheet::backdrop {
  background: #15192365;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 -4px 12px 0;
  gap: 12px;
}
.sheet-head h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
:is(.sheet, .form-surface) label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
:is(.sheet, .form-surface) input:not([type='checkbox']):not([type='file']),
:is(.sheet, .form-surface) textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--paus-border);
  background: var(--paus-background);
  color: var(--paus-text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  margin-bottom: 12px;
}
:is(.sheet, .form-surface) textarea {
  resize: vertical;
  line-height: 1.45;
  max-height: 50dvh;
}
:is(.sheet, .form-surface) fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
:is(.sheet, .form-surface) legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.recipient-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 180px;
  overflow-y: auto;
  padding: 3px;
}
.recipient-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--paus-border);
  border-radius: 12px;
  margin: 0;
  cursor: pointer;
  min-height: 48px;
  overflow-wrap: anywhere;
}
.recipient-list label.chosen {
  border-color: var(--paus-accent);
  background: var(--paus-tint);
}
.recipient-list input {
  width: 20px;
  height: 20px;
  accent-color: var(--paus-accent);
  flex-shrink: 0;
}
.recipient-list small {
  display: block;
  margin-top: 3px;
  font-weight: 400;
}
.attach-button {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  color: var(--paus-accent);
  background: var(--paus-tint);
  border-radius: 12px;
  cursor: pointer;
  margin-block: 12px !important;
  overflow: hidden;
}
.attach-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.attach-button:focus-within {
  outline: 3px solid var(--paus-accent);
  outline-offset: 3px;
}
.attachments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.attachments > div {
  position: relative;
  height: 100px;
  background: var(--krets-soft);
  border-radius: 12px;
  overflow: hidden;
}
.attachments img,
.attachments video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attachments button {
  position: absolute;
  right: 2px;
  top: 2px;
  color: var(--paus-text);
  background: var(--paus-surface);
  border-radius: 50%;
}
.list {
  border: 1px solid var(--krets-line);
  border-radius: 14px;
  overflow: hidden;
  margin: 12px 0 20px;
}
.circle-row,
.thread {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding: 14px;
  color: var(--paus-text);
  border-radius: 0;
}
.list > * + * {
  border-top: 1px solid var(--krets-line);
}
.circle-row > span:nth-child(2),
.member-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.circle-row strong,
.member-row strong,
.thread strong {
  font-size: 14px;
  display: block;
}
.circle-row small,
.member-row small {
  display: block;
  margin-top: 4px;
}
.circle-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--paus-tint);
  border-radius: 12px;
  color: var(--paus-accent);
}
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  flex-wrap: wrap;
}
.member-row summary {
  font-size: 12px;
  color: var(--paus-accent);
  padding: 12px 0;
  cursor: pointer;
  min-height: 44px;
}
.member-row details[open] {
  flex-basis: 100%;
}
.member-row details button {
  display: block;
  text-align: left;
}
.invitation-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  font-size: 13px;
}
.invitation-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.invitation-row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.invitation-row button {
  font-size: 12px;
  flex-shrink: 0;
}
.invitation-result {
  padding: 16px;
  border-radius: 14px;
  background: var(--paus-tint);
  margin: 16px 0;
}
.compact {
  padding: 24px 0;
}
.compact > svg {
  width: 36px;
  height: 36px;
  color: var(--paus-accent);
}
.compact h3 {
  margin-top: 12px;
}
.compact p {
  margin-bottom: 0;
}
.thread > span:last-child {
  min-width: 0;
  flex: 1;
}
.thread-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  margin: 5px 0;
  color: var(--krets-muted);
}
.thread small {
  font-size: 12px;
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 40dvh;
  overflow-y: auto;
  margin: 20px 0;
  padding: 4px;
}
.bubble {
  align-self: flex-start;
  max-width: 88%;
  background: var(--krets-soft);
  padding: 8px 12px;
  border-radius: 14px;
}
.bubble.own {
  align-self: flex-end;
  background: var(--paus-tint);
}
.bubble p {
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble time {
  font-size: 11px;
  display: block;
  margin-top: 6px;
  color: var(--krets-muted);
}
.circle-settings {
  margin: 16px 0;
}
.circle-settings summary {
  min-height: 44px;
  padding: 12px 0;
  font-size: 14px;
  color: var(--paus-accent);
  cursor: pointer;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 600px) {
  .sheet {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    max-height: calc(
      var(--viewport-height, 100dvh) - 24px - env(safe-area-inset-top)
    );
    border-radius: 22px 22px 0 0;
    padding: 12px max(16px, env(safe-area-inset-right))
      calc(16px + env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  .sheet-head {
    position: sticky;
    top: -12px;
    background: var(--paus-surface);
    z-index: 2;
    padding-top: 4px;
    padding-bottom: 8px;
  }
  .sheet::backdrop {
    background: #15192365;
  }
}
@media (max-width: 359px) {
  .shell {
    padding-inline: 12px;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .post-actions button {
    font-size: 13px;
    padding: 8px 6px;
  }
  .post-head {
    padding-inline: 12px;
  }
  .post-text {
    padding-inline: 12px;
  }
  .post-circles {
    padding-left: 8px;
  }
  .stories {
    gap: 12px;
  }
  .segments button {
    padding-inline: 16px;
  }
}
@media (prefers-color-scheme: dark) {
  html[data-theme='system'] {
    color-scheme: dark;
    --krets-on-accent: #17181c;
    --paus-background: #17181c;
    --paus-surface: #23252b;
    --paus-text: #f3f4f8;
    --paus-secondary: #b3b8c4;
    --paus-accent: #9ab5ff;
    --paus-accent-pressed: #b4c8ff;
    --paus-tint: #2d3956;
    --paus-border: #626875;
    --paus-error: #ffb5aa;
    --paus-error-surface: #452d2c;
    --krets-soft: #2b2e35;
    --krets-avatar: #303c60;
    --krets-line: #3b3f49;
  }
  .primary {
    color: #17181c;
  }
  .segments {
    background: var(--krets-line);
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background-color 150ms ease;
  }
  .sheet[open] {
    animation: appear 180ms ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.read-more {
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  margin-top: -8px;
}
.media-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
}
.media-open:focus-visible {
  outline-offset: -4px;
}
.video-load {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  font-size: 14px;
  font-weight: 600;
}
.video-content {
  width: 100%;
}
.video-content video {
  width: 100%;
  max-height: 500px;
  display: block;
}
.video-content p {
  padding: 12px;
  margin: 0;
}
.detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-author strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.detail-author time {
  display: block;
  font-size: 12px;
  color: var(--krets-muted);
  margin-top: 4px;
}
.detail-circles {
  font-size: 13px;
  color: var(--paus-accent);
  margin: 12px 0 20px;
  overflow-wrap: anywhere;
}
.detail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
  font-size: 16px;
  margin-bottom: 20px;
}
.detail-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-media .media {
  border-radius: 12px;
}
.invite-banner p {
  overflow-wrap: anywhere;
}
.invite-banner .switch-account {
  font-size: 13px;
  padding-bottom: 0;
}
.invitation-result h3 {
  margin: 0 0 8px;
}
.invitation-row {
  flex-wrap: wrap;
}
.invitation-row > span {
  flex: 1 1 150px;
}

/* Three equal destinations keep people and conversations easy to find. */
.app-views {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 4px;
  background: var(--paus-surface);
  border: 1px solid var(--krets-line);
  box-shadow: 0 4px 24px #20242d18;
  border-radius: 22px;
  padding: 4px;
  margin: 0;
  position: fixed;
  inset: auto 12px calc(10px + env(safe-area-inset-bottom));
  max-width: 588px;
  margin-inline: auto;
  z-index: 3;
}
.app-views[hidden] {
  display: none;
}
.signed-in-shell {
  padding-bottom: calc(
    var(--bottom-navigation-height, 76px) + 28px + env(safe-area-inset-bottom)
  );
}
.app-views button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--krets-muted);
  min-width: 0;
}
.app-views button > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.app-views svg {
  width: 18px;
  height: 18px;
}
.app-views button[aria-pressed='true'] {
  background: var(--paus-tint);
  color: var(--paus-accent);
  box-shadow: 0 1px 3px #20242d10;
}
.feed-controls .segments {
  flex-shrink: 0;
}
.feed-controls select {
  min-width: 0;
  max-width: 55%;
  min-height: 44px;
  padding: 8px 26px 8px 10px;
  border: 1px solid var(--paus-border);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  text-overflow: ellipsis;
  color: var(--paus-text);
  background: var(--paus-surface);
}
select:focus-visible {
  outline: 3px solid var(--paus-accent);
  outline-offset: 3px;
}
.feed-order {
  color: var(--krets-muted);
  font-size: 12px;
  text-align: right;
  margin: 8px 0 12px;
}
.workspace-panel .list {
  background: var(--paus-surface);
  border-radius: 18px;
}
.create-circle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--paus-surface);
  border: 1px solid var(--krets-line);
  border-radius: 18px;
  padding: 16px;
  margin-top: 16px;
}
.create-circle label {
  flex-basis: 100%;
  margin: 0;
}
.form-surface .create-circle input {
  flex: 1 1 140px;
  min-width: 0;
  width: 0;
  margin: 0;
}
.create-circle .primary {
  width: auto;
  margin: 0;
  font-size: 14px;
}
.circle-row {
  padding: 12px;
}
.circle-row strong,
.thread strong {
  font-size: 15px;
}
.circle-row > svg {
  color: var(--krets-muted);
  width: 18px;
  height: 18px;
}
.circle-symbol {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.thread {
  min-height: 72px;
}
.thread .avatar {
  width: 40px;
  height: 40px;
}
.invitation-row {
  flex-wrap: wrap;
}
.invitation-row > span {
  flex: 1 1 100%;
}
.invitation-row button {
  flex: 1;
}

/* Conversation takes the available screen, with a separate scrolling history. */
.conversation-sheet[open] {
  display: flex;
  flex-direction: column;
  height: min(760px, calc(var(--viewport-height, 100dvh) - 48px));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
}
.conversation-sheet .sheet-head {
  flex-shrink: 0;
  margin-bottom: 12px;
}
.chat-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.chat-person h2 {
  font-size: 17px;
}
.chat-person span:not(.avatar) {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  color: var(--krets-muted);
  margin-top: 3px;
}
.chat-person svg {
  width: 12px;
  height: 12px;
}
.chat-context {
  flex-shrink: 0;
  border-block: 1px solid var(--krets-line);
  padding: 12px 0;
}
.chat-context > span {
  font-size: 12px;
  color: var(--krets-muted);
  overflow-wrap: anywhere;
}
.chat-context p {
  font-size: 14px;
  line-height: 1.45;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.conversation-sheet .messages {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 16px 2px;
  overscroll-behavior: contain;
}
.bubble {
  border-radius: 16px 16px 16px 4px;
}
.bubble.own {
  border-radius: 16px 16px 4px 16px;
  background: var(--paus-accent);
  color: var(--krets-on-accent);
}
.bubble.own time {
  color: inherit;
}
.chat-composer {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--krets-line);
  flex-wrap: wrap;
}
.sheet .chat-composer textarea {
  flex: 1;
  width: 0;
  min-width: 0;
  margin: 0;
  min-height: 48px;
  max-height: 25dvh;
  border-radius: 20px;
  resize: vertical;
  padding: 10px 14px;
}
.chat-send {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 13px;
}
.chat-composer .error {
  order: -1;
  flex-basis: 100%;
  margin: 0;
}
@media (max-width: 600px) {
  .conversation-sheet[open] {
    height: calc(
      var(--viewport-height, 100dvh) - 12px - env(safe-area-inset-top)
    );
    max-height: calc(
      var(--viewport-height, 100dvh) - 12px - env(safe-area-inset-top)
    );
  }
}
@media (max-width: 359px) {
  .app-views button {
    font-size: 12px;
  }
  .app-views button > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .app-views svg {
    width: 16px;
    height: 16px;
  }
}

.quick-compose {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--paus-surface);
  border: 1px solid var(--krets-line);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 8px;
  text-align: left;
  font-size: 15px;
  color: var(--krets-muted);
}
.quick-compose > span:nth-child(2) {
  flex: 1;
}
.quick-compose > svg {
  color: var(--paus-accent);
}
.chat-context {
  max-height: 28%;
  overflow-y: auto;
}

.feed-scope {
  font-size: 18px;
  line-height: 1.3;
  margin: 10px 0;
}
.post-actions {
  color: var(--paus-text);
}
.post-actions button {
  color: inherit;
  min-width: 44px;
  justify-content: center;
}
.post-actions button[aria-pressed='true'] {
  color: var(--paus-accent);
  font-weight: 650;
}
.post-actions button[aria-pressed='true'] svg {
  fill: currentColor;
}
.post-actions .mark-read {
  color: var(--krets-muted);
  margin-left: auto;
}
.post-menu {
  position: relative;
  flex-shrink: 0;
}
.post-menu summary {
  list-style: none;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  color: var(--krets-muted);
  cursor: pointer;
}
.post-menu summary::-webkit-details-marker {
  display: none;
}
.post-menu > div {
  position: absolute;
  right: 0;
  top: 40px;
  min-width: 140px;
  border: 1px solid var(--paus-border);
  border-radius: 12px;
  padding: 4px;
  background: var(--paus-surface);
  box-shadow: 0 4px 16px #20242d20;
  z-index: 2;
}
.post-menu button {
  display: block;
  width: 100%;
  text-align: left;
}
.thread-source {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--krets-soft);
  border-left: 2px solid var(--paus-accent);
  border-radius: 4px 8px 8px 4px;
  padding: 8px;
  margin: 8px 0;
}
.thread-source > svg {
  width: 16px;
  height: 16px;
  color: var(--krets-muted);
  margin-top: 2px;
}
.thread-source > span {
  min-width: 0;
}
.thread-source-label,
.thread-source-circles {
  display: block;
  font-size: 12px;
  color: var(--krets-muted);
  overflow-wrap: anywhere;
}
.thread-source-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.thread-source-circles {
  line-height: 1.4;
}
/* Comments use a scrolling list and a persistent, single-row composer. */
.comments-sheet[open] {
  display: flex;
  flex-direction: column;
  height: min(640px, calc(var(--viewport-height, 100dvh) * 0.76));
  overflow: hidden;
}
.comments-sheet .sheet-head {
  flex-shrink: 0;
  position: relative;
  top: auto;
  margin-bottom: 4px;
  padding: 0;
  min-height: 44px;
  gap: 0;
}
.comments-sheet #sheet-title {
  flex: 1;
  text-align: left;
}
.sheet-head > .icon-button svg {
  width: 20px;
  height: 20px;
}
.comment-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--krets-line);
}
.comment-context > div {
  min-width: 0;
  flex: 1;
}
.comment-context p {
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.comment-context strong {
  margin-right: 4px;
}
.comment-context small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  color: var(--krets-muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.comments-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 0;
}
.comment {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
}
.comment > .avatar {
  width: 32px;
  height: 32px;
}
.comment > div {
  flex: 1;
  min-width: 0;
}
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
}
.comment strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.comment p {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 2px;
}
.comment time {
  font-size: 12px;
  color: var(--krets-muted);
}
.comment > .icon-button {
  margin-top: -6px;
  margin-right: -8px;
}
.comment > .icon-button svg {
  width: 16px;
  height: 16px;
}
.comment-form {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 8px;
  border-top: 1px solid var(--krets-line);
  padding-top: 10px;
}
.comment-form > .avatar {
  align-self: center;
  width: 32px;
  height: 32px;
}
.sheet .comment-form textarea {
  flex: 1;
  width: 0;
  min-width: 0;
  min-height: 44px;
  max-height: min(100px, 20dvh);
  margin: 0;
  padding: 10px 12px;
  border-radius: 20px;
  resize: none;
  line-height: 1.4;
}
.comment-send {
  width: 44px;
  height: 44px;
  padding: 10px;
  flex-shrink: 0;
}
.comments-list:focus-visible {
  outline: 2px solid var(--paus-accent);
  outline-offset: -2px;
}
@media (max-height: 600px) {
  .comments-sheet[open] {
    height: calc(
      var(--viewport-height, 100dvh) - 12px - env(safe-area-inset-top)
    );
    max-height: calc(
      var(--viewport-height, 100dvh) - 12px - env(safe-area-inset-top)
    );
  }
}
.comments-sheet > .error {
  flex-shrink: 0;
  margin-block: 4px;
  max-height: 20%;
  overflow-y: auto;
}

.thread {
  align-items: flex-start;
}
.thread > .avatar {
  margin-top: 2px;
}

.avatar {
  position: relative;
  overflow: hidden;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.profile-photo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.profile-photo > .avatar {
  width: 56px;
  height: 56px;
  font-size: 20px;
}
.profile-photo .muted {
  margin: 4px 0 0;
}
.profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.profile-shortcut {
  padding: 4px;
}

.message-source {
  align-self: stretch;
  border-left: 2px solid var(--paus-accent);
  border-radius: 4px 10px 10px 4px;
  background: var(--krets-soft);
  margin: 8px 12px 0;
  padding: 10px 12px;
}
.message-source > span {
  font-size: 12px;
  color: var(--krets-muted);
}
.message-source > span::before {
  content: 'Svar på uppdatering · ';
}
.message-source p {
  font-size: 14px;
  line-height: 1.4;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.message-source small {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.reply-target {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  max-height: 28%;
  overflow-y: auto;
  padding: 10px 12px;
  margin-top: 8px;
  border-left: 2px solid var(--paus-accent);
  border-radius: 4px 10px 10px 4px;
  background: var(--krets-soft);
}
.reply-target > div {
  flex: 1;
  min-width: 0;
}
.reply-target span {
  font-size: 12px;
  color: var(--krets-muted);
}
.reply-target p {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.older-messages {
  flex-shrink: 0;
  align-self: center;
  font-size: 13px;
  font-weight: 600;
}

/* The editor owns the available viewport; audience selection is a separate step. */
.composer-sheet[open] {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: auto 0 auto;
  top: calc(var(--viewport-top, 0px) + 16px);
  margin: 0 auto;
  height: min(760px, calc(var(--viewport-height, 100dvh) - 32px));
  max-height: calc(var(--viewport-height, 100dvh) - 32px);
  overflow: hidden;
}
.composer-sheet .sheet-head {
  position: static;
  flex-shrink: 0;
  margin-bottom: 0;
  padding-block: 0;
}
.compose-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.compose-audience {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-align: left;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--krets-line);
  border-radius: 0;
  font-size: 14px;
}
.compose-audience[hidden],
.compose-editor[hidden] {
  display: none;
}
.compose-audience > span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compose-audience svg {
  width: 18px;
  height: 18px;
}
.compose-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  padding-block: 12px;
}
.composer-sheet .compose-editor textarea {
  flex: 1;
  min-height: 0;
  height: 0;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--paus-surface);
  padding: 4px;
  font-size: 17px;
  line-height: 1.5;
  resize: none;
  scroll-padding-block: 12px;
}
.composer-sheet .compose-editor textarea:focus-visible {
  outline: none;
  box-shadow: inset 0 -2px var(--paus-accent);
}
.composer-sheet .attachments {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
}
.composer-sheet .attachments > div {
  flex: 0 0 76px;
  height: clamp(44px, calc(var(--viewport-height, 100dvh) * 0.12), 68px);
}
.compose-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--krets-line);
}
.composer-sheet .compose-toolbar .attach-button {
  margin: 0 !important;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
}
.compose-toolbar .primary {
  font-size: 14px;
  margin: 0;
}
.compose-picker {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-block: 12px !important;
}
.compose-picker .recipient-list {
  max-height: none;
  overflow: visible;
}
.compose-toolbar .picker-done {
  margin-left: auto;
}
.compose-form > .error,
.composer-sheet > .offline {
  padding: 8px;
  font-size: 13px;
  line-height: 1.4;
  flex-shrink: 0;
  max-height: 22%;
  overflow-y: auto;
  margin-block: 4px;
}
@media (max-width: 600px) {
  .composer-sheet[open] {
    top: calc(var(--viewport-top, 0px) + 8px + env(safe-area-inset-top));
    height: calc(
      var(--viewport-height, 100dvh) - 8px - env(safe-area-inset-top)
    );
    max-height: calc(
      var(--viewport-height, 100dvh) - 8px - env(safe-area-inset-top)
    );
    border-radius: 18px 18px 0 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

.app-views button {
  position: relative;
  flex-direction: column;
  gap: 3px;
  padding: 6px 2px;
  min-height: 52px;
  font-size: 12px;
}
.app-views button svg {
  width: 20px;
  height: 20px;
}
.tab-icon {
  position: relative;
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.tab-badge {
  position: absolute;
  top: -5px;
  left: 14px;
  min-width: 17px;
  font-size: 11px;
  line-height: 1.4;
  padding: 1px 5px;
  border-radius: 9px;
  text-align: center;
  white-space: nowrap;
  background: var(--paus-accent);
  color: var(--krets-on-accent);
}
.thread-unread {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  color: var(--paus-accent);
  margin-right: 8px;
}
.notification-choice {
  display: flex !important;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin: 0 !important;
  padding-block: 8px;
  font-size: 15px !important;
}
.notification-choice input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--paus-accent);
}
.notification-choice span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.notification-settings fieldset {
  margin-top: 12px !important;
}
.notification-settings legend {
  margin-bottom: 0 !important;
}
