:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #161616;
  --muted: #656565;
  --line: #d7d7dc;
  --button: #ececf0;
  --button-hover: #d9d9df;
  --accent: #1B4776;
  --accent-hover: #224F82;
  --danger: #b3261e;
  --input: #ffffff;
  --shadow: rgba(0, 0, 0, 0.08);
}

@font-face {
  font-family: "Fraunces News";
  src: url("/static/fonts/Fraunces144pt-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/static/fonts/AlbertSans-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/static/fonts/AlbertSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/static/fonts/AlbertSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Besley";
  src: url("/static/fonts/Besley-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Besley";
  src: url("/static/fonts/Besley-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Akshar";
  src: url("/static/fonts/Akshar-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Akshar";
  src: url("/static/fonts/Akshar-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Akshar";
  src: url("/static/fonts/Akshar-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1023;
    --panel: #0B1023;
    --text: #f3f3f3;
    --muted: #a2a2a2;
    --line: #1B2034;
    --button: #1B2034;
    --button-hover: #252A40;
    --accent: #1B4776;
    --accent-hover: #224F82;
    --danger: #ff7a70;
    --input: #11162A;
    --shadow: rgba(255, 255, 255, 0.08);
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #161616;
  --muted: #656565;
  --line: #d7d7dc;
  --button: #ececf0;
  --button-hover: #d9d9df;
  --accent: #1B4776;
  --accent-hover: #224F82;
  --danger: #b3261e;
  --input: #ffffff;
  --shadow: rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1023;
  --panel: #0B1023;
  --text: #f3f3f3;
  --muted: #a2a2a2;
  --line: #1B2034;
  --button: #1B2034;
  --button-hover: #252A40;
  --accent: #1B4776;
  --accent-hover: #224F82;
  --danger: #ff7a70;
  --input: #11162A;
  --shadow: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.logo {
  display: block;
}

.logo img {
  display: block;
  height: auto;
}

.auth-logo img {
  width: 220px;
  max-width: 100%;
}

.topbar-logo img {
  width: 136px;
}

html[data-theme="light"] .logo source,
html[data-theme="dark"] .logo source {
  display: none;
}

html[data-theme="dark"] .logo img {
  content: url("/static/images/nada-horizontal-blanco.png");
}

html[data-theme="light"] .logo img {
  content: url("/static/images/nada-horizontal-negro.png");
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line), 0 1px 3px var(--shadow);
  color: var(--text);
  min-height: 34px;
  padding: 7px 12px;
  cursor: pointer;
}

button:hover {
  background: var(--button-hover);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 8px var(--shadow);
}

@media (prefers-color-scheme: dark) {
  button,
  button:hover {
    box-shadow: none;
  }
}

html[data-theme="dark"] button,
html[data-theme="dark"] button:hover {
  box-shadow: none;
}

button.active,
button.primary {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 8px var(--shadow);
  color: #ffffff;
}

button.active:hover,
button.primary:hover {
  background: var(--accent-hover);
}

input,
textarea {
  width: 100%;
  border: 0;
  background: var(--input);
  color: var(--text);
  padding: 8px;
  outline: none;
}

input:focus,
textarea:focus {
  box-shadow: inset 0 0 0 1px var(--accent);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.check-label,
.current-toggle,
.article-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-label input,
.current-toggle input {
  width: auto;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(380px, 100%);
  background: var(--panel);
  border: 0;
  box-shadow: none;
  padding: 22px;
  display: grid;
  gap: 14px;
}

.auth-panel input {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.error {
  color: var(--danger);
  min-height: 20px;
  margin: 0;
}

.app-view {
  height: 100vh;
  display: grid;
  grid-template-rows: 62px 1fr;
}

.app-view.presenter-mode {
  height: auto;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 0 12px 0 18px;
  min-height: 62px;
}

.brand {
  font-weight: 700;
}

.topbar nav {
  display: flex;
  gap: 8px;
}

.topbar nav button {
  align-items: center;
  border: 1px solid var(--line);
  box-shadow: none;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.topbar nav button:hover {
  box-shadow: none;
}

.topbar-icon-button svg {
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
}

.layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(180px, 24%) 5px minmax(360px, 1fr) 5px minmax(190px, 22%);
}

.mobile-pane-tabs {
  display: none;
}

.pane {
  min-width: 0;
  min-height: 0;
  background: var(--panel);
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pane::-webkit-scrollbar {
  display: none;
}

.pane-head {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 0 10px 0 18px;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}

.pane-head h2 {
  margin: 0;
  font-size: 15px;
}

.head-actions {
  display: flex;
  gap: 8px;
}

.icon-text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.icon-text-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: currentColor;
}

.resizer {
  background: var(--line);
  cursor: col-resize;
  min-width: 5px;
}

.resizer:hover,
.resizer.dragging {
  background: var(--accent);
}

.news-list,
.notes-list {
  display: grid;
}

.news-list {
  padding: 0 12px 16px;
}

.notes-list {
  align-content: start;
}

@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotation {
  0% {
    --gradient-angle: 0deg;
  }
  100% {
    --gradient-angle: 360deg;
  }
}

.episode-group {
  display: grid;
}

.episode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  padding: 10px 6px 8px;
}

.episode-header::-webkit-details-marker {
  display: none;
}

.episode-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.episode-header strong {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  font-family: "Akshar", "Albert Sans", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.12;
  text-transform: uppercase;
}

.episode-glyph {
  flex: 0 0 auto;
  height: 20px;
  transform: translateY(-1px);
  width: 20px;
}

html[data-theme="dark"] .episode-glyph {
  filter: invert(1);
}

.episode-header span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.episode-header em {
  min-width: max-content;
  border-radius: 999px;
  background: var(--button);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  text-align: center;
}

.episode-header .episode-header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  min-width: max-content;
}

.ai-gradient-pill {
  align-items: center;
  animation: rotation 5s linear infinite;
  background:
    linear-gradient(var(--button), var(--button)) padding-box,
    linear-gradient(var(--gradient-angle), #2f6df6, #8b35ff, #e02e55, #ff9b21) border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  padding: 5px 8px;
  width: max-content;
}

.ai-gradient-pill:hover {
  background:
    linear-gradient(#b4202b, #b4202b) padding-box,
    linear-gradient(var(--gradient-angle), #2f6df6, #8b35ff, #e02e55, #ff9b21) border-box;
  color: #ffffff;
}

.episode-ai-summary-pill {
  font-size: 11px;
  padding: 5px 8px;
}

.news-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  border-bottom: 1px solid var(--line);
  margin: 0 -12px;
}

.news-row.dragging {
  opacity: 0.45;
}

.news-row.drag-over {
  background: var(--button);
  box-shadow: inset 0 2px 0 var(--accent);
}

.news-row.selected {
  background: var(--button);
}

.drag-handle {
  align-self: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  cursor: grab;
  min-height: 44px;
  padding: 0;
}

.drag-handle:hover {
  background: var(--button);
  box-shadow: none;
  color: var(--text);
}

.news-row.dragging .drag-handle {
  cursor: grabbing;
}

.news-item {
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 13px 12px 13px 0;
  min-height: 44px;
  width: 100%;
}

.news-row:hover,
.news-item:hover {
  background: var(--button);
  box-shadow: none;
}

.news-item strong,
.news-item span {
  display: block;
}

.news-item strong {
  align-items: baseline;
  display: inline-flex;
  gap: 5px;
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.15;
}

.news-item strong .news-title-text {
  color: inherit;
  display: inline;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin-top: 0;
  min-width: 0;
}

.news-item span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.presenting-label b {
  color: var(--danger);
}

.news-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 8px;
  margin-bottom: 6px;
}

.news-item .news-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 8px;
  margin-top: 0;
}

.bonus-pill,
.body-length-pill,
.tag-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
}

.bonus-pill {
  background: #f5edc8;
  color: #443809;
}

.body-length-pill {
  background: #b4202b;
  color: #ffffff;
}

.tag-pill {
  background: #f4dfe7;
  color: #5c2638;
}

.content {
  border: 0;
}

.content.editing-content {
  display: grid;
  grid-template-rows: 48px auto minmax(0, 1fr);
  overflow: hidden;
}

.empty-state {
  padding: 16px;
  color: var(--muted);
}

.article-controls {
  padding: 12px 16px 0;
}

.current-toggle {
  color: var(--muted);
}

.read-view {
  padding: 16px;
  line-height: 1.55;
}

.presenter-mode .topbar {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding-left: 28px;
}

.presenter-mode .settings-nav-button {
  display: none;
}

.presenter-mode .layout {
  display: block;
}

.presenter-mode .navigator,
.presenter-mode .notes,
.presenter-mode .resizer,
.presenter-mode .content .pane-head,
.presenter-mode .article-controls {
  display: none;
}

.presenter-mode .content {
  max-width: 920px;
  margin: 0 auto;
  min-height: calc(100vh - 62px);
  background: var(--panel);
  overflow: visible;
}

.presenter-mode .read-view {
  padding: 42px 28px 72px;
}

html:has(.app-view.presenter-mode:not([hidden])),
body:has(.app-view.presenter-mode:not([hidden])),
body.presenter-active,
.presenter-mode .read-view {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html:has(.app-view.presenter-mode:not([hidden]))::-webkit-scrollbar,
body:has(.app-view.presenter-mode:not([hidden]))::-webkit-scrollbar,
body.presenter-active::-webkit-scrollbar,
.presenter-mode .read-view::-webkit-scrollbar {
  display: none;
}

.read-view h1 {
  position: sticky;
  top: 48px;
  z-index: 1;
  margin: 0 0 20px;
  padding: 14px 0 18px;
  font-family: "Fraunces News", Georgia, serif;
  font-size: 52px;
  font-weight: 600;
  line-height: 0.92;
  transition: font-size 160ms ease, padding 160ms ease;
}

.read-view h1::before,
.read-view h1::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
}

.read-view h1::before {
  top: 0;
  bottom: 0;
  z-index: -1;
  background: var(--panel);
}

.read-view h1::after {
  bottom: -14px;
  height: 14px;
  z-index: -1;
  background: linear-gradient(to bottom, var(--panel), transparent);
}

.read-view.article-scrolled h1 {
  font-size: 42px;
  padding: 16px 0 20px;
}

.presenter-mode .read-view h1 {
  top: 0;
  cursor: pointer;
}

.read-links {
  display: grid;
  justify-items: start;
  gap: 7px;
  margin: 0 0 20px;
}

.read-links-title {
  margin: 0 0 3px;
  color: var(--muted);
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  word-break: break-all;
}

.read-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: currentColor;
}

.read-link span {
  min-width: 0;
}

.read-link:hover {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
}

.read-tags {
  display: grid;
  justify-items: start;
  gap: 7px;
  margin: 0 0 22px;
}

.read-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.read-tag {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  border-radius: 999px;
  background: var(--button);
  color: var(--text);
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.read-body img {
  display: block;
  max-width: min(100%, 600px);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
}

html[data-theme="dark"] .read-body img {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.read-body {
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  padding-right: 200px;
}

.read-body h2,
.read-body h3,
.read-body h4 {
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
  font-weight: 700;
}

.read-body > img {
  padding-left: 0;
}

.read-body ul,
.read-body ol {
  margin: 12px 0 18px;
  padding-left: 88px;
}

.read-body li {
  margin: 6px 0;
  padding-left: 4px;
}

.read-body blockquote {
  margin: 18px 0 22px 60px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--button);
  color: var(--text);
  padding: 14px 18px;
}

.read-body iframe {
  max-width: 100%;
}

.editor {
  height: calc(100% - 48px);
  display: grid;
  grid-template-rows: auto auto minmax(360px, 1fr) auto;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 14px 16px 10px;
}

.content.editing-content .editor {
  height: 100%;
}

.links-head,
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.editor-actions {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding-top: 6px;
}

.tag-editor {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  box-shadow: none;
  padding: 3px 8px;
}

.tag-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  border-radius: 999px;
  background: var(--button);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  padding: 5px 7px 5px 10px;
}

.tag-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-chip button {
  min-height: 18px;
  width: 18px;
  border-radius: 50%;
  box-shadow: none;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  padding: 0;
}

.tag-chip button:hover {
  background: var(--button-hover);
  box-shadow: none;
  color: var(--text);
}

#tagInput {
  flex: 1;
  min-width: 90px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  padding: 3px 0;
}

#tagInput::placeholder {
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  .tag-editor {
    border: 0;
    background: var(--button);
  }
}

html[data-theme="dark"] .tag-editor {
  border: 0;
  background: var(--button);
}

.compact-head span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.editor-meta-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.episode-field {
  width: max-content;
  max-width: 100%;
}

.links-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 20px;
  margin: -3px 0 0;
}

.add-link-pill {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  justify-self: start;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  min-height: 0;
  height: 22px;
  margin: 0;
  padding: 0 10px;
  white-space: nowrap;
  width: auto;
  max-width: 100%;
}

.danger-button {
  background: var(--danger);
  color: #fff;
}

.danger-button:hover {
  background: #b4202b;
  box-shadow: 0 0 0 1px rgba(180, 32, 43, 0.2);
}

html[data-theme="dark"] .head-actions #deleteNewsButton {
  background: #b4202b;
}

.links-list {
  display: grid;
  gap: 4px;
  max-height: 50vh;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.links-list:not(:empty) {
  min-height: 34px;
}

.links-list::-webkit-scrollbar {
  display: none;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.remove-link-button {
  width: 34px;
  min-height: 30px;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

#newsBody {
  min-height: 0;
  resize: none;
  line-height: 1.45;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#newsBody::-webkit-scrollbar {
  display: none;
}

.compact-field {
  display: grid;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--input);
  box-shadow: none;
  min-height: 76px;
  padding: 14px 20px;
}

.editor .compact-field:not(.body-field) {
  gap: 5px;
  min-height: 54px;
  padding: 10px 16px;
}

.line-field,
.title-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  border-left: 4px solid var(--muted);
  min-height: 28px;
  padding: 2px 0 2px 8px;
}

.line-field span,
.title-field span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.line-field input,
.line-field select,
.title-field input {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.line-field select {
  font-weight: 300;
}

.line-field input::placeholder,
.title-field input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.line-field input:focus,
.line-field select:focus,
.title-field input:focus {
  box-shadow: none;
}

.links-field {
  grid-template-columns: auto auto;
  justify-content: start;
}

.line-action-button {
  min-height: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 300;
  line-height: 1;
  padding: 0;
}

.line-action-button:hover {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.editor .link-field {
  border-radius: 8px;
  gap: 3px;
  min-height: 38px;
  padding: 6px 12px;
}

.editor .link-field span {
  font-size: 10px;
}

.editor .link-field input {
  min-height: 20px;
  font-size: 13px;
  line-height: 1.2;
}

.compact-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.compact-field input,
.compact-field select,
.compact-field textarea {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-height: 0;
}

.compact-field input,
.compact-field select {
  min-height: 24px;
  font-size: 15px;
}

.episode-control {
  min-width: 0;
}

.body-field {
  grid-template-rows: auto 1fr;
  min-height: 360px;
  overflow: hidden;
}

.body-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.body-field-title {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
}

.body-field-head span,
.body-field-title em {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.body-field-title em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.body-expand-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 30px;
  padding: 0 10px;
  width: auto;
}

.body-expand-button svg {
  height: 15px;
  width: 15px;
}

.body-expand-button .collapse-icon {
  display: none;
}

.body-expand-button .collapse-label {
  display: none;
}

.body-editor-grid {
  display: grid;
  min-height: 0;
}

.body-editor-column,
.body-preview-column {
  display: grid;
  min-height: 0;
}

.body-preview-column {
  display: none;
}

.expanded-pane-title {
  display: none;
}

.body-field textarea {
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
  height: 100%;
  resize: none;
}

.markdown-preview {
  display: none;
  min-width: 0;
  overflow: auto;
  padding: 18px 24px;
}

.markdown-preview.read-body {
  padding-right: 24px;
}

.app-view.body-expanded .layout {
  grid-template-columns: minmax(180px, 24%) 5px minmax(360px, 1fr) 5px minmax(190px, 22%);
}

.app-view.body-expanded::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(11, 16, 35, 0.28);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .app-view.body-expanded::before {
  background: rgba(255, 255, 255, 0.46);
}

.app-view.body-expanded .editor {
  overflow: visible;
}

.app-view.body-expanded .body-field {
  position: fixed;
  inset: 5vh 5vw;
  z-index: 19;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 90vw;
  height: 90vh;
  min-height: 0;
  padding: 14px 16px 16px;
}

.app-view.body-expanded .body-field-head {
  justify-content: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  position: relative;
}

.app-view.body-expanded .body-field-title {
  justify-content: center;
}

.app-view.body-expanded .body-expand-button {
  aspect-ratio: auto;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0 10px;
  position: absolute;
  right: 0;
  width: auto;
}

.app-view.body-expanded .body-editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}

.app-view.body-expanded .body-editor-column,
.app-view.body-expanded .body-preview-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.app-view.body-expanded .body-preview-column {
  border-left: 1px solid var(--line);
}

.app-view.body-expanded .expanded-pane-title {
  display: block;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  padding: 14px 18px 16px;
  text-align: center;
}

.app-view.body-expanded .markdown-preview {
  display: block;
}

.app-view.body-expanded .body-expand-button .expand-icon {
  display: none;
}

.app-view.body-expanded .body-expand-button .expand-label {
  display: none;
}

.app-view.body-expanded .body-expand-button .collapse-icon {
  display: none;
}

.app-view.body-expanded .body-expand-button .collapse-label {
  display: inline;
}

#newsBody.drag-over {
  box-shadow: none;
}

.body-field:has(#newsBody.drag-over) {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.notes {
  display: grid;
  grid-template-rows: 48px 1fr auto;
}

@media (prefers-color-scheme: dark) {
  .pane-head,
  .notes {
    background: #1B2034;
  }
}

html[data-theme="dark"] .pane-head,
html[data-theme="dark"] .notes {
  background: #1B2034;
}

html[data-theme="light"] .pane-head,
html[data-theme="light"] .notes {
  background: var(--panel);
}

html[data-theme="light"] .pane,
html[data-theme="light"] .settings-panel,
html[data-theme="light"] .auth-panel,
html[data-theme="light"] .compact-field {
  background: #FFFFFF;
  border: 0;
  box-shadow: none;
}

html[data-theme="light"] .settings-panel input,
html[data-theme="light"] .settings-panel select,
html[data-theme="light"] .auth-panel input {
  border: 1px solid #ddd6ce;
  border-radius: 8px;
}

html[data-theme="light"] .editor .compact-field,
html[data-theme="light"] .editor button {
  border: 1px solid #ddd6ce;
  box-shadow: none;
}

html[data-theme="light"] .editor button:hover {
  border-color: #cfc6bb;
  box-shadow: none;
}

.note {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin: 14px 12px;
  width: calc(100% - 24px);
}

.note-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-author strong {
  font-size: 14px;
}

.note-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
}

.note-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-chip {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-size: 16px;
  margin: 0;
  line-height: 1.35;
  white-space: pre-wrap;
  cursor: pointer;
}

.note-color-sage {
  background: #eef0d0;
  color: #30320e;
}

.note-color-mint {
  background: #d9efe6;
  color: #123b31;
}

.note-color-sky {
  background: #dcecf8;
  color: #143247;
}

.note-color-lavender {
  background: #e8e0f4;
  color: #35264a;
}

.note-color-rose {
  background: #f4dfe7;
  color: #4c1f32;
}

.note-color-peach {
  background: #f6e1d2;
  color: #4b2a16;
}

.note-color-butter {
  background: #f5edc8;
  color: #443809;
}

.note-color-stone {
  background: #e7e3dc;
  color: #34302a;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  flex-wrap: nowrap;
  white-space: nowrap;
}

.note-meta small,
.edit-note,
.delete-note {
  display: inline;
  margin: 0;
  white-space: nowrap;
}

.note-dot {
  color: var(--text);
}

.edit-note,
.delete-note {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.edit-note {
  color: var(--muted);
}

.edit-note:hover {
  background: transparent;
  color: var(--text);
  text-decoration: underline;
}

.delete-note {
  color: var(--danger);
}

.delete-note:hover {
  background: transparent;
  color: var(--danger);
  text-decoration: underline;
}

.note-edit-form {
  display: grid;
  gap: 8px;
  width: min(100%, 360px);
}

.note-edit-form textarea {
  min-height: 44px;
  overflow: hidden;
  resize: vertical;
}

.note-edit-actions {
  display: flex;
  gap: 8px;
}

.note-form {
  border-top: 1px solid var(--line);
  padding: 10px 12px 24px;
  display: grid;
  gap: 8px;
}

.note-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 82px;
  resize: vertical;
}

.note-form button {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.note-form button:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  background: var(--bg);
}

.confirm-backdrop {
  z-index: 28;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 10, 0.46);
  padding: 24px;
}

.confirm-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
  color: var(--text);
  display: grid;
  gap: 14px;
  padding: 22px;
}

.confirm-panel h2 {
  margin: 0;
}

.confirm-panel p {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}

.links-modal-backdrop {
  z-index: 29;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 10, 0.46);
  padding: 24px;
}

.links-modal-panel {
  width: min(820px, calc(100vw - 48px));
  max-height: min(780px, calc(100vh - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
  color: var(--text);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
}

.links-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.links-modal-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.links-modal-head button {
  min-height: 28px;
}

.links-modal-panel .links-list {
  max-height: none;
  min-height: 320px;
  padding-right: 2px;
}

.links-modal-panel .links-tools {
  margin: 0;
}

.episode-modal-panel {
  width: min(520px, calc(100vw - 48px));
  grid-template-rows: auto auto;
}

.episode-summary-modal-panel {
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, calc(100vw - 48px));
}

.episode-summary-modal-body {
  align-items: center;
  display: grid;
  gap: 24px;
  justify-items: center;
  min-height: 320px;
  padding: 42px 20px 28px;
}

.episode-summary-generate-button {
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  max-width: min(520px, 100%);
  padding: 14px 18px;
  text-align: center;
}

.episode-summary-result {
  align-self: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  margin: 0;
  max-height: 42vh;
  overflow: auto;
  padding: 18px;
  width: 100%;
}

.episode-form {
  display: grid;
  gap: 12px;
}

.episode-modal-field {
  border: 1px solid #8f96a3;
  border-left: 0;
  background: #f8f9fb;
  box-shadow: inset 8px 0 0 #4f5863;
  min-height: 54px;
  padding: 10px 16px 10px 18px;
}

.episode-modal-field input {
  min-height: 24px;
  font-size: 15px;
}

.episode-modal-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}

html[data-theme="dark"] .episode-modal-field {
  border-color: #2b324b;
  background: var(--input);
  box-shadow: inset 8px 0 0 #8c93a3;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .episode-modal-field {
    border-color: #2b324b;
    background: var(--input);
    box-shadow: inset 8px 0 0 #8c93a3;
  }
}

.links-modal-panel .link-row {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
}

.links-modal-panel .link-field {
  border: 1px solid #c7c7cf;
  border-left: 8px solid #555c66;
  border-radius: 8px;
  background: var(--input);
  gap: 4px;
  height: 46px;
  max-height: 46px;
  min-height: 46px;
  overflow: hidden;
  padding: 6px 12px 6px 14px;
}

.links-modal-panel .link-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.links-modal-panel .link-field input {
  min-height: 18px;
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.links-modal-panel .remove-link-button {
  align-self: stretch;
  width: 46px;
  height: 46px;
  max-height: 46px;
  min-height: 46px;
  border-radius: 8px;
  font-size: 18px;
}

html[data-theme="light"] .links-modal-panel .link-field {
  border-color: #c7c7cf;
  border-left-color: #555c66;
}

html[data-theme="dark"] .links-modal-panel .link-field {
  border-color: #2b324b;
  border-left-color: #8c93a3;
}

@media (prefers-color-scheme: dark) {
  .links-modal-panel .link-field {
    border-color: #2b324b;
    border-left-color: #8c93a3;
  }
}

.note-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  padding: 24px;
}

.image-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
  padding: 24px;
}

.image-viewer {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(1200px, 100%);
  max-height: calc(100vh - 48px);
}

.image-viewer img {
  grid-column: 2;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  justify-self: center;
  border-radius: 18px;
}

.image-viewer-arrow {
  align-self: stretch;
  min-height: 180px;
  border-radius: 16px;
  font-size: 52px;
  line-height: 1;
}

.image-viewer-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.image-viewer-actions {
  grid-column: 2;
  justify-self: center;
  display: flex;
  gap: 10px;
}

@media (max-width: 680px) {
  .image-viewer {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 10px;
  }

  .image-viewer-arrow {
    min-height: 110px;
    font-size: 34px;
  }
}

.note-viewer {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(900px, 100%);
}

.note-viewer-main {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-height: 80vh;
}

.viewer-note-chip {
  width: fit-content;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 14px;
  font-size: 30px;
  line-height: 1.25;
  margin: 0;
  overflow: auto;
  padding: 22px 26px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: pre-wrap;
}

.viewer-note-chip::-webkit-scrollbar {
  display: none;
}

.note-viewer small {
  color: #ffffff;
  font-size: 15px;
}

.note-viewer-actions {
  display: flex;
  gap: 10px;
}

.note-viewer-arrow {
  align-self: stretch;
  min-height: 140px;
  border-radius: 16px;
  font-size: 48px;
  line-height: 1;
}

.note-viewer-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 680px) {
  .note-viewer-main {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    gap: 10px;
  }

  .note-viewer-arrow {
    min-height: 100px;
    font-size: 34px;
  }
}

.settings-panel {
  width: 100%;
  min-height: 100vh;
  background: var(--panel);
}

.settings-head {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.settings-head h2 {
  margin: 0;
}

.settings-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  padding: 18px 12px;
}

.settings-sidebar {
  display: grid;
  align-content: start;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.settings-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  padding: 8px 10px;
  font-weight: 700;
  text-align: left;
}

.settings-tab:hover,
.settings-tab.active {
  background: var(--button);
  box-shadow: none;
}

.settings-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.settings-content {
  min-width: 0;
}

.settings-section {
  display: grid;
  gap: 14px;
}

.settings-section h3 {
  margin: 0;
  font-size: 18px;
}

.settings-section-body {
  padding: 0;
}

.settings-help-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 100;
  line-height: 1.4;
}

.settings-inline-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 100;
  line-height: 1.35;
  text-decoration: none;
}

.settings-inline-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.settings-panel button {
  border: 1px solid var(--line);
  box-shadow: none;
}

.settings-panel button:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.settings-panel .settings-tab.active {
  border-color: var(--accent);
}

.settings-panel input,
.settings-panel select,
.settings-panel textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.password-form,
.api-keys-form,
.ai-features-form {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.api-keys-form input,
.api-keys-form select,
.api-keys-form button,
.provider-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  min-height: 40px;
  padding: 8px;
}

.provider-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.provider-options legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--muted);
}

.provider-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.provider-option input {
  appearance: none;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
}

.provider-option input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.provider-option input:checked::after {
  content: "✓";
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.api-provider-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.api-provider-card h4 {
  margin: 0;
  font-size: 15px;
}

.global-setting-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  padding: 8px 10px;
}

.ai-features-form {
  max-width: 640px;
}

.ai-features-form textarea {
  min-height: 220px;
  resize: vertical;
}

.ai-features-form button {
  justify-self: start;
}

.profile-picture-editor {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.profile-picture-preview {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--input);
  color: var(--muted);
  overflow: hidden;
}

.profile-picture-preview svg {
  width: 52px;
  height: 52px;
}

.profile-picture-preview.has-image svg {
  display: none;
}

.profile-picture-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-picture-upload input {
  min-height: 40px;
}

.settings-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

.color-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.color-choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  text-transform: capitalize;
}

.color-choice:hover,
.color-choice.selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.color-choice.note-color-sage:hover,
.color-choice.note-color-sage.selected {
  background: #eef0d0;
  color: #30320e;
}

.color-choice.note-color-mint:hover,
.color-choice.note-color-mint.selected {
  background: #d9efe6;
  color: #123b31;
}

.color-choice.note-color-sky:hover,
.color-choice.note-color-sky.selected {
  background: #dcecf8;
  color: #143247;
}

.color-choice.note-color-lavender:hover,
.color-choice.note-color-lavender.selected {
  background: #e8e0f4;
  color: #35264a;
}

.color-choice.note-color-rose:hover,
.color-choice.note-color-rose.selected {
  background: #f4dfe7;
  color: #4c1f32;
}

.color-choice.note-color-peach:hover,
.color-choice.note-color-peach.selected {
  background: #f6e1d2;
  color: #4b2a16;
}

.color-choice.note-color-butter:hover,
.color-choice.note-color-butter.selected {
  background: #f5edc8;
  color: #443809;
}

.color-choice.note-color-stone:hover,
.color-choice.note-color-stone.selected {
  background: #e7e3dc;
  color: #34302a;
}

@media (max-width: 820px) {
  .app-view {
    height: 100vh;
    min-height: 100vh;
    grid-template-rows: auto 1fr;
  }

  .topbar {
    height: auto;
    min-height: 38px;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px 8px;
  }

  .topbar-logo img {
    width: 92px;
  }

  .topbar nav {
    gap: 8px;
    margin-left: auto;
  }

  .topbar nav button {
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    padding: 5px 7px;
  }

  .topbar nav button:hover {
    background: transparent;
    box-shadow: none;
    color: var(--text);
  }

  .topbar-icon-button svg {
    height: 12px;
    width: 12px;
  }

  .layout {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .mobile-pane-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    padding: 5px 6px;
    position: sticky;
    top: 0;
    z-index: 8;
  }

  .mobile-pane-tab {
    border: 1px solid var(--line);
    box-shadow: none;
    min-height: 28px;
    border-radius: 7px;
    font-size: 11px;
    padding: 4px 6px;
  }

  .mobile-pane-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
  }

  .pane {
    min-height: 0;
    height: 100%;
    border-bottom: 1px solid var(--line);
  }

  .layout[data-mobile-pane="navigator"] .content,
  .layout[data-mobile-pane="navigator"] .notes,
  .layout[data-mobile-pane="content"] .navigator,
  .layout[data-mobile-pane="content"] .notes,
  .layout[data-mobile-pane="notes"] .navigator,
  .layout[data-mobile-pane="notes"] .content {
    display: none;
  }

  .layout[data-mobile-pane="navigator"] .navigator,
  .layout[data-mobile-pane="content"] .content,
  .layout[data-mobile-pane="notes"] .notes {
    display: grid;
  }

  .layout[data-mobile-pane="navigator"] .navigator {
    grid-template-rows: 36px minmax(0, 1fr);
    overflow: hidden;
  }

  .layout[data-mobile-pane="navigator"] .news-list {
    min-height: 0;
    overflow: auto;
    padding-top: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .layout[data-mobile-pane="navigator"] .news-list::-webkit-scrollbar {
    display: none;
  }

  .layout[data-mobile-pane="content"] .content {
    grid-template-rows: 36px auto minmax(0, 1fr);
    overflow: hidden;
  }

  .layout[data-mobile-pane="content"] .content.editing-content {
    display: grid;
    grid-template-rows: 36px auto minmax(0, 1fr);
    overflow: hidden;
  }

  .layout[data-mobile-pane="notes"] .notes {
    grid-template-rows: 36px minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .layout[data-mobile-pane="content"] .read-view {
    overflow: auto;
  }

  .pane-head {
    height: 36px;
    min-height: 36px;
    padding: 0 8px 0 10px;
    top: 0;
  }

  .pane-head h2 {
    font-size: 13px;
  }

  .article-controls {
    flex-wrap: wrap;
    gap: 5px 9px;
    padding: 6px 10px 2px;
  }

  .current-toggle {
    gap: 4px;
    font-size: 11px;
    line-height: 1;
  }

  .current-toggle input {
    width: 12px;
    height: 12px;
    margin: 0;
  }

  .head-actions {
    gap: 5px;
  }

  .head-actions button,
  #newNewsButton {
    min-height: 26px;
    font-size: 11px;
    padding: 4px 7px;
  }

  .icon-text-button {
    gap: 4px;
  }

  .icon-text-button svg {
    width: 12px;
    height: 12px;
  }

  .editor {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(300px, 1fr) auto;
    gap: 5px;
    overflow: hidden;
    padding: 10px 12px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .editor::-webkit-scrollbar {
    display: none;
  }

  .app-view:not(.body-expanded) .body-expand-button {
    display: none;
  }

  .line-field,
  .title-field {
    border-left-width: 4px;
    column-gap: 6px;
    min-height: 28px;
    padding: 2px 0 2px 8px;
  }

  .editor-meta-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .line-field span,
  .line-field select,
  .title-field span,
  .title-field input {
    font-size: 12px;
  }

  .editor .compact-field {
    border-radius: 8px;
    gap: 4px;
    min-height: 42px;
    padding: 8px 12px;
  }

  .editor .compact-field:not(.body-field) {
    min-height: 38px;
    padding: 7px 12px;
  }

  .editor .link-field {
    min-height: 32px;
    padding: 5px 10px;
  }

  .episode-control {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 6px;
  }

  .compact-field span {
    font-size: 10px;
  }

  .compact-field input {
    min-height: 20px;
    font-size: 13px;
    line-height: 1.2;
  }

  .link-row {
    position: relative;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .links-list {
    gap: 4px;
  }

  #adjustMarkdownButton {
    min-height: 24px;
    font-size: 10px;
    padding: 4px 7px;
  }

  .links-tools {
    min-height: 18px;
    margin: -2px 0 0;
  }

  .add-link-pill {
    display: inline-flex;
    justify-self: start;
    align-self: start;
    min-height: 0;
    height: 20px;
    width: auto;
    max-width: calc(100% - 2px);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    padding: 0 8px;
    white-space: nowrap;
  }

  .link-row .compact-field {
    padding-right: 36px;
  }

  .link-row .link-field {
    padding-right: 34px;
  }

  .links-modal-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .links-modal-panel .links-list {
    min-height: 280px;
  }

  .links-modal-panel .link-field {
    gap: 5px;
    height: 46px;
    max-height: 46px;
    min-height: 46px;
    padding: 6px 12px 6px 14px;
  }

  .links-modal-panel .link-field span {
    font-size: 12px;
  }

  .links-modal-panel .link-field input {
    min-height: 18px;
    font-size: 15px;
  }

  .links-modal-panel .remove-link-button {
    position: static;
    align-self: stretch;
    width: 46px;
    height: 46px;
    max-height: 46px;
    min-height: 46px;
    border-radius: 8px;
    font-size: 18px;
  }

  .remove-link-button {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 24px;
    min-height: 24px;
    border-radius: 50%;
    font-size: 17px;
    padding: 0;
    z-index: 1;
  }

  .body-field {
    min-height: 0;
    overflow: hidden;
  }

  .body-field textarea,
  #newsBody {
    height: 100%;
    min-height: 0;
    font-size: 13px;
    line-height: 1.34;
  }

  .editor-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    margin-top: 1px;
    padding-top: 7px;
  }

  .tag-editor {
    min-height: 26px;
    min-width: 0;
    gap: 4px;
    padding: 2px 6px;
  }

  .tag-chips {
    gap: 4px;
  }

  .tag-chip {
    max-width: 130px;
    font-size: 10px;
    padding: 4px 5px 4px 7px;
  }

  .tag-chip button {
    min-height: 16px;
    width: 16px;
    font-size: 11px;
  }

  #tagInput {
    min-width: 72px;
    font-size: 11px;
  }

  .read-view {
    padding: 10px 10px 18px;
    line-height: 1.35;
  }

  .read-view h1,
  .read-view.article-scrolled h1,
  .presenter-mode .read-view h1 {
    position: static;
    top: auto;
    z-index: auto;
    margin: 0 0 12px;
    padding: 0;
    font-size: 30px;
    line-height: 0.98;
    transition: none;
  }

  .read-view h1::before,
  .read-view h1::after {
    display: none;
  }

  .read-links,
  .read-tags {
    gap: 5px;
    margin-bottom: 14px;
  }

  .read-links-title {
    font-size: 10px;
    margin-bottom: 1px;
  }

  .read-link {
    gap: 5px;
    font-size: 11px;
  }

  .read-link svg {
    width: 12px;
    height: 12px;
  }

  .read-tags-list {
    gap: 5px;
  }

  .read-tag {
    max-width: 160px;
    border-radius: 8px;
    font-size: 10px;
    padding: 4px 7px;
  }

  .read-body {
    font-size: 12px;
    line-height: 1.25;
    padding-right: 0;
  }

  .read-body p {
    margin: 10px 0;
  }

  .read-body h2,
  .read-body h3,
  .read-body h4 {
    margin: 14px 0 8px;
    line-height: 1.15;
  }

  .read-body img {
    border-radius: 12px;
    margin: 12px 0;
  }

  .read-body ul,
  .read-body ol {
    margin: 8px 0 12px;
    padding-left: 20px;
  }

  .read-body li {
    margin: 4px 0;
    padding-left: 0;
  }

  .read-body blockquote {
    margin: 12px 0;
    padding: 8px 10px;
  }

  .resizer {
    display: none;
  }

  .news-row {
    grid-template-columns: 24px 1fr;
  }

  .drag-handle {
    min-height: 34px;
    font-size: 11px;
  }

  .news-item {
    min-height: 34px;
    padding: 9px 8px 9px 0;
  }

  .news-item strong {
    font-size: 13px;
    line-height: 1.12;
  }

  .news-item span {
    font-size: 10px;
    margin-top: 4px;
  }

  .news-badges {
    gap: 6px 7px;
    margin-bottom: 4px;
  }

  .bonus-pill,
  .body-length-pill,
  .tag-pill {
    border-radius: 7px;
    font-size: 8px;
    padding: 3px 5px;
  }

  .notes-list {
    min-height: 0;
    overflow: auto;
    padding: 2px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .notes-list::-webkit-scrollbar {
    display: none;
  }

  .note {
    gap: 4px;
    margin: 9px 10px;
    width: calc(100% - 20px);
  }

  .note-author {
    gap: 6px;
    font-size: 12px;
  }

  .note-avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .note-chip {
    font-size: 14px;
    line-height: 1.28;
    padding: 8px 10px;
  }

  .note-meta {
    gap: 5px;
    font-size: 11px;
  }

  .note-form {
    gap: 6px;
    padding: 8px 10px 16px;
  }

  .note-form textarea {
    min-height: 58px;
    font-size: 13px;
    padding: 7px;
  }

  .note-form button {
    min-height: 30px;
    font-size: 12px;
    padding: 5px 8px;
  }

  .title-row,
  .link-row {
    grid-template-columns: 1fr;
  }

  .settings-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .settings-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    grid-template-columns: 1fr;
    padding: 0 0 12px;
  }

  .read-body > :not(img) {
    padding-left: 0;
  }

  .read-body blockquote {
    margin-left: 0;
  }

  #newsBody {
    min-height: 0;
  }
}

.links-modal-panel label.compact-field.link-field {
  border: 1px solid #8f96a3;
  border-left: 0;
  background: #f8f9fb;
  box-shadow: inset 8px 0 0 #4f5863;
  padding-left: 18px;
}

html[data-theme="light"] .links-modal-panel label.compact-field.link-field {
  border-color: #8f96a3;
  background: #f8f9fb;
  box-shadow: inset 8px 0 0 #4f5863;
}

html[data-theme="dark"] .links-modal-panel label.compact-field.link-field {
  border-color: #2b324b;
  background: var(--input);
  box-shadow: inset 8px 0 0 #8c93a3;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .links-modal-panel label.compact-field.link-field {
    border-color: #2b324b;
    background: var(--input);
    box-shadow: inset 8px 0 0 #8c93a3;
  }
}
