/* ============================================================
   Design tokens
   ============================================================ */

[v-cloak] {
  display: none !important;
}

html {
  font-size: 14px !important;
}

body {
  /* shared across themes */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  /* light theme defaults (overridden per theme below) */
  --bg:               #f7f7f6;
  --surface:          #ffffff;
  --surface-raised:   #f0f0ee;
  --border:           rgba(0, 0, 0, 0.09);
  --border-strong:    rgba(0, 0, 0, 0.16);
  --text:             #1a1a18;
  --text-muted:       #68686480;
  --accent-color:     #2b6b4a;
  --accent-contrast-color: #ffffff;
  --hover-bg:         #edede9;
  --active-bg:        #e4e4e0;
  --feed-folder-sticky-bg: #f7f7f6;
  --toolbar-bg:       #ffffff;
  --pane-divider-line: rgba(0, 0, 0, 0.09);
  --pane-divider-solid: #e1e1e0;
  --pane-resize-handle-bg: rgba(43, 107, 74, 0.3);
  --pane-resize-handle-bg-hover: var(--accent-color);
  --pane-resize-handle-ring: rgba(247, 247, 246, 0.9);
  --item-list-separator-color: rgba(0, 0, 0, 0.07);
  --article-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.06);
  --article-card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.09);
  --action-button-border-color: rgba(0, 0, 0, 0.13);
  --action-button-hover-bg:    #f0f0ee;
  --action-button-shadow:      0 1px 2px rgba(0, 0, 0, 0.06);
  --action-button-shadow-active: inset 0 1px 2px rgba(0, 0, 0, 0.10);
  --skeleton-base:      rgba(0, 0, 0, 0.07);
  --skeleton-highlight: rgba(255, 255, 255, 0.60);
  --skeleton-card-bg:   rgba(255, 255, 255, 0.5);
  --skeleton-card-border: rgba(0, 0, 0, 0.05);
  --content-table-border:     #d8d8d4;
  --content-table-header-bg:  #efefeb;
  --content-table-stripe-bg:  rgba(0, 0, 0, 0.025);
  --generated-card-bg:        #ffffff;
  --generated-card-border:    #d8d8d4;
  --generated-card-meta-color: #6b6b67;
  --generated-card-title-color: #1a1a18;

  font-family: "LXGW WenKai", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: normal;
  overscroll-behavior: none;
  color: var(--text);
  background-color: var(--bg);
}

body.font-lxgw-wenkai {
  font-family: "LXGW WenKai", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.font-noto-sans-cjk {
  font-family: "Noto Sans CJK", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.font-gensen-rounded2-tc {
  font-family: "GenSenRounded2 TC", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ============================================================
   Bootstrap customizations
   ============================================================ */

.btn-link {
  color: var(--accent-color);
}

.btn-link:hover {
  color: var(--accent-color);
}

.form-control {
  font-size: 0.9rem;
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
}

.form-control, .form-control:focus {
  box-shadow: none !important;
}

.form-control:focus {
  border-color: var(--accent-color);
}

select.form-control {
  -webkit-appearance: none;
}

select.form-control:not([multiple]):not([size]) {
  padding-right: 1.2rem;
  cursor: pointer;
}

.btn:focus {
  box-shadow: none !important;
}

.popover:focus {
  outline: none;
}

.table-compact {
  color: unset !important;
}

.table-compact tr td:first-child {
  padding-left: 0;
}

.table-compact tr td:last-child {
  padding-right: 0;
}

/* ============================================================
   Scroll
   ============================================================ */

.scroll-touch {
  -webkit-overflow-scrolling: touch;
}

.pull-refresh-scroll {
  --pull-refresh-offset: 0px;
  overscroll-behavior-y: contain;
  position: relative;
}

.pull-refresh-scroll > :not(.pull-refresh-indicator) {
  transform: translateY(var(--pull-refresh-offset));
  transition: transform .18s ease-out;
}

.pull-refresh-pulling > :not(.pull-refresh-indicator) {
  transition: none;
}

.pull-refresh-indicator {
  align-items: center;
  display: flex;
  height: 2rem;
  justify-content: center;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: .25rem;
  transform: translateY(calc(var(--pull-refresh-offset) - 2rem));
  transition: opacity .18s ease-out, transform .18s ease-out;
  z-index: 2;
}

.pull-refresh-pulling .pull-refresh-indicator,
.pull-refresh-refreshing .pull-refresh-indicator {
  opacity: .6;
}

.pull-refresh-ready .pull-refresh-indicator,
.pull-refresh-refreshing .pull-refresh-indicator {
  opacity: 1;
}

#feed-list-scroll,
#item-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
}

/* auto-hiding thin scrollbars: thumb only visible while scrolling or hovered */

#feed-list-scroll::-webkit-scrollbar,
#item-list-scroll::-webkit-scrollbar,
.content::-webkit-scrollbar,
.settings-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

/* the auto-hidden scrollbar still occupies 6px on the right; mirror it on the
   left so content sits equidistant from both pane dividers */
#feed-list-scroll,
#item-list-scroll,
.content,
.settings-scroll {
  scrollbar-gutter: stable both-edges;
}

#feed-list-scroll::-webkit-scrollbar-track,
#item-list-scroll::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track,
.settings-scroll::-webkit-scrollbar-track {
  background: transparent;
}

#feed-list-scroll::-webkit-scrollbar-thumb,
#item-list-scroll::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb,
.settings-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

.is-scrolling::-webkit-scrollbar-thumb {
  background: var(--border-strong) !important;
}

#feed-list-scroll::-webkit-scrollbar-thumb:hover,
#item-list-scroll::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover,
.settings-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent-color) 60%, var(--border-strong)) !important;
}

/* Firefox: standard properties (Chrome ignores ::-webkit-scrollbar when these are set, so scope them) */
@supports not selector(::-webkit-scrollbar) {
  #feed-list-scroll,
  #item-list-scroll,
  .content,
  .settings-scroll {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }
  .is-scrolling {
    scrollbar-color: var(--border-strong) transparent;
  }
}

/* ============================================================
   Icon primitive
   ============================================================ */

.icon {
  height: 1rem;
  width: 1rem;
  display: inline-block;
  line-height: 1;
}

.icon > svg,
.icon > img {
  width: 1rem;
  height: 1rem;
  vertical-align: top;
}

.icon-small {
  width: .6rem;
  height: .6rem;
  display: inline-block;
}

.icon-small > svg,
.icon-small > img {
  width: .6rem;
  height: .6rem;
}

/* ============================================================
   Selectgroup (feed / item rows)
   ============================================================ */

.counter {
  padding-left: .4rem;
  opacity: .5;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}

.light {
  opacity: .55;
}

.selectgroup {
  position: relative;
  display: block;
  margin: 0;
}

.selectgroup *, .noselect {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.selectgroup input {
  opacity: 0;
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  height: 100%;
}

.selectgroup + .selectgroup {
  margin-top: 1px;
}

.selectgroup-label {
  padding: .3rem .45rem;
  border-radius: var(--radius-sm);
  overflow-wrap: break-word;
  transition: background-color .1s ease;
}

.selectgroup-label:hover {
  cursor: pointer;
  background-color: var(--hover-bg);
}

.feed-folder-sticky {
  background-color: var(--feed-folder-sticky-bg);
  position: sticky;
  top: -.5rem;
  z-index: 2;
}

.selectgroup-action {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: flex;
  flex-shrink: 0;
  height: 1.6rem;
  justify-content: center;
  opacity: .6;
  padding: 0;
  width: 1.6rem;
}

.selectgroup-action:hover {
  opacity: 1;
}

.selectgroup-action:focus {
  outline: none;
}

.feed-unread-count {
  flex: 0 1 auto;
  line-height: 1;
  max-width: 3rem;
  overflow: hidden;
  padding-left: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Item list rows
   ============================================================ */

#item-list-scroll .item-status-read {
  color: var(--text-muted);
}

#item-list-scroll input:checked + .selectgroup-label {
  color: inherit;
}

#item-list-scroll input:checked + .selectgroup-label .item-list-title {
  color: var(--accent-color);
}

.item-list-title {
  font-size: .9rem;
  line-height: 1.35;
  font-weight: 500;
}

.text-muted {
  color: var(--text-muted) !important;
}

.item-list-text {
  min-width: 0;
}

.item-list-meta {
  line-height: 100%;
  opacity: .65;
  margin-bottom: .15rem;
}

.item-list-attribution {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .25rem;
}

.item-source-name,
.item-author {
  flex: 0 1 auto;
  min-width: 0;
}

.item-list-attribution.has-author .item-source-name {
  max-width: 50%;
}

.item-author {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
}

.item-author-name {
  flex: 1;
  min-width: 0;
}

.author-icon,
.author-icon > svg {
  width: 1em;
  height: 1em;
}

.author-icon {
  flex-shrink: 0;
}

.item-author,
.content-author {
  background-color: color-mix(in srgb, var(--accent-color) 10%, transparent);
  border-radius: .2rem;
  padding: .05rem .25rem;
}

#item-list-scroll input:checked + .selectgroup-label .item-author {
  background-color: color-mix(in srgb, var(--accent-color) 14%, transparent);
}

.content-attribution {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: .3rem;
}

.content-author {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.content-author-name {
  min-width: 0;
}

.content-attribution .author-icon {
  margin-right: .2rem;
}

.item-list-image {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: cover;
}

/* ============================================================
   Article list layouts
   ============================================================ */

/* separators live in the 1px gap between rows (not on the row itself) so rows
   keep all four corners rounded; they hide next to a hovered/selected row */
.article-list-layout-list #item-list-scroll .selectgroup + .selectgroup {
  margin-top: 1px;
}

.article-list-layout-list #item-list-scroll .selectgroup + .selectgroup::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--item-list-separator-color);
  pointer-events: none;
}

.article-list-layout-list #item-list-scroll .selectgroup:hover::before,
.article-list-layout-list #item-list-scroll .selectgroup:hover + .selectgroup::before,
.article-list-layout-list #item-list-scroll .selectgroup:has(input:checked)::before,
.article-list-layout-list #item-list-scroll .selectgroup:has(input:checked) + .selectgroup::before {
  background: transparent;
}

/* equal visual gutter on all four sides and between cards. Horizontally the
   symmetric 6px scrollbar gutter already adds space, so subtract it; the right
   side also loses 1px to the pane divider drawn inside the column. */
.article-list-layout-card #item-list-scroll {
  --card-gap: .9rem;
  padding: var(--card-gap) calc(var(--card-gap) - 6px + 1px) var(--card-gap) calc(var(--card-gap) - 6px) !important;
}

.article-list-layout-card #item-list-scroll .selectgroup + .selectgroup {
  margin-top: var(--card-gap);
}

.article-list-layout-card #item-list-scroll .selectgroup-label {
  flex-direction: column;
  align-items: stretch !important;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--article-card-shadow);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, background-color .1s ease;
}

.article-list-layout-card #item-list-scroll .selectgroup-label:hover {
  box-shadow: var(--article-card-shadow-hover);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .article-list-layout-card #item-list-scroll .selectgroup-label,
  .article-list-layout-card #item-list-scroll .selectgroup-label:hover {
    transition: none;
    transform: none;
  }
}

.article-list-layout-card #item-list-scroll input:checked + .selectgroup-label,
.article-list-layout-card #item-list-scroll input:checked + .selectgroup-label:hover {
  background-color: color-mix(in srgb, var(--accent-color) 7%, var(--generated-card-bg)) !important;
  box-shadow: 0 0 0 1.5px var(--accent-color), var(--article-card-shadow);
}

.article-list-layout-card .item-list-text {
  width: 100%;
  padding: .45rem .6rem;
}

.article-list-layout-card .item-list-title {
  line-height: 1.3;
}

.article-list-layout-card .item-list-image {
  order: -1;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-left: 0 !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ============================================================
   Skeleton / shimmer
   ============================================================ */

.item-list-skeleton-shimmer {
  background: linear-gradient(90deg,
    var(--skeleton-base) 0%,
    var(--skeleton-highlight) 50%,
    var(--skeleton-base) 100%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.45s ease-in-out infinite;
}

.item-list-skeleton {
  display: grid;
  gap: .2rem;
}

.item-list-skeleton-row + .item-list-skeleton-row {
  margin-top: .2rem;
}

.item-list-skeleton-card {
  display: flex;
  align-items: center;
  gap: .45rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.item-list-skeleton-image {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.item-list-skeleton-text {
  flex: 1 1 auto;
  min-width: 0;
}

.item-list-skeleton-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .3rem;
}

.item-list-skeleton-line {
  border-radius: 999px;
  display: block;
  height: .65rem;
}

.item-list-skeleton-line-feed {
  width: 40%;
}

.item-list-skeleton-line-time {
  width: 18%;
}

.item-list-skeleton-line-title {
  width: 86%;
  height: .85rem;
}

.item-list-skeleton-line-title-short {
  width: 58%;
  height: .85rem;
  margin-top: .3rem;
}

.article-list-layout-list .item-list-skeleton-row + .item-list-skeleton-row .item-list-skeleton-card {
  border-top: 1px solid var(--item-list-separator-color);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding-top: .45rem;
}

.article-list-layout-card .item-list-skeleton {
  gap: var(--card-gap);
}

.article-list-layout-card .item-list-skeleton-row + .item-list-skeleton-row {
  margin-top: 0;
}

.article-list-layout-card .item-list-skeleton-card {
  align-items: stretch;
  background: var(--skeleton-card-bg);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--article-card-shadow);
  flex-direction: column;
  gap: 0;
}

.article-list-layout-card .item-list-skeleton-image {
  order: -1;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.article-list-layout-card .item-list-skeleton-text {
  padding: .45rem .6rem;
}

/* article content skeleton */

.content-skeleton {
  display: grid;
  gap: 1rem;
}

.content-skeleton-header {
  display: grid;
  gap: .55rem;
}

.content-skeleton-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.content-skeleton-body {
  display: grid;
  gap: .7rem;
}

.content-skeleton-line {
  border-radius: 999px;
  display: block;
  height: .9rem;
  width: 100%;
}

.content-skeleton-title {
  height: 1.5rem;
  width: 74%;
}

.content-skeleton-title-short {
  height: 1.5rem;
  width: 50%;
}

.content-skeleton-feed {
  width: 11rem;
  max-width: 46%;
}

.content-skeleton-time {
  width: 8rem;
  max-width: 30%;
}

.content-skeleton-line-wide {
  width: 90%;
}

.content-skeleton-line-medium {
  width: 74%;
}

.content-skeleton-line-short {
  width: 56%;
}

.content-skeleton-media {
  border-radius: var(--radius-md);
  display: block;
  height: min(17rem, 30vw);
  width: 100%;
}

/* ============================================================
   Interactive states
   ============================================================ */

.toolbar-item:hover,
.selectgroup-label:hover {
  background-color: var(--hover-bg);
}

/* folder chevron: rotate in step with the collapse animation */
.feed-folder-sticky .selectgroup-label > .icon:first-child {
  transition: transform .2s ease;
}

.expanded {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .feed-folder-sticky .selectgroup-label > .icon:first-child {
    transition: none;
  }
}

a {
  color: var(--accent-color);
}

.btn-link:hover {
  text-decoration: none;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: .75rem 0;
}

.content-source-name {
  cursor: pointer;
}

.content-source-name:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.toolbar-item.active,
.settings-segmented .btn.active,
.refresh-rate-picker .btn.active {
  color: var(--accent-contrast-color);
  background-color: var(--accent-color) !important;
}

/* selected feed / article row: tinted background + accent text, not a solid block */
.selectgroup input:checked + .selectgroup-label {
  color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color) 12%, transparent) !important;
}

.selectgroup input:checked + .selectgroup-label .counter {
  opacity: .8;
}

#feed-list-scroll input:checked + .selectgroup-label {
  font-weight: 600;
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes stroke {
  from { stroke-dashoffset: 120; }
  to   { stroke-dashoffset: 0; }
}

@keyframes rotate {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

@keyframes skeleton-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

.loading {
  color: transparent !important;
  min-height: .8rem;
  pointer-events: none;
  position: relative;
}

.loading::after {
  animation: rotate .5s infinite linear;
  border: .1rem solid rgba(128, 128, 128, .5);
  border-radius: 50%;
  border-right-color: transparent;
  border-top-color: transparent;
  content: "";
  display: block;
  height: 1rem;
  width: 1rem;
  left: 50%;
  margin-left: -.5rem;
  margin-top: -.5rem;
  position: absolute;
  top: 50%;
  z-index: 1;
}

.icon-loading > svg {
  animation: stroke 2s infinite normal;
  stroke-dasharray: 60;
}

.app-logo-refreshing {
  animation: rotate .9s linear 1;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  .app-logo-refreshing {
    animation: none;
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-default {
  border: 1px solid var(--action-button-border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--action-button-shadow);
}

.btn-default:active {
  background: var(--action-button-hover-bg);
  box-shadow: var(--action-button-shadow-active);
}

.btn-outline {
  border: 1px solid var(--action-button-border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--action-button-shadow);
}

.btn-outline:hover {
  background-color: var(--action-button-hover-bg);
}

/* markup keeps bootstrap classes (pinned by tests); look matches .settings-btn */
.item-list-mark-read.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  height: 1.9rem;
  margin-right: auto;
  margin-left: auto;
  padding: 0 .85rem;
  font-size: .8rem;
  line-height: 1;
  color: inherit;
  background: transparent;
  border: 1px solid var(--item-list-separator-color);
  border-color: color-mix(in srgb, currentColor 12%, transparent);
  border-radius: var(--radius-sm);
  box-shadow: none;
  transition: background-color .1s ease, color .1s ease, border-color .1s ease;
}

.item-list-mark-read.btn:hover {
  color: var(--accent-color);
  border-color: color-mix(in srgb, var(--accent-color) 40%, transparent);
  background: color-mix(in srgb, var(--accent-color) 6%, transparent);
}

/* ============================================================
   Three-pane layout
   ============================================================ */

#col-feed-list,
#col-item-list {
  border-right-width: 0 !important;
  /* opaque divider so it reads identically over toolbar and pane backgrounds */
  box-shadow: 1px 0 0 var(--pane-divider-solid);
}

#col-feed-list {
  z-index: 3;
}

#col-item-list {
  z-index: 2;
}

#col-item {
  position: relative;
  z-index: 1;
}

/* ============================================================
   Toolbar
   ============================================================ */

.toolbar {
  min-height: 2.25rem !important;
  max-height: 2.25rem !important;
  flex-shrink: 0;
}

/* toolbar: own background + soft downward shadow for depth */
.toolbar:not(.border-top) {
  background-color: var(--toolbar-bg);
  position: relative;
  z-index: 3;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.10);
  /* clip the shadow on the left/right/top so it never bleeds over pane dividers */
  clip-path: inset(0 0 -12px 0);
}

#feed-list-scroll,
#item-list-scroll,
#col-item .content {
  border-top-width: 0 !important;
}

.toolbar-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  background-color: transparent;
  text-decoration: none;
  user-select: none;
  border: 1px solid transparent;
  padding: .25rem .45rem;
  font-size: .85rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  color: inherit;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color .1s ease;
}

.toolbar-display-icon #col-item .toolbar-label,
.toolbar-display-text #col-item .toolbar-icon,
.toolbar-narrow #col-item .toolbar-label {
  display: none;
}

.toolbar-narrow #col-item .toolbar-icon {
  display: inline-block;
}

.toolbar-display-text #col-item .toolbar-item-icon-only .toolbar-icon {
  display: inline-block;
}

.toolbar-spacer {
  pointer-events: none;
  visibility: hidden;
}

.content-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  margin-left: .2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.content-mode-switch .toolbar-item {
  border-radius: 0;
  min-width: 2.6rem;
  border: none;
}

.content-mode-switch .toolbar-item:first-child {
  border-bottom-left-radius: var(--radius-sm);
  border-top-left-radius: var(--radius-sm);
}

.content-mode-switch .toolbar-item:last-child {
  border-bottom-right-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
}

.toolbar-status-active .toolbar-icon,
.toolbar-status-active .toolbar-label {
  color: var(--accent-color);
  font-weight: 600;
}

.toolbar-item:focus {
  outline: none;
}

.toolbar-item:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-default {
  cursor: default;
}

/* ============================================================
   Pane resize handle
   ============================================================ */

.drag {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  z-index: 900;
  cursor: col-resize;
}

.drag::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1px;
  width: 3px;
  height: 28px;
  border-radius: 999px;
  background-color: var(--pane-resize-handle-bg);
  box-shadow: 0 0 0 3px var(--pane-resize-handle-ring);
  opacity: .4;
  transform: translateY(-50%);
  transition: background-color .15s ease, opacity .15s ease;
}

.drag:hover::after {
  background-color: var(--pane-resize-handle-bg-hover);
  opacity: 1;
}

/* ============================================================
   Item list toolbar specifics
   ============================================================ */

.item-list-unread-first {
  flex: 0 0 auto;
}

.item-list-selection-settings {
  flex: 0 0 auto;
}

#col-item-list .toolbar-item-icon-only {
  margin-left: .1rem !important;
  margin-right: 0 !important;
  padding-left: .35rem;
  padding-right: .35rem;
}

.item-list-times {
  align-items: center;
  display: inline-flex;
  flex: 0 1 auto;
  gap: .1rem;
  margin-left: .1rem !important;
  min-width: 0;
  white-space: nowrap;
}

.item-list-time-values {
  display: inline-flex;
  gap: .2rem;
  min-width: 0;
}

.item-list-time {
  display: block;
  font-size: .7rem;
  line-height: 1;
}

.item-list-time-icon {
  flex: 0 0 auto;
  height: .7rem;
  opacity: .6;
  width: .7rem;
}

.item-list-time-icon > svg {
  height: .7rem;
  width: .7rem;
}

.item-list-time-icon-success {
  color: var(--accent-color);
  opacity: 1;
}

/* when the last refresh succeeded both times are identical: show one value.
   A failed refresh keeps both (last attempt vs. last success). Full detail
   stays in each value's title / aria-label. */
.item-list-times-ok .item-list-time:not(.item-list-time-success) {
  display: none;
}

.item-list-times {
  cursor: default;
  padding: .15rem .3rem;
  border-radius: var(--radius-sm);
}

.item-list-time {
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.item-list-times:not(.item-list-times-ok) .item-list-time:not(.item-list-time-success) {
  color: #c0392b;
}

.item-list-time-success {
  color: var(--accent-color);
}

/* ============================================================
   OPML import
   ============================================================ */

#opml-import-form input[type="file"]::-webkit-file-upload-button {
  position: absolute;
  top: -999px;
  left: -999px;
}

/* ============================================================
   Modal / dialog
   ============================================================ */

.custom-modal {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding: .5rem;
  overflow-y: auto;
  display: flex !important;
}

.custom-modal .modal-dialog {
  margin: auto;
  width: 100%;
}

.modal-enter-active,
.modal-leave-active {
  transition: opacity .16s ease;
}

.modal-enter-active .modal-content,
.modal-leave-active .modal-content {
  transition: transform .16s ease, opacity .16s ease;
}

.modal-enter,
.modal-leave-to {
  opacity: 0;
}

.modal-enter .modal-content,
.modal-leave-to .modal-content {
  transform: scale(.96) translateY(4px);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .modal-enter-active,
  .modal-leave-active,
  .modal-enter-active .modal-content,
  .modal-leave-active .modal-content {
    transition: none;
  }
}

.settings-modal .modal-dialog {
  max-width: 21rem;
}

.settings-modal .modal-body {
  padding: .75rem .9rem;
}

.modal-content {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* ============================================================
   Empty detail pane
   ============================================================ */

.detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  padding: 2rem;
  color: var(--text-muted);
  user-select: none;
  animation: fade-in .3s ease both;
}

.detail-empty-icon,
.detail-empty-icon > svg {
  width: 2.25rem;
  height: 2.25rem;
  opacity: .35;
  stroke-width: 1.5;
}

.detail-empty-title {
  margin: 0;
  font-size: .95rem;
}

.detail-empty-keys {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: .4rem 1.5rem;
  margin: .4rem 0 0;
  font-size: .8rem;
}

.detail-empty-keys > div {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.detail-empty-keys dt {
  display: flex;
  gap: .2rem;
  min-width: 2.6rem;
  justify-content: flex-end;
  font-weight: normal;
}

.detail-empty-keys dd {
  margin: 0;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   Article content
   ============================================================ */

.content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-wrap: break-word;
  line-height: 1.65;
}

.content-wrapper {
  max-width: 58rem;
  margin: 0 auto;
}

.content img,
.content video {
  max-width: 100%;
  height: auto;
}

.content img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.content iframe {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
}

.content iframe[src^="https://www.bilibili.com/blackboard/html5mobileplayer.html"] {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.content .video-wrapper {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
}

.content .video-wrapper::before {
  display: block;
  padding-top: 56.25%;
  content: "";
}

.content .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.content pre {
  overflow-x: auto;
  color: inherit;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding: 0.5rem;
  font-size: .875em;
}

.content table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  overflow-x: auto;
  border-collapse: collapse;
}

.content th,
.content td {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--content-table-border);
  text-align: left;
  vertical-align: top;
}

.content th {
  background-color: var(--content-table-header-bg);
  font-weight: 600;
}

.content tbody tr:nth-child(even) {
  background-color: var(--content-table-stripe-bg);
}

/* links are marked by accent color alone; hover dims slightly as feedback */
.content a,
.content a:hover,
.content a:focus {
  color: var(--accent-color);
  text-decoration: none;
}

.content a:hover {
  opacity: .8;
}

.content .content-title-link,
.content .content-title-link:focus {
  color: inherit;
  text-decoration: none;
  transition: color .12s ease;
}

.content .content-title-link:hover {
  color: var(--accent-color);
}

.content .bilibili-ranking-link,
.content .bilibili-ranking-link:hover,
.content .bilibili-ranking-link:focus {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ranking cards share the item-list card look: borderless, floating shadow */
.content .bilibili-ranking-card {
  overflow: hidden;
  margin: 0 0 .75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--generated-card-bg);
  box-shadow: var(--article-card-shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}

.content .bilibili-ranking-card:hover {
  box-shadow: var(--article-card-shadow-hover);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .content .bilibili-ranking-card,
  .content .bilibili-ranking-card:hover {
    transition: none;
    transform: none;
  }
}

.content .bilibili-ranking-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

/* Only the card's cover preview is cropped; expanded article media keeps its ratio. */
.content .bilibili-ranking-card > .bilibili-ranking-link > .bilibili-ranking-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.content .bilibili-ranking-body {
  padding: 0;
}

.content .bilibili-ranking-meta {
  margin: 0 0 0.2rem;
  color: var(--generated-card-meta-color);
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  text-indent: 0;
  padding: .45rem .6rem 0;
}

.content .bilibili-ranking-title {
  margin: 0;
  color: var(--generated-card-title-color);
  font-size: 1.05rem;
  line-height: 1.35;
  cursor: pointer;
  display: block;
  list-style: none;
  text-indent: 0;
  padding: 0 .6rem .45rem;
}

.content .bilibili-ranking-meta span {
  min-width: 0;
}

.content .bilibili-ranking-meta time {
  flex: 0 0 auto;
}

.content .bilibili-ranking-title::-webkit-details-marker {
  display: none;
}

/* no focus ring on mouse click; keep it for keyboard users */
.content .bilibili-ranking-title:focus {
  outline: none;
}

.content .bilibili-ranking-title:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.content .bilibili-ranking-content {
  padding: .45rem .6rem;
  border-top: 1px solid var(--item-list-separator-color);
}

.content .bilibili-ranking-open-original {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  min-height: 2rem;
  padding: .25rem .75rem;
  border: 1px solid var(--generated-card-border);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  text-indent: 0;
}

.content .bilibili-ranking-open-original:hover,
.content .bilibili-ranking-open-original:focus {
  color: var(--accent-color);
  text-decoration: none;
}

.content-embed {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: calc(100vh - 9rem);
  min-height: 32rem;
  width: 100%;
}

.content-mode-message {
  color: var(--text-muted);
}

.content-open-original {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: .65rem;
  align-items: center;
  margin-top: 2rem;
  text-align: center;
}

.content-open-original-prev {
  justify-self: end;
}

.content-open-original-next {
  justify-self: start;
}

.content-open-original .settings-btn {
  height: 2rem;
  padding: 0 1rem;
  text-decoration: none;
  color: inherit;
}

.content-open-original a.settings-btn[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
}

.content blockquote {
  border-left: 2px solid var(--border-strong);
  padding-left: 1rem;
  margin-left: 0;
  color: var(--text-muted);
}

.content h1 { font-size: 1.75rem; line-height: 1.25; margin-bottom: .5rem; }
.content h2 { font-size: 1.45rem; line-height: 1.3; }
.content h3 { font-size: 1.15rem; line-height: 1.35; }
.content h4,
.content h5,
.content h6 { font-size: 1rem; line-height: 1.4; }

.content time {
  font-size: .85rem;
  color: var(--text-muted);
  display: block;
  margin-top: .2rem;
}

kbd {
  display: inline-block;
  padding: .1em .45em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8em;
  line-height: 1.4;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--surface-raised, var(--surface));
  color: inherit;
}

/* paragraphs are separated by spacing; no first-line indent (feeds often start
   lines with emoji, ▍ markers or quotes, which an indent misaligns) */
.content p {
  margin-top: .8rem;
  margin-bottom: .8rem;
}

/* ============================================================
   Theme: light
   ============================================================ */

button.theme-light {
  background-color: #f7f7f6 !important;
}

.theme-light,
.theme-light .btn-default,
.theme-light .form-control,
.theme-light .modal-content {
  --accent-color:              #2b6b4a;
  --accent-contrast-color:     #ffffff;
  --bg:                        #f7f7f6;
  --surface:                   #ffffff;
  --surface-raised:            #f0f0ee;
  --border:                    rgba(0, 0, 0, 0.09);
  --border-strong:             rgba(0, 0, 0, 0.16);
  --text:                      #1a1a18;
  --text-muted:                rgba(30, 30, 26, 0.5);
  --hover-bg:                  #ecece8;
  --active-bg:                 #e4e4de;
  --article-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.06);
  --article-card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.09);
  --action-button-border-color: rgba(0, 0, 0, 0.13);
  --action-button-hover-bg:    #ececea;
  --action-button-shadow:      0 1px 2px rgba(0, 0, 0, 0.06);
  --action-button-shadow-active: inset 0 1px 2px rgba(0, 0, 0, 0.10);
  --content-table-border:      #d8d8d4;
  --content-table-header-bg:   #efefeb;
  --content-table-stripe-bg:   rgba(0, 0, 0, 0.025);
  --feed-folder-sticky-bg:     #f7f7f6;
  --generated-card-bg:         #ffffff;
  --generated-card-border:     #d8d8d4;
  --generated-card-meta-color: #6b6b67;
  --generated-card-title-color: #1a1a18;
  --item-list-separator-color: rgba(0, 0, 0, 0.07);
  --toolbar-bg:                #ffffff;
  --pane-divider-line:         rgba(0, 0, 0, 0.09);
  --pane-divider-solid: #e1e1e0;
  --pane-resize-handle-bg:     rgba(43, 107, 74, 0.3);
  --pane-resize-handle-bg-hover: #2b6b4a;
  --pane-resize-handle-ring:   rgba(247, 247, 246, 0.9);
  --skeleton-base:             rgba(0, 0, 0, 0.07);
  --skeleton-highlight:        rgba(255, 255, 255, 0.65);
  --skeleton-card-bg:          rgba(255, 255, 255, 0.55);
  --skeleton-card-border:      rgba(0, 0, 0, 0.05);
  background-color: #f7f7f6 !important;
  color: #1a1a18;
}

.theme-light .content hr,
.theme-light .content pre,
.theme-light .border-right,
.theme-light .border-top {
  border-color: #e0e0da !important;
}

.theme-light .selectgroup-label:hover,
.theme-light .toolbar-item:hover,
.theme-light .selectgroup-action:hover,
.theme-light .settings-dialog-field-action:hover,
.theme-light .settings-dialog-action:hover,
.theme-light .feed-delete-row:hover,
.theme-light .settings-segmented .btn:hover,
.theme-light .refresh-rate-picker .btn:hover {
  background-color: #ecece8;
}

.theme-light .article-list-layout-card #item-list-scroll .selectgroup-label {
  background-color: #ffffff;
}

.theme-light .article-list-layout-card #item-list-scroll .selectgroup-label:hover {
  background-color: #f0f0ec;
}

/* ============================================================
   Theme: sepia
   ============================================================ */

.theme-sepia,
.theme-sepia .btn-default,
.theme-sepia .form-control,
.theme-sepia .modal-content {
  --accent-color:              #8b5523;
  --accent-contrast-color:     #fff;
  --bg:                        #f0e8d0;
  --surface:                   #f8f2e0;
  --surface-raised:            #e8ddc8;
  --border:                    rgba(80, 60, 20, 0.15);
  --border-strong:             rgba(80, 60, 20, 0.25);
  --text:                      #2a1e0e;
  --text-muted:                rgba(60, 42, 18, 0.5);
  --hover-bg:                  #e8dcc0;
  --active-bg:                 #ddd2b0;
  --article-card-shadow: 0 1px 2px rgba(80, 60, 20, 0.07), 0 4px 12px rgba(80, 60, 20, 0.09);
  --article-card-shadow-hover: 0 2px 4px rgba(80, 60, 20, 0.08), 0 8px 20px rgba(80, 60, 20, 0.13);
  --action-button-border-color: rgba(80, 60, 20, 0.18);
  --action-button-hover-bg:    #e8dcc0;
  --action-button-shadow:      0 1px 2px rgba(80, 60, 20, 0.10);
  --action-button-shadow-active: inset 0 1px 2px rgba(80, 60, 20, 0.16);
  --content-table-border:      #d2bd84;
  --content-table-header-bg:   #e6d7a8;
  --content-table-stripe-bg:   rgba(122, 93, 42, 0.05);
  --feed-folder-sticky-bg:     #f0e8d0;
  --generated-card-bg:         #f7edca;
  --generated-card-border:     #d2bd84;
  --generated-card-meta-color: #7a6b50;
  --generated-card-title-color: #2a1e0e;
  --item-list-separator-color: rgba(80, 60, 20, 0.12);
  --toolbar-bg:                #f6eccc;
  --pane-divider-line:         rgba(80, 60, 20, 0.14);
  --pane-divider-solid: #dad0b6;
  --pane-resize-handle-bg:     rgba(139, 85, 35, 0.32);
  --pane-resize-handle-bg-hover: #8b5523;
  --pane-resize-handle-ring:   rgba(240, 232, 208, 0.88);
  --skeleton-base:             rgba(80, 60, 20, 0.10);
  --skeleton-highlight:        rgba(255, 250, 236, 0.55);
  --skeleton-card-bg:          rgba(250, 243, 219, 0.65);
  --skeleton-card-border:      rgba(80, 60, 20, 0.09);
  background-color: #f0e8d0 !important;
  color: #2a1e0e;
}

body.theme-sepia {
  background-image:
    radial-gradient(ellipse at 18% 22%, rgba(139, 95, 28, .10), transparent 38%),
    radial-gradient(ellipse at 82% 14%, rgba(255, 255, 255, .16), transparent 34%),
    radial-gradient(ellipse at 52% 88%, rgba(118, 79, 21, .07), transparent 42%),
    repeating-linear-gradient(92deg, rgba(101, 70, 22, .02) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(2deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 12px);
  background-attachment: fixed;
  background-blend-mode: multiply, screen, multiply, multiply, screen;
  background-size: 140% 120%, 130% 110%, 150% 120%, 18px 100%, 100% 20px;
}

.theme-sepia .content hr,
.theme-sepia .content pre,
.theme-sepia .border-right,
.theme-sepia .border-top {
  border-color: #d9c999 !important;
}

.theme-sepia .selectgroup-label:hover,
.theme-sepia .toolbar-item:hover,
.theme-sepia .selectgroup-action:hover,
.theme-sepia .settings-dialog-field-action:hover,
.theme-sepia .settings-dialog-action:hover,
.theme-sepia .feed-delete-row:hover,
.theme-sepia .settings-segmented .btn:hover,
.theme-sepia .refresh-rate-picker .btn:hover {
  background-color: #e8dcc0;
}

.theme-sepia .article-list-layout-card #item-list-scroll .selectgroup-label {
  background-color: #f7edca;
}

.theme-sepia .article-list-layout-card #item-list-scroll .selectgroup-label:hover {
  background-color: #eadbad;
}

.theme-sepia #item-list-scroll .item-status-read {
  color: rgba(60, 42, 18, 0.48);
}

/* ============================================================
   Theme: night
   ============================================================ */

.theme-night,
.theme-night .btn-default,
.theme-night .form-control,
.theme-night .modal-content {
  --accent-color:              #d4913a;
  --accent-contrast-color:     #181818;
  --bg:                        #181818;
  --surface:                   #212121;
  --surface-raised:            #2a2a2a;
  --border:                    rgba(255, 255, 255, 0.08);
  --border-strong:             rgba(255, 255, 255, 0.14);
  --text:                      #d4d4d0;
  --text-muted:                rgba(210, 210, 200, 0.45);
  --hover-bg:                  #2a2a2a;
  --active-bg:                 #333333;
  --article-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.35);
  --article-card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 10px 24px rgba(0, 0, 0, 0.45);
  --action-button-border-color: rgba(255, 255, 255, 0.12);
  --action-button-hover-bg:    #2e2e2e;
  --action-button-shadow:      0 2px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --action-button-shadow-active: inset 0 1px 3px rgba(0, 0, 0, 0.55);
  --content-table-border:      #383838;
  --content-table-header-bg:   #2a2a2a;
  --content-table-stripe-bg:   rgba(255, 255, 255, 0.025);
  --feed-folder-sticky-bg:     #181818;
  --generated-card-bg:         #232323;
  --generated-card-border:     #383838;
  --generated-card-meta-color: #9b9b97;
  --generated-card-title-color: #e2e2de;
  --item-list-separator-color: rgba(255, 255, 255, 0.07);
  --toolbar-bg:                #212121;
  --pane-divider-line:         rgba(255, 255, 255, 0.07);
  --pane-divider-solid: #282828;
  --pane-resize-handle-bg:     rgba(212, 145, 58, 0.32);
  --pane-resize-handle-bg-hover: #d4913a;
  --pane-resize-handle-ring:   rgba(24, 24, 24, 0.88);
  --skeleton-base:             rgba(255, 255, 255, 0.07);
  --skeleton-highlight:        rgba(255, 255, 255, 0.14);
  --skeleton-card-bg:          rgba(255, 255, 255, 0.03);
  --skeleton-card-border:      rgba(255, 255, 255, 0.05);
  color: #d4d4d0;
  background-color: #181818 !important;
}

.theme-night .content hr,
.theme-night .content pre,
.theme-night .border-right,
.theme-night .border-top {
  border-color: #2e2e2e !important;
}

.theme-night .selectgroup-label:hover,
.theme-night .toolbar-item:hover,
.theme-night .selectgroup-action:hover,
.theme-night .settings-dialog-field-action:hover,
.theme-night .settings-dialog-action:hover,
.theme-night .feed-delete-row:hover,
.theme-night .settings-segmented .btn:hover,
.theme-night .refresh-rate-picker .btn:hover {
  background-color: #2a2a2a;
}

.theme-night .article-list-layout-card #item-list-scroll .selectgroup-label {
  background-color: #232323;
}

.theme-night .article-list-layout-card #item-list-scroll .selectgroup-label:hover {
  background-color: #2a2a2a;
}

.theme-night .modal-content {
  border-color: #2e2e2e;
}

.theme-night #item-list-scroll .item-status-read {
  color: rgba(210, 210, 200, 0.4);
}

/* ============================================================
   Indicator animation (unread / favorite badge)
   ============================================================ */

/* ============================================================
   Motion: article open, favorite, read state, skeleton → content
   ============================================================ */

/* new article: content rises in slightly (keyed on itemSelected) */
.content-wrapper {
  animation: content-in .22s cubic-bezier(.2, .7, .3, 1) both;
}

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

/* favorite: star pops when marked */
.favorite-pop .toolbar-icon {
  animation: favorite-pop .38s cubic-bezier(.3, 1.6, .5, 1);
}

@keyframes favorite-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35) rotate(-8deg); }
  100% { transform: scale(1); }
}

/* item rows fade to the read color instead of snapping */
#item-list-scroll .selectgroup-label,
#item-list-scroll .item-list-title {
  transition: color .3s ease, background-color .12s ease;
}

/* loaded rows fade in after the skeleton */
#item-list-scroll > .selectgroup {
  animation: fade-in .2s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .content-wrapper,
  .favorite-pop .toolbar-icon,
  #item-list-scroll > .selectgroup {
    animation: none;
  }
  #item-list-scroll .selectgroup-label,
  #item-list-scroll .item-list-title {
    transition: none;
  }
}

.indicator-enter-active, .indicator-leave-active {
  transition: all .2s;
}
.indicator-enter, .indicator-leave-to {
  width: 0;
  opacity: 0;
  margin: 0 !important;
}

/* ============================================================
   Responsive layout
   ============================================================ */

@media (min-width: 768px) and (max-width: 991.98px) {
  #app #col-feed-list {
    width: 35% !important;
  }
  #app #col-item-list {
    width: 65% !important;
    border-right-width: 0 !important;
    box-shadow: none;
  }
  #app #col-item {
    display: none !important;
  }
  #app.item-selected #col-feed-list {
    display: none !important;
  }
  #app.item-selected #col-item-list {
    display: none !important;
  }
  #app.item-selected #col-item {
    display: flex !important;
  }
}

@media (max-width: 767.98px) {
  #app #col-feed-list {
    width: 100% !important;
    border-right-width: 0 !important;
    box-shadow: none;
  }
  #app #col-item-list {
    width: 100% !important;
    display: none !important;
    border-right-width: 0 !important;
    box-shadow: none;
  }
  #app #col-item {
    width: 100% !important;
    display: none !important;
  }
  #app.feed-selected #col-feed-list {
    display: none !important;
  }
  #app.feed-selected #col-item-list {
    display: flex !important;
  }
  .item-list-image {
    width: 52px;
    height: 39px;
  }
  .item-list-skeleton-image {
    width: 52px;
    height: 39px;
  }
  #app.item-selected #col-feed-list {
    display: none !important;
  }
  #app.item-selected #col-item-list {
    display: none !important;
  }
  #app.item-selected #col-item {
    display: flex !important;
  }
}

/* mobile: the visible layer slides in from the right going deeper
   (feeds → items → article → settings) and from the left coming back */
@media (max-width: 767.98px) {
  #app.layer-slide-forward > [id^="col-"],
  #app.layer-slide-back > [id^="col-"] {
    animation-duration: .26s;
    animation-timing-function: cubic-bezier(.2, .75, .25, 1);
    animation-fill-mode: both;
  }
  #app.layer-slide-forward > [id^="col-"] {
    animation-name: layer-in-forward;
  }
  #app.layer-slide-back > [id^="col-"] {
    animation-name: layer-in-back;
  }
}

@keyframes layer-in-forward {
  from { transform: translateX(28%); opacity: .4; }
  to   { transform: none; opacity: 1; }
}

@keyframes layer-in-back {
  from { transform: translateX(-28%); opacity: .4; }
  to   { transform: none; opacity: 1; }
}

@media (max-width: 991.98px) {
  .drag {
    cursor: default;
  }
  .drag::after {
    display: none;
  }
  .toolbar {
    min-height: 2.75rem !important;
    max-height: 2.75rem !important;
  }
  .toolbar-item {
    padding: .45rem .5rem;
  }
  .item-list-toolbar-action {
    margin-left: .1rem !important;
    padding-left: .35rem;
    padding-right: .35rem;
  }
  .item-list-selection-settings {
    padding-left: .35rem;
    padding-right: .35rem;
  }
  #col-item .toolbar-label {
    display: none;
  }
  .toolbar-display-text #col-item .toolbar-icon {
    display: inline-block;
  }
  .content-skeleton-title,
  .content-skeleton-title-short {
    width: 100%;
  }
  .content-skeleton-feed {
    max-width: 65%;
  }
  .content-skeleton-time {
    max-width: 40%;
  }
  .content-skeleton-media {
    height: min(13rem, 48vw);
  }
}

@media (max-width: 359.98px) {
  .item-list-back {
    margin-right: .1rem !important;
    padding-left: .35rem;
    padding-right: .35rem;
  }
  .item-list-unread-first {
    padding-left: .35rem;
    padding-right: .35rem;
  }
  .item-list-toolbar-action {
    padding-left: .25rem;
    padding-right: .25rem;
  }
}
