/*
 * RelayTree UI settings
 * Icon source: C:/Users/6800XT/Desktop/?뚯씠??apps/src/icons
 * Runtime path: /icons/<file>, served by server.py.
 */
:root {
  color-scheme: light;
  --icon-menu: url("/icons/menu-svgrepo-com.svg");
  --icon-home: url("/icons/home-svgrepo-com.svg");
  --icon-reels: url("/icons/clapperboard-play-svgrepo-com.svg");
  --icon-chat: url("/icons/message-pending-svgrepo-com.svg");
  --icon-search: url("/icons/search-alt-1-svgrepo-com.svg");
  --icon-heart: url("/icons/heart-alt-svgrepo-com.svg");
  --icon-pen: url("/icons/user-pen-alt-1-svgrepo-com.svg");
  --icon-image: url("/icons/image-plus-svgrepo-com.svg");
  --icon-gif: url("/icons/gif-svgrepo-com.svg");
  --icon-link: url("/icons/link-alt-1-svgrepo-com.svg");
  --icon-import: url("/icons/import-svgrepo-com.svg");
  --icon-edit: url("/icons/edit-2-svgrepo-com.svg");
  --icon-select: url("/icons/check-svgrepo-com.svg");
  --icon-camera: url("/icons/file-arrow-up-alt-svgrepo-com.svg");
  --icon-tag: url("/icons/tag-svgrepo-com.svg");
  --icon-quote: url("/icons/quote-svgrepo-com.svg");
  --icon-view-list: url("/icons/view-list-svgrepo-com.svg");
  --icon-view-rows: url("/icons/view-rows-svgrepo-com.svg");
  --icon-view-card: url("/icons/square-svgrepo-com.svg");
  --icon-moon-space: url("/icons/moon-space-svgrepo-com.svg");
  --icon-hierarchy: url("/icons/hierarchy-svgrepo-com.svg");
  --icon-dot-menu: url("/icons/dot-menu-more-2-svgrepo-com.svg");
  --icon-arrow-area-down: url("/icons/arrow-area-down-short-wide-svgrepo-com.svg");
  --icon-arrow-area-up: url("/icons/arrow-area-up-short-wide-svgrepo-com.svg");
  --icon-up-double: url("/icons/up-double-svgrepo-com.svg");
  --icon-torch-runner: url("/icons/man-running-with-olympic-torch-svgrepo-com.svg");
  --icon-filter: url("/icons/filter-svgrepo-com.svg");
  --icon-sort: url("/icons/sort-1-svgrepo-com.svg");
  --icon-category: url("/icons/category-svgrepo-com.svg");

  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #0f1419;
  --muted: #536471;
  --line: #eff3f4;
  --line-strong: #d8e1e6;
  --soft: #f7f9f9;
  --accent: #1d9bf0;
  --accent-dark: #1a8cd8;
  --accent-soft: #e8f5fd;
  --danger: #b4232f;
  --spark: #00935f;
  --spark-soft: #e6f6ef;
  --captivated: #9a7411;
  --captivated-soft: #fdf3d7;
  --rail-width: 58px;
  --rail-expanded-width: 168px;
  --topbar-height: 66px;
  --timeline-width: 990px;
  --reader-width: 820px;
  --reader-dynamic-width: min(100%, var(--reader-width));
  --reader-dynamic-left: max(0px, calc((100vw - var(--reader-width)) / 2));
  --shadow: 0 16px 48px rgba(15, 20, 25, 0.12);
  --app-font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--app-font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.relaytree-app {
  min-height: 100vh;
}

.app-icon {
  --icon-size: 22px;
  width: var(--icon-size);
  height: var(--icon-size);
  display: inline-block;
  flex: 0 0 var(--icon-size);
  background-color: transparent;
  background-image: var(--icon-url);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.icon-menu { --icon-url: var(--icon-menu); }
.icon-home { --icon-url: var(--icon-home); }
.icon-reels { --icon-url: var(--icon-reels); }
.icon-chat { --icon-url: var(--icon-chat); }
.icon-search { --icon-url: var(--icon-search); }
.icon-heart { --icon-url: var(--icon-heart); }
.icon-pen { --icon-url: var(--icon-pen); }
.icon-image { --icon-url: var(--icon-image); }
.icon-gif { --icon-url: var(--icon-gif); }
.icon-link { --icon-url: var(--icon-link); }
.icon-import { --icon-url: var(--icon-import); }
.icon-edit { --icon-url: var(--icon-edit); }
.icon-select { --icon-url: var(--icon-select); }
.icon-camera { --icon-url: var(--icon-camera); }
.icon-tag,
.icon-flag { --icon-url: var(--icon-tag); }
.icon-quote { --icon-url: var(--icon-quote); }
.icon-view-list { --icon-url: var(--icon-view-list); }
.icon-view-rows { --icon-url: var(--icon-view-rows); }
.icon-view-card { --icon-url: var(--icon-view-card); }
.icon-moon-space { --icon-url: var(--icon-moon-space); }
.icon-hierarchy { --icon-url: var(--icon-hierarchy); }
.icon-dot-menu { --icon-url: var(--icon-dot-menu); }
.icon-up-double { --icon-url: var(--icon-up-double); }
.icon-torch-runner { --icon-url: var(--icon-torch-runner); }
.icon-filter { --icon-url: var(--icon-filter); }
.icon-sort { --icon-url: var(--icon-sort); }
.icon-category { --icon-url: var(--icon-category); }

.app-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  padding: 0 28px;
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-left {
  flex: 1 1 auto;
  gap: 18px;
}

.topbar-actions {
  flex: 0 0 auto;
  gap: 18px;
}

.topbar-brand {
  color: var(--ink);
  font-family: var(--app-font);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-following-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.topbar-quick-button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.topbar-quick-button:hover,
.topbar-quick-button:focus-visible,
.topbar-quick-button.is-active {
  border-color: rgba(15, 20, 25, 0.22);
  background: #111;
  color: #fff;
  outline: none;
}

.topbar-search {
  width: min(240px, 28vw);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f7f7f7;
  padding: 0 15px;
  color: var(--muted);
}

.topbar-search .app-icon {
  --icon-size: 19px;
  opacity: 0.78;
}

.topbar-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  outline: none;
}

.topbar-search input:disabled {
  opacity: 1;
}

.topbar-write-button,
.topbar-icon-button,
.topbar-session .pill {
  min-height: 38px;
}

.topbar-write-button,
.topbar-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #242424;
  padding: 0 8px;
  font-size: 14px;
}

.topbar-write-button:hover,
.topbar-write-button:focus-visible,
.topbar-icon-button:hover,
.topbar-icon-button:focus-visible {
  background: var(--soft);
  outline: none;
}

.topbar-write-button .app-icon {
  --icon-size: 21px;
}

.topbar-icon-button {
  width: 38px;
  padding: 0;
}

.topbar-bell-icon {
  position: relative;
  width: 18px;
  height: 19px;
  display: inline-block;
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 11px 11px 6px 6px;
}

.topbar-bell-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.topbar-bell-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.topbar-session {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-account-pill,
.topbar-account-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-account-pill {
  max-width: 148px;
  background: transparent;
  color: #242424;
  padding: 0 8px 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-account-pill strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.topbar-account-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: block;
  overflow: hidden;
  border: 1px solid #d8e1e6;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 36%, #8ca0ad 0 23%, transparent 24%),
    radial-gradient(circle at 50% 96%, #8ca0ad 0 34%, transparent 35%),
    #e5edf2;
}

.topbar-account-avatar.has-image,
.avatar.has-image {
  background: #e5edf2;
}

.topbar-account-avatar img,
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-account-link {
  color: var(--muted);
  padding: 0 8px;
  font-size: 13px;
}

.topbar-account-pill:hover,
.topbar-account-pill:focus-visible,
.topbar-account-link:hover,
.topbar-account-link:focus-visible {
  background: var(--soft);
  outline: none;
}

.sidebar {
  position: fixed;
  inset: var(--topbar-height) auto 0 0;
  z-index: 40;
  width: var(--rail-width);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
  transition: width 160ms ease, box-shadow 160ms ease;
}

.sidebar:hover,
.relaytree-app.sidebar-pinned .sidebar {
  width: var(--rail-expanded-width);
  box-shadow: var(--shadow);
}

.sidebar-toggle {
  width: 38px;
  height: 44px;
  margin: 12px 0 16px 10px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: var(--soft);
  outline: none;
}

.sidebar-toggle .app-icon {
  --icon-size: 24px;
}

.app-topbar .sidebar-toggle {
  margin: 0;
  height: 42px;
}

.sidebar-brand {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
  padding: 0 14px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 160ms ease;
}

.sidebar:hover .sidebar-brand,
.relaytree-app.sidebar-pinned .sidebar-brand {
  opacity: 1;
}

.sidebar-brand strong {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.sidebar-brand span {
  color: var(--muted);
  font-size: 11px;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 0 5px;
}

.nav-item {
  min-width: 48px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
}

.nav-item:hover,
.nav-item:focus-visible {
  background: var(--soft);
  outline: none;
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav-item .app-icon {
  --icon-size: 24px;
  justify-self: center;
}

.nav-label {
  min-width: 0;
  opacity: 0;
  transform: translateX(-6px);
  color: currentColor;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 130ms ease, transform 130ms ease;
}

.sidebar:hover .nav-label,
.relaytree-app.sidebar-pinned .nav-label {
  opacity: 1;
  transform: translateX(0);
}

.pill {
  align-items: center;
  min-height: 30px;
  max-width: 112px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill strong {
  color: var(--ink);
}

.relaytree-main {
  width: calc(100% - var(--rail-width));
  min-height: 100vh;
  margin-left: var(--rail-width);
  display: flex;
  justify-content: center;
  padding: calc(var(--topbar-height) + 14px) 24px 36px;
  transition: margin-left 160ms ease, width 160ms ease;
}

.relaytree-app.sidebar-pinned .relaytree-main {
  width: calc(100% - var(--rail-expanded-width));
  margin-left: var(--rail-expanded-width);
}

.relaytree-main[data-page-layout="canvas"] {
  justify-content: flex-start;
  background: #f6f7f9;
  padding: var(--topbar-height) 0 0;
  overflow-x: auto;
}

.relaytree-app.reader-mode .relaytree-main,
.relaytree-app.reader-mode.sidebar-pinned .relaytree-main {
  width: 100%;
  margin-left: 0;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-x: clip;
  padding-right: 0;
  padding-left: 0;
  transition: none;
}

.timeline {
  position: relative;
  width: min(100%, var(--timeline-width));
  min-height: 100vh;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.timeline[data-page-layout="page"] {
  width: min(100%, 1180px);
}

.timeline[data-page-layout="canvas"] {
  width: 100%;
  min-width: 100%;
  border-right: 0;
  border-left: 0;
  background: #f6f7f9;
}

.timeline[data-page-layout="reader"] {
  width: var(--reader-dynamic-width);
  max-width: var(--reader-dynamic-width);
  flex: 0 0 var(--reader-dynamic-width);
  margin-left: var(--reader-dynamic-left);
}

.timeline[data-page-layout="page"] .timeline-resize-handle,
.timeline[data-page-layout="canvas"] .timeline-resize-handle,
.timeline[data-page-layout="reader"] .timeline-resize-handle {
  display: none;
}

.timeline-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 35;
  width: 18px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: ew-resize;
}

.timeline-resize-handle.is-left {
  left: -9px;
}

.timeline-resize-handle.is-right {
  right: -9px;
}

.timeline-resize-handle::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: transparent;
  transform: translateX(-50%);
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.timeline-resize-handle:hover::after,
.timeline-resize-handle:focus-visible::after,
.timeline-resize-handle.is-active::after {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline-resize-handle:focus-visible {
  outline: none;
}

body.is-resizing-timeline {
  cursor: ew-resize;
  user-select: none;
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  min-height: 0;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.timeline-header-inner {
  width: min(100%, var(--timeline-width));
  min-height: 52px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0 auto;
}

.timeline-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  position: relative;
}

.timeline-tab:focus {
  outline: none;
}

.timeline-tab:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(29, 155, 240, 0.28);
}

.timeline-tab.is-active {
  color: var(--ink);
}

.timeline-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
  transform: translateX(-50%);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel.is-active .composer {
  display: grid;
}

.relaytree-app.reader-mode .timeline-header,
.relaytree-app.reader-mode .tab-panel {
  display: none;
}

.tab-panel[data-tab-panel="following"] {
  display: none;
}

.selector-panel {
  min-height: 124px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.following-strip,
.topic-strip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 18px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.following-strip::-webkit-scrollbar,
.topic-strip::-webkit-scrollbar {
  height: 6px;
}

.following-strip::-webkit-scrollbar-thumb,
.topic-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.follow-chip,
.topic-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  white-space: nowrap;
}

.follow-chip {
  width: 74px;
  min-height: 76px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  padding: 9px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.topic-chip {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.follow-chip:hover,
.follow-chip:focus-visible,
.topic-chip:hover,
.topic-chip:focus-visible {
  border-color: var(--line-strong);
  background: var(--soft);
  outline: none;
}

.follow-chip.is-active,
.topic-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mini-avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e5edf2;
  color: #435767;
  font-size: 12px;
  font-weight: 900;
}

.mini-avatar.is-all {
  font-size: 11px;
}

.tone-blue {
  background: #e5f1ff;
  color: #2167b1;
}

.tone-green {
  background: #e6f6ed;
  color: #1e7b4f;
}

.tone-violet {
  background: #efe9ff;
  color: #7141c7;
}

.tone-amber {
  background: #fff3d9;
  color: #9a6200;
}

.tone-rose {
  background: #ffe8ee;
  color: #b12f52;
}

.composer {
  display: none;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px 0;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 40px;
  height: 40px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 36%, #8ca0ad 0 22%, transparent 23%),
    radial-gradient(circle at 50% 92%, #8ca0ad 0 34%, transparent 35%),
    #e5edf2;
}

.composer-main {
  position: relative;
  min-width: 0;
}

.title-input,
.body-input,
.body-editor {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  letter-spacing: 0;
}

.title-input {
  min-height: 30px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.compose-mode-tabs {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.compose-mode-tab {
  position: relative;
  min-height: 34px;
  border: 0;
  border-bottom: 1.5px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 7px 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.compose-mode-tab:hover,
.compose-mode-tab:focus-visible {
  color: var(--ink);
  outline: none;
}

.compose-mode-tab.is-active {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.composer-category-field {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 12px;
}

.composer-category-field .app-icon {
  --icon-size: 17px;
  opacity: 0.66;
}

.composer-category-field select {
  min-width: 140px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 7px 0;
  font-size: 13px;
  font-weight: 800;
}

.composer-category-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.body-input {
  resize: none;
  min-height: 64px;
  padding: 2px 0 10px;
  font-size: 19px;
  line-height: 1.45;
}

.body-store {
  display: none;
}

.body-editor {
  min-height: 64px;
  padding: 2px 0 10px;
  font-size: 19px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.composer-context-panel:empty {
  display: none;
}

.composer-source-signal {
  display: grid;
  gap: 8px;
  margin: 6px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.composer-source-signal-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.composer-source-signal-header strong {
  color: var(--ink);
}

.composer-source-signal blockquote {
  margin: 0;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  padding-left: 9px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.55;
}

.composer-source-signal-actions {
  display: flex;
  justify-content: flex-end;
}

.composer-source-signal-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.composer-source-signal-actions button:hover,
.composer-source-signal-actions button:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
  outline: none;
}

.composer-options {
  margin: 2px 0 10px;
}

.composer-options summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.composer-options summary::-webkit-details-marker {
  display: none;
}

.composer-options summary .app-icon {
  --icon-size: 15px;
  opacity: 0.62;
}

.composer-options[open] summary,
.composer-options summary:hover,
.composer-options summary:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
  outline: none;
}

.composer-option-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.body-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.body-editor p {
  margin: 0 0 12px;
}

.body-editor blockquote,
.body-editor pre,
.body-editor details,
.body-editor .ticy-todo-editor,
.body-editor table {
  margin: 12px 0;
}

.body-editor blockquote {
  border-left: 4px solid var(--accent);
  background: var(--soft);
  padding: 10px 13px;
  color: #26323a;
  font-size: 16px;
  line-height: 1.62;
}

.body-editor pre {
  overflow-x: auto;
  border: 1px solid #1f2933;
  border-radius: 8px;
  background: #101820;
  color: #edf4f7;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
}

.body-editor pre code {
  font-family: Consolas, "Courier New", monospace;
  white-space: pre;
}

.body-editor details {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.body-editor details summary {
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.body-editor .ticy-details-body {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.body-editor .ticy-todo-editor {
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1.55;
}

.body-editor .ticy-todo-item {
  margin: 0;
  padding: 6px 0;
}

.body-editor .ticy-todo-item + .ticy-todo-item {
  border-top: 1px solid var(--line);
}

.body-editor .ticy-todo-item label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.body-editor .ticy-todo-item input {
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  accent-color: var(--accent);
}

.body-editor .ticy-todo-text {
  min-width: 0;
  outline: none;
}

.body-editor table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  font-size: 14px;
  line-height: 1.45;
}

.body-editor th,
.body-editor td {
  min-width: 110px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.body-editor th {
  background: var(--soft);
  font-weight: 800;
}

.body-editor.is-plan-mode {
  min-height: 150px;
  padding-top: 4px;
  font-size: 15px;
  line-height: 1.48;
}

.body-editor.is-plan-mode:empty::before {
  display: block;
  padding-top: 3px;
  font-size: 18px;
}

.body-editor.is-plan-mode .plan-line {
  min-height: 24px;
  border-radius: 6px;
  padding: 2px 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.body-editor.is-plan-mode .plan-line:hover,
.body-editor.is-plan-mode .plan-line:focus-within {
  background: #edf3f7;
}

.plan-content {
  display: grid;
  gap: 2px;
}

.plan-line {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.plan-level-0 {
  margin-top: 16px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.plan-level-0:first-child {
  margin-top: 0;
}

.plan-level-1 {
  margin-top: 8px;
  padding-left: 18px;
  color: #223847;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.42;
}

.plan-level-2 {
  margin-top: 5px;
  padding-left: 34px;
  color: #31546a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.48;
}

.plan-level-3 {
  position: relative;
  padding-left: 52px;
  color: #26323a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.56;
}

.plan-level-3::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 38px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #7890a0;
}

.plan-level-4 {
  position: relative;
  padding-left: 70px;
  color: #526676;
  font-size: 13.5px;
  line-height: 1.55;
}

.plan-level-4::before {
  content: "";
  position: absolute;
  top: 0.83em;
  left: 56px;
  width: 8px;
  height: 1px;
  background: #8ca0ad;
}

.plan-level-5 {
  padding-left: 88px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.52;
}

.title-input::placeholder,
.body-input::placeholder {
  color: var(--muted);
}

.slash-menu {
  position: absolute;
  z-index: 30;
  top: 78px;
  left: 0;
  width: min(340px, 100%);
  max-height: min(430px, calc(100vh - 150px));
  display: none;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 6px;
}

.slash-menu.is-open {
  display: grid;
  gap: 2px;
}

.slash-item {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 7px 9px;
  text-align: left;
}

.slash-item:hover,
.slash-item.is-selected {
  background: var(--soft);
}

.slash-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.slash-item strong,
.slash-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slash-item strong {
  font-size: 14px;
  line-height: 1.25;
}

.slash-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.slash-item kbd {
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
}

.reader-slash-menu {
  top: auto;
  left: 28px;
  right: 28px;
  width: auto;
  margin-top: -8px;
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.attachment-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
}

.attachment-chip strong {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.attachment-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.tool-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8aa2b3;
  padding: 0;
}

.tool-button .app-icon {
  --icon-size: 19px;
  opacity: 0.6;
}

.tool-mark {
  min-width: 19px;
  color: currentColor;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.72;
}

.tool-button:hover,
.tool-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.tool-button:hover .app-icon,
.tool-button:focus-visible .app-icon {
  opacity: 0.9;
}

.save-cluster {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.save-primary-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.version-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.version-controls[hidden] {
  display: none;
}

.version-title-input {
  width: min(210px, 28vw);
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 13px;
  font-size: 13px;
  line-height: 1.3;
  outline: none;
}

.version-title-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.status-line {
  max-width: 100px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-line.is-error {
  color: var(--danger);
}

.save-button,
.push-button,
.modal-button {
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 18px;
  font-weight: 800;
  white-space: nowrap;
}

.save-button:hover,
.push-button:hover,
.modal-button:hover,
.save-button:focus-visible,
.push-button:focus-visible,
.modal-button:focus-visible {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  outline: none;
}

.save-button:disabled,
.push-button:disabled {
  cursor: default;
  opacity: 0.62;
}

.hidden-input {
  display: none;
}

.feed-view-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.feed-view-bar[hidden] {
  display: none;
}

.feed-view-trigger {
  min-width: 48px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 7px 9px;
}

.feed-view-trigger:hover,
.feed-view-trigger:focus-visible {
  border-color: var(--line-strong);
  background: var(--soft);
  outline: none;
}

.feed-view-trigger .app-icon {
  --icon-size: 20px;
}

.feed {
  display: grid;
}

.lineage-feed {
  display: grid;
  overflow: visible;
}

.lineage-tag-shell {
  position: relative;
  border-bottom: 0;
  background: var(--panel);
  padding: 10px 0;
  overflow: visible;
}

.lineage-tag-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  border-left: 0;
  overflow: hidden;
}

.lineage-tag-cell {
  min-width: 0;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  color: #536471;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.lineage-tag-cell:hover,
.lineage-tag-cell:focus-visible {
  border-color: rgba(29, 155, 240, 0.32);
  background: var(--accent-soft);
  color: var(--accent-dark);
  outline: none;
}

.lineage-tag-cell.is-active {
  border-color: rgba(29, 155, 240, 0.52);
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: none;
}

.lineage-tag-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 18;
  width: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.lineage-tag-nav.is-previous {
  left: -44px;
  border-radius: 8px 0 0 8px;
  transform: translateX(8px);
}

.lineage-tag-nav.is-next {
  right: -44px;
  border-radius: 0 8px 8px 0;
  transform: translateX(-8px);
}

.lineage-tag-shell:hover .lineage-tag-nav:not(:disabled),
.lineage-tag-shell:focus-within .lineage-tag-nav:not(:disabled),
.lineage-tag-nav:not(:disabled):hover,
.lineage-tag-nav:not(:disabled):focus-visible {
  opacity: 1;
  transform: translateX(0);
}

.lineage-tag-nav:not(:disabled):hover,
.lineage-tag-nav:not(:disabled):focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  outline: none;
}

.lineage-tag-nav:disabled {
  color: var(--line-strong);
  cursor: default;
  pointer-events: none;
}

.lineage-source-shell {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow: visible;
}

.lineage-parent-section {
  width: 120%;
  margin-left: -10%;
  margin-right: -10%;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #f8fbfd;
  box-shadow: 0 10px 26px rgba(15, 20, 25, 0.08);
}

.lineage-source-label {
  min-height: 30px;
  display: flex;
  align-items: center;
  border-bottom: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 0 16px 0 20px;
  box-shadow: inset 4px 0 0 var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lineage-parent-section .lineage-source-label {
  border-bottom: 0;
  background: #ffffff;
}

.lineage-source-node {
  position: relative;
  overflow: visible;
}

.lineage-source-node .feed-card {
  border-bottom: 0;
  background: #ffffff;
  box-shadow: inset 4px 0 0 var(--accent);
  min-height: 142px;
}

.lineage-children-section {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.lineage-list {
  display: grid;
  overflow: visible;
}

.lineage-feed[data-lineage-direction="children"] .lineage-children-section {
  animation: lineage-slide-from-right 220ms ease-out both;
}

.lineage-feed[data-lineage-direction="children"] .lineage-source-shell {
  animation: lineage-slide-from-right 220ms ease-out both;
}

.lineage-feed[data-lineage-direction="parents"] .lineage-children-section {
  animation: lineage-slide-from-left 220ms ease-out both;
}

.lineage-feed[data-lineage-direction="parents"] .lineage-source-shell {
  animation: lineage-slide-from-left 220ms ease-out both;
}

.lineage-card-shell {
  position: relative;
  overflow: visible;
}

.lineage-card-shell.is-tag-preview-match .feed-card {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.lineage-card-shell .feed-card {
  min-height: 142px;
}

.feed-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.feed-card:hover {
  background: var(--soft);
}

.feed-card-main {
  position: relative;
  min-width: 0;
  padding-right: 36px;
}

.feed-card-top {
  min-width: 0;
  min-height: 43px;
  display: grid;
  align-content: start;
  border-radius: 6px;
  padding: 3px 6px;
  margin: -3px -6px 0;
  transition: background-color 120ms ease;
}

.feed-card-top:hover,
.feed-card-top:focus-within {
  background: #edf3f7;
  cursor: pointer;
}

.post-more-button {
  position: absolute;
  top: -4px;
  right: 0;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.post-more-button .app-icon {
  --icon-size: 20px;
}

.post-more-button:hover,
.post-more-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.post-menu {
  position: absolute;
  top: 30px;
  right: 0;
  z-index: 25;
  width: min(280px, calc(100vw - 92px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.post-menu-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.post-menu-item:hover,
.post-menu-item:focus-visible {
  background: var(--soft);
  outline: none;
}

.post-menu-item:disabled {
  color: var(--muted);
  cursor: wait;
  opacity: 0.72;
}

.post-menu-item.is-danger {
  color: #f4212e;
}

.post-menu-item.is-danger:disabled {
  color: var(--muted);
}

.item-actions-anchor {
  position: absolute;
  top: 9px;
  right: 10px;
  z-index: 24;
}

.item-actions-anchor .post-more-button {
  position: static;
}

.item-action-menu {
  top: 34px;
  right: 0;
}

.post-menu-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
}

.post-menu-icon.app-icon {
  --icon-size: 18px;
}

.trash-icon {
  position: relative;
}

.trash-icon::before {
  content: "";
  width: 10px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.trash-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 4px;
  width: 10px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 3px -3px 0 -1px currentColor;
}

.feed-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  min-height: 20px;
  margin-bottom: 2px;
}

.feed-author {
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.feed-title {
  min-height: 21px;
  margin: 0;
  font-size: 15px;
  line-height: 1.38;
  font-weight: 800;
}

.feed-title-button {
  display: inline-block;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
  padding: 0;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-title-button:hover,
.feed-title-button:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.feed-lineage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.lineage-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.lineage-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.lineage-chip.is-parent {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.lineage-chip.is-parent.is-missing {
  background: var(--soft);
  color: var(--muted);
}

button.lineage-chip.is-parent:hover,
button.lineage-chip.is-parent:focus-visible,
a.lineage-chip.is-parent:hover,
a.lineage-chip.is-parent:focus-visible {
  background: #d3ecfb;
  outline: none;
}

.lineage-chip.is-captivated {
  background: var(--captivated-soft);
  color: var(--captivated);
}

.lineage-chip.is-emotion {
  font-weight: 800;
}

.lineage-chip.is-emotion strong {
  font-weight: 900;
}

.lineage-chip.is-emotion.is-captivated {
  background: var(--captivated-soft);
  color: var(--captivated);
}

.lineage-chip.is-emotion.is-cool {
  background: #e8f5fd;
  color: #1a78b8;
}

.lineage-chip.is-emotion.is-bored {
  background: #f1f3f5;
  color: #5b6470;
}

.lineage-chip.is-emotion.is-repelled {
  background: #fff0e5;
  color: #a84f10;
}

.lineage-chip.is-emotion.is-intolerable {
  background: #ffe8eb;
  color: #b4232f;
}

button.lineage-chip.is-captivated:hover,
button.lineage-chip.is-captivated:focus-visible,
a.lineage-chip.is-captivated:hover,
a.lineage-chip.is-captivated:focus-visible {
  background: #f8e8b8;
  outline: none;
}

.lineage-mark {
  font-weight: 800;
}

.feed-body {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.feed-card.is-card-view .feed-body {
  min-height: calc(1.58em * 5);
  max-height: calc(1.58em * 5);
  overflow: hidden;
}

.feed-body.structured-content {
  white-space: normal;
}

.feed-body.structured-content p {
  margin: 0 0 12px;
}

.structured-content .ticy-heading {
  margin: 28px 0 12px;
  color: var(--ink);
  line-height: 1.34;
  font-weight: 900;
  letter-spacing: 0;
}

.structured-content .ticy-heading:first-child {
  margin-top: 0;
}

.structured-content .ticy-heading-1 {
  font-size: 1.42em;
}

.structured-content .ticy-heading-2 {
  font-size: 1.26em;
}

.structured-content .ticy-heading-3 {
  font-size: 1.12em;
}

.structured-content .ticy-heading-4,
.structured-content .ticy-heading-5,
.structured-content .ticy-heading-6 {
  color: #384955;
  font-size: 1em;
}

.structured-content .ticy-heading + p {
  margin-top: 0;
}

.feed-body.structured-content > :last-child {
  margin-bottom: 0;
}

.feed-body.is-plan-content {
  display: block;
}

.feed-body.is-plan-content .plan-content {
  gap: 1px;
}

.feed-body.is-plan-content .plan-level-0 {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.4;
}

.feed-body.is-plan-content .plan-level-1 {
  margin-top: 5px;
  padding-left: 14px;
  font-size: 14px;
}

.feed-body.is-plan-content .plan-level-2 {
  padding-left: 26px;
  font-size: 13px;
}

.feed-body.is-plan-content .plan-level-3 {
  padding-left: 38px;
  font-size: 13px;
}

.feed-body.is-plan-content .plan-level-3::before {
  left: 27px;
}

.feed-body.is-plan-content .plan-level-4 {
  padding-left: 50px;
  font-size: 12.5px;
}

.feed-body.is-plan-content .plan-level-4::before {
  left: 39px;
}

.feed-body.is-plan-content .plan-level-5 {
  padding-left: 62px;
  font-size: 12px;
}

.feed-attachments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.feed-attachments-marker.app-icon {
  --icon-size: 17px;
  opacity: 0.7;
}

.feed-card.is-card-view .feed-attachments {
  display: none;
}

.feed-attachment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  text-decoration: none;
}

a.feed-attachment:hover,
a.feed-attachment:focus-visible {
  border-color: rgba(29, 155, 240, 0.38);
  background: var(--accent-soft);
  color: var(--accent-dark);
  outline: none;
}

.feed-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 330px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.feed-card.is-list-view .feed-actions {
  max-width: 330px;
  margin-top: 8px;
}

.feed-card.is-card-view .feed-actions {
  margin-top: 10px;
}

.feed-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feed-action .app-icon {
  --icon-size: 15px;
}

.comment-panel {
  margin: 30px 28px 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.comment-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.comment-panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.comment-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-item {
  position: relative;
  display: grid;
  gap: 5px;
  padding-right: 44px;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.comment-meta strong {
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-meta span,
.comment-empty {
  color: var(--muted);
  font-size: 12px;
}

.comment-item p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.comment-form textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
}

.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
}

.comment-submit,
.comment-login {
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.comment-submit:hover,
.comment-submit:focus-visible,
.comment-login:hover,
.comment-login:focus-visible {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  outline: none;
}

.comment-submit:disabled {
  cursor: default;
  opacity: 0.62;
}

.reader-empty {
  min-height: 220px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
}

.reader-empty strong {
  display: block;
  margin-top: 7px;
  font-size: 17px;
}

.reader-empty p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 20, 25, 0.42);
}

.modal {
  width: min(100%, 440px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.modal p {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.modal-button.secondary:hover,
.modal-button.secondary:focus-visible {
  border-color: var(--line-strong);
  background: var(--soft);
}

.delete-modal {
  width: min(100%, 320px);
}

.delete-modal p {
  margin-bottom: 24px;
}

.delete-modal-actions {
  display: grid;
  gap: 12px;
}

.modal-button.danger {
  border-color: #f4212e;
  background: #f4212e;
  color: #ffffff;
}

.modal-button.danger:hover,
.modal-button.danger:focus-visible {
  border-color: #d91522;
  background: #d91522;
}

.modal-button:disabled {
  cursor: default;
  opacity: 0.62;
}

@media (max-width: 820px) {
  .relaytree-main,
  .relaytree-app.sidebar-pinned .relaytree-main {
    width: calc(100% - var(--rail-width));
    margin-left: var(--rail-width);
    padding: calc(var(--topbar-height) + 10px) 0 32px;
  }

  .relaytree-app.reader-mode .relaytree-main,
  .relaytree-app.reader-mode.sidebar-pinned .relaytree-main {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-x: clip;
    padding: calc(var(--topbar-height) + 10px) 0 32px;
  }

  .app-topbar {
    gap: 12px;
    padding: 0 14px;
  }

  .topbar-left {
    gap: 10px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-brand {
    font-size: 25px;
  }

  .topbar-following-quick {
    gap: 4px;
  }

  .topbar-quick-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11.5px;
  }

  .topbar-search {
    width: min(210px, 34vw);
  }

  .timeline {
    width: 100%;
    border-right: 0;
  }

  .timeline-resize-handle {
    display: none;
  }

  .lineage-tag-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    min-height: 64px;
  }

  .lineage-tag-cell {
    min-height: 64px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    padding: 6px 4px;
  }

  .lineage-parent-section {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .lineage-side-nav {
    width: 36px;
  }

  .lineage-side-nav.is-parents {
    left: 0;
    border-radius: 0 8px 8px 0;
  }

  .lineage-side-nav.is-children {
    right: 0;
    border-radius: 8px 0 0 8px;
  }

  .lineage-card-shell .feed-card {
    padding-right: 48px;
    padding-left: 48px;
  }

  .for-you-page {
    padding: 30px 14px 44px;
  }

  .for-you-inner {
    width: 100%;
  }

  .for-you-toolbar {
    width: 100%;
  }

  .for-you-toolbar-controls {
    width: 100%;
  }

  .for-you-submenu {
    top: calc(100% - 1px);
    right: 0;
    left: auto;
  }

  .for-you-parent-shell {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .for-you-parent-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .for-you-cover.is-large {
    min-height: 132px;
  }

  .for-you-parent-main {
    padding-right: 0;
  }

  .for-you-parent-index {
    position: static;
    justify-self: start;
  }

  .for-you-sibling-nav {
    width: 42px;
    font-size: 28px;
  }

  .following-lineage-stack {
    --following-step-offset: 28px;
    --following-step-span: calc(var(--following-step-offset) * 2);
    gap: 14px;
    width: 100%;
    justify-self: stretch;
    padding: 16px 10px 28px;
    transform: none;
  }

  .following-tag-center,
  .following-content-center {
    left: auto;
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .following-lineage-slot {
    width: calc(100% - var(--following-step-span));
    margin-left: calc(var(--following-step-offset) * var(--following-depth));
  }

  .following-lineage-slot.is-parent::before,
  .following-lineage-slot.is-child::before {
    display: none;
  }

  .following-primary-card {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    width: calc(100% + 92px);
    margin-inline: -46px;
  }

  .following-expansion-controls {
    top: auto;
    right: 10px;
    bottom: 8px;
    left: auto;
    width: 32px;
    height: 26px;
  }

  .following-expansion-button {
    width: 32px;
    height: 26px;
  }

  .following-expansion-button::before {
    width: 20px;
    height: 20px;
  }

  .following-sibling-nav {
    width: 46px;
    height: 46px;
    min-height: 46px;
  }

  .following-sibling-nav::before {
    width: 14px;
    height: 14px;
    border-top-width: 6px;
    border-right-width: 6px;
  }

  .following-lineage-card .feed-card {
    padding-right: 42px;
    padding-left: 42px;
  }

  .following-child-list {
    gap: 8px;
  }

  .sidebar:hover,
  .relaytree-app.sidebar-pinned .sidebar {
    width: min(var(--rail-expanded-width), 58vw);
  }

}

@media (max-width: 560px) {
  .topbar-search {
    display: none;
  }

  .for-you-page {
    padding: 22px 12px 36px;
  }

  .for-you-toolbar-controls,
  .for-you-picker,
  .for-you-source-nav {
    width: 100%;
  }

  .for-you-toolbar-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .for-you-picker,
  .for-you-source-nav {
    justify-content: center;
    padding: 0 6px;
  }

  .for-you-picker-trigger {
    width: 100%;
    height: 70px;
    flex-direction: column;
    gap: 4px;
  }

  .for-you-picker-trigger strong,
  .for-you-source-nav span {
    font-size: 14.5px;
    line-height: 1.18;
    white-space: normal;
  }

  .for-you-source-nav button {
    min-width: 22px;
    width: 22px;
    font-size: 18px;
  }

  .for-you-source-nav span {
    min-width: 44px;
  }

  .for-you-picker-menu {
    right: 0;
    left: 0;
    transform: none;
  }

  .for-you-submenu {
    right: 0;
    left: 0;
    min-width: 100%;
    transform: none;
  }

  .for-you-parent-shell {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }

  .for-you-parent-card {
    padding: 16px;
  }

  .for-you-parent-card h1 {
    font-size: 20px;
  }

  .for-you-sibling-nav {
    width: 32px;
    font-size: 24px;
  }

  .for-you-child-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .for-you-child-media,
  .for-you-cover.is-small {
    width: 100%;
    height: 92px;
    flex-basis: auto;
  }

  .topbar-left {
    gap: 8px;
  }

  .topbar-quick-button {
    padding: 0 7px;
  }

  .topbar-write-button span:not(.app-icon) {
    display: none;
  }

  .topbar-account-pill {
    max-width: 92px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .timeline-tab {
    font-size: 12px;
  }

  .composer {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px 12px 0;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .body-input {
    font-size: 17px;
  }

  .composer-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-row,
  .save-cluster {
    width: 100%;
  }

  .save-cluster {
    justify-items: stretch;
  }

  .version-controls {
    justify-content: stretch;
  }

  .version-title-input {
    width: 100%;
    flex: 1 1 auto;
  }

  .save-primary-row {
    width: 100%;
    justify-content: space-between;
  }

  .reader-title {
    padding-right: 16px;
    padding-left: 16px;
    font-size: 25px;
  }

  .reader-author-row,
  .reader-tabs,
  .reader-content,
  .reader-tag-row,
  .reader-emotion-summary,
  .reader-edit-form,
  .reader-siblings,
  .reader-view .feed-attachments {
    padding-right: 16px;
    padding-left: 16px;
  }

  .reader-tabs {
    margin-right: 0;
    margin-left: 0;
  }

  .reader-title-input {
    font-size: 25px;
  }

  .reader-content {
    font-size: 16px;
    line-height: 1.72;
  }

  .reader-tag-row,
  .reader-emotion-summary {
    margin-right: 0;
    margin-left: 0;
  }

  .reader-emotion-highlight-note {
    float: none;
    max-width: 100%;
    margin: 3px 0 2px 6px;
    vertical-align: baseline;
  }

  .reader-edit-save-row,
  .reader-version-controls {
    justify-content: stretch;
  }

  .reader-version-title-input {
    width: 100%;
    flex: 1 1 auto;
  }

  .reader-actions {
    margin-right: 16px;
    margin-left: 16px;
  }

  .comment-panel {
    margin-right: 16px;
    margin-left: 16px;
  }

}
