:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #687385;
  --line: #d9dee8;
  --brand: #256f8f;
  --brand-dark: #174f68;
  --accent: #b94f43;
  --soft: #eef5f8;
  --shadow: 0 10px 30px rgba(25, 40, 60, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--brand);
  text-decoration: none;
}

.search-highlight {
  padding: 0 2px;
  background: #ffe2e2;
  border-radius: 3px;
  color: #9d1f2a;
  font-weight: inherit;
}

main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 28px;
}

.site-footer {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 56px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.site-footer p {
  margin: 0 0 4px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 40px;
  background: #8b1f2d;
  color: white;
  border-radius: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.account,
.paper-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account {
  gap: 12px;
  font-size: 15px;
}

.account-link {
  color: var(--brand-dark);
  font-weight: 720;
}

.account-link:hover {
  color: var(--brand);
}

.account form {
  margin: 0;
}

.account-user-menu {
  position: relative;
  display: contents;
}

.user-menu-toggle {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: inherit;
}

.account-menu-panel {
  display: contents;
}

.account-logout {
  min-height: 32px;
  padding: 5px 11px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.account-logout:hover {
  border-color: #bdd6df;
  color: var(--brand-dark);
  background: var(--soft);
}

.filters {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 280px 120px auto auto auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.date-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  white-space: nowrap;
}

.checkline input {
  width: auto;
  min-height: auto;
}

button,
.primary-button,
.ghost-button,
.icon-button,
.star-button {
  border: 0;
  border-radius: 7px;
  min-height: 40px;
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  background: var(--brand);
  color: white;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.ghost-button {
  background: var(--soft);
  color: var(--brand-dark);
}

.list-head {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 12px;
}

.date-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.date-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.date-picker input {
  width: 136px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}

.date-input-wrap {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.date-input:invalid {
  color: transparent;
}

.date-input:valid {
  color: var(--ink);
}

.date-placeholder {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  color: #a4adba;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}

.date-input:focus + .date-placeholder,
.date-input:valid + .date-placeholder {
  display: none;
}

.date-picker .ghost-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.date-nav {
  display: flex;
  flex-wrap: wrap;
  justify-self: center;
  gap: 8px;
  margin-bottom: 4px;
}

.date-nav a,
.date-nav span {
  min-width: 74px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--brand-dark);
  text-align: center;
  font-weight: 650;
}

.date-nav a:hover,
.date-nav a.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.date-nav span {
  color: var(--muted);
}

.result-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  min-width: 0;
  padding: 8px 12px;
  background: #f4f1ec;
  border: 1px solid #e1d5c8;
  border-radius: 7px;
  border-color: #e1d5c8;
  color: #684533;
  box-shadow: 0 6px 18px rgba(104, 69, 51, 0.08);
}

.result-category {
  color: var(--brand-dark);
  font-weight: 750;
}

.result-chip strong {
  color: var(--ink);
  font-size: 16px;
}

.content-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.category-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sidebar-head h2 {
  margin: 0;
  font-size: 18px;
}

.sidebar-head a {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 650;
}

.category-tree {
  display: grid;
  gap: 6px;
}

.category-group {
  border: 0;
  padding: 0;
}

.category-major {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--soft);
  border-radius: 7px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.major-code {
  font-size: 13px;
}

.hot-icons {
  margin-left: 3px;
  font-size: 11px;
  line-height: 1;
}

.major-name {
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-major:hover {
  background: #dfeef3;
  color: var(--brand-dark);
}

.category-major small {
  color: var(--muted);
  font-weight: 600;
}

.subcategory-list {
  display: grid;
  gap: 4px;
  padding: 4px 0 8px 10px;
}

.subcategory-link {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  color: var(--ink);
  border-radius: 7px;
}

.subcategory-link:hover,
.subcategory-link.active {
  background: #f4f1ec;
  color: var(--brand-dark);
}

.subcategory-link span {
  font-weight: 720;
  font-size: 13px;
}

.subcategory-link small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-list {
  display: grid;
  gap: 14px;
}

.mobile-home-controls {
  display: contents;
}

.mobile-list-actions,
.mobile-inline-panel {
  display: none;
}

.paper-card {
  position: relative;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 116px;
  color: var(--muted);
  font-size: 13px;
}

.paper-meta span {
  padding: 2px 8px;
  background: var(--soft);
  border-radius: 999px;
}

.paper-meta .category-pill {
  background: #f4f1ec;
  color: #684533;
  font-weight: 650;
}

.paper-meta .submission-pill {
  border: 1px solid #d5dee8;
  background: #eef4f8;
  color: #2f526f;
  font-weight: 700;
}

.paper-meta .submission-cross {
  border-color: #d8dccd;
  background: #f1f5e9;
  color: #4f622d;
}

.paper-meta .submission-replacement {
  border-color: #e3d6c8;
  background: #f7eee5;
  color: #75513a;
}

.paper-card h2 {
  margin: 10px 0 6px;
  font-size: 19px;
  line-height: 1.32;
}

.title-cn {
  margin: 0 0 6px;
  color: #253244;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.authors {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.affiliations {
  margin: 8px 0 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}

.affiliations-label {
  position: relative;
  margin-right: 6px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 750;
}

.affiliations-note {
  position: relative;
  top: -0.35em;
  margin-left: 1px;
  color: #9b1c31;
  cursor: help;
  font-size: 11px;
  font-weight: 850;
}

.affiliations-list {
  min-width: 0;
}

.affiliation-item {
  overflow-wrap: anywhere;
}

.affiliation-separator {
  color: var(--muted);
}

.summary {
  margin: 14px 0;
  color: #27313d;
  font-size: 14px;
  font-weight: 520;
}

.summary-label {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 6px;
  background: #e9f3f6;
  border: 1px solid #cfe3ea;
  border-radius: 6px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.topic-nav {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topic-nav-title {
  display: block;
  margin: 0 0 8px;
  color: #27313d;
  font-size: 13px;
  font-weight: 800;
}

.topic-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.topic-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  background: #f7fafc;
  border: 1px solid #dce5ec;
  border-radius: 7px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.topic-nav-links a:hover {
  border-color: #bdd5df;
  background: #eef7fa;
}

.topic-nav-links span {
  color: var(--muted);
  font-weight: 800;
}

.topic-section-heading {
  scroll-margin-top: 86px;
  margin: 16px 0 10px;
  padding: 9px 12px;
  background: #eef3f6;
  border-left: 4px solid #9a1b30;
  border-radius: 0 8px 8px 0;
}

.topic-section-heading h2 {
  margin: 0;
  color: #1f2933;
  font-size: 18px;
  line-height: 1.35;
}

.topic-section-heading span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.paper-toolbar {
  display: contents;
}

.paper-details-row {
  position: relative;
  min-height: 34px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 6px;
}

.paper-details {
  min-width: 0;
}

.paper-details summary {
  min-width: 0;
  padding-right: 82px;
  color: var(--brand);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.paper-details-content {
  min-width: 0;
}

.paper-reactions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.paper-actions form,
.paper-reactions form {
  margin: 0;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  background: #f8fafc;
  border: 1px solid #dbe3ed;
  border-radius: 7px;
  color: #4d5b6b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.reaction-button:hover,
.reaction-button.active {
  background: #e9f3f6;
  border-color: #cfe3ea;
  color: var(--brand-dark);
}

.reaction-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.reaction-button.dislike {
  background: #f4f1ec;
  border-color: #e1d5c8;
  color: #684533;
}

.reaction-button span {
  margin-left: 3px;
}

.detail-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px solid #edf1f5;
  border-radius: 7px;
}

.detail-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.detail-row dd {
  margin: 0;
  min-width: 0;
  color: #3e4856;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-abstract {
  margin-top: 8px;
  padding: 8px 10px;
  background: #fbfcfd;
  border-left: 3px solid #cfe3ea;
}

.detail-abstract span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.detail-abstract p {
  margin: 6px 0 0;
  color: #3e4856;
  font-size: 15px;
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-ideograph;
}

.detail-abstract-cn p {
  color: #253244;
}

.paper-actions {
  position: absolute;
  top: 14px;
  right: 20px;
  align-items: flex-start;
  gap: 6px;
}

.icon-button,
.star-button {
  width: 32px;
  min-height: 30px;
  padding: 0;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 17px;
}

.url-button,
.pdf-button {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.html-button {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.star-button.active {
  background: #fff2d6;
  color: var(--accent);
}

.empty-state,
.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.empty-state {
  padding: 36px;
  text-align: center;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  padding: 9px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.page-jump {
  display: flex;
  align-items: end;
  gap: 8px;
}

.page-jump label {
  grid-template-columns: auto 80px;
  align-items: center;
  gap: 8px;
}

.page-jump input {
  min-height: 38px;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 100px);
}

.auth-panel {
  width: min(420px, 100%);
  padding: 28px;
}

.auth-panel h1 {
  margin: 0 0 20px;
}

.auth-panel label {
  margin-bottom: 14px;
}

.wide {
  width: 100%;
}

.flash-wrap {
  width: min(1220px, calc(100% - 32px));
  margin: 14px auto 0;
}

.flash {
  padding: 10px 14px;
  background: #fff7df;
  color: #6b4a12;
  border: 1px solid #f0d591;
  border-radius: 8px;
}

.user-chip {
  color: var(--muted);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--brand);
  border: 1px solid var(--brand-dark);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  font-size: 22px;
  font-weight: 800;
}

.back-to-top:hover {
  background: var(--brand-dark);
}

@media (max-width: 980px) {
  .home-shell {
    display: flex;
    flex-direction: column;
  }

  .home-shell .content-layout {
    display: contents;
  }

  .home-shell .paper-list {
    order: 1;
  }

  .home-shell .pagination {
    order: 2;
  }

  .home-shell .filters {
    order: 3;
  }

  .home-shell .category-sidebar {
    order: 4;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .date-range-filter {
    grid-column: 1 / -1;
  }

  .list-head {
    grid-template-columns: 1fr;
  }

  .mobile-home-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    column-gap: 6px;
    row-gap: 6px;
    width: 100%;
    margin-top: 10px;
    overflow-x: visible;
  }

  .mobile-home-controls .list-head {
    display: contents;
  }

  .mobile-home-controls .date-tools {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    justify-content: stretch;
    min-width: 0;
  }

  .mobile-inline-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .mobile-inline-panel[hidden] {
    display: none;
  }

  .mobile-inline-panel:not([hidden]) {
    display: block;
  }

  .mobile-home-controls .date-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: stretch;
    justify-self: stretch;
    width: 100%;
    gap: 4px;
    margin: 0;
  }

  .mobile-home-controls .date-nav a,
  .mobile-home-controls .date-nav span {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 32px;
    padding: 5px 6px;
    font-size: 12px;
    line-height: 1.2;
  }

  .mobile-home-controls .result-chip {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .result-chip {
    justify-self: start;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: static;
    max-height: none;
  }

  .home-shell .filters,
  .home-shell .category-sidebar {
    margin-top: 18px;
  }

  .mobile-inline-panel .filters,
  .mobile-inline-panel .category-sidebar {
    margin-top: 0;
    box-shadow: none;
  }

  .mobile-inline-panel .category-sidebar {
    max-height: min(70vh, 520px);
    overflow: auto;
  }

  .mobile-list-actions {
    display: contents;
  }

  .mobile-list-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    padding: 6px 4px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
  }

  .mobile-list-actions a:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .mobile-list-actions a:last-child {
    grid-column: 2;
    grid-row: 1;
  }

  .mobile-list-actions a::after {
    content: "▾";
    margin-left: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
  }

  .mobile-home-controls .date-picker {
    display: block;
    width: 100%;
  }

  .mobile-home-controls .date-input-wrap {
    display: flex;
    width: 100%;
  }

  .mobile-home-controls .date-picker input {
    width: 100%;
    min-height: 34px;
    padding: 6px 4px;
    font-size: 12px;
    text-align: center;
  }

  .mobile-home-controls .date-picker .date-placeholder {
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-home-controls .date-picker .ghost-button {
    display: none;
  }

}

@media (max-width: 640px) {
  main {
    width: min(100% - 20px, 1220px);
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand-mark {
    flex: 0 0 auto;
    width: 86px;
    height: 32px;
    border-radius: 7px;
    font-size: 14px;
  }

  .brand strong {
    display: none;
  }

  .brand small {
    display: none;
  }

  .account {
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 13px;
  }

  .account .ghost-button,
  .account .primary-button {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 13px;
  }

  .account-user-menu {
    position: relative;
    display: block;
  }

  .user-menu-toggle {
    display: block;
    padding: 2px 8px;
    min-height: 26px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: inherit;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
  }

  .user-menu-toggle .user-chip {
    max-width: none;
  }

  .account-user-menu.open .account-menu-panel {
    display: block;
  }

  .account-menu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 100%;
    padding: 6px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(25, 40, 60, 0.15);
    z-index: 30;
  }

  .account-menu-panel .account-logout {
    width: 100%;
    display: block;
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
    text-align: center;
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    border-radius: 4px;
  }

  .account-menu-panel .account-logout:hover {
    background: var(--soft);
  }

  .user-chip {
    display: block;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--brand-dark);
    font-weight: 700;
  }

  .filters,
  .date-picker,
  .date-range-inputs,
  .subcategory-link,
  .detail-row {
    grid-template-columns: 1fr;
  }

  .list-head {
    gap: 8px;
  }

  .date-picker {
    display: grid;
    width: 100%;
  }

  .date-picker input {
    width: 100%;
  }

  .mobile-home-controls .date-picker {
    display: block;
    width: 100%;
  }

  .mobile-home-controls .date-input-wrap {
    display: flex;
    width: 100%;
  }

  .mobile-home-controls .date-picker input {
    width: 100%;
    min-height: 34px;
    padding: 6px 4px;
    font-size: 12px;
    text-align: center;
  }

  .mobile-home-controls .date-picker .date-placeholder {
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-home-controls .date-picker .date-input:invalid {
    color: transparent;
  }

  .mobile-home-controls .date-picker .date-input:valid {
    color: var(--ink);
  }

  .mobile-home-controls .date-picker .ghost-button {
    display: none;
  }

  .mobile-home-controls .mobile-list-actions a {
    min-height: 34px;
    padding: 6px 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .date-nav {
    gap: 4px;
    margin: 0;
    width: 100%;
  }

  .date-nav a,
  .date-nav span {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 32px;
    padding: 5px 6px;
    font-size: 12px;
    line-height: 1.2;
  }

  .mobile-home-controls .date-nav {
    justify-content: stretch;
    justify-self: stretch;
    width: 100%;
  }

  .mobile-home-controls .date-nav a,
  .mobile-home-controls .date-nav span {
    flex: 1 1 0;
    min-width: 0;
  }

  .result-chip {
    justify-self: center;
    grid-column: 1 / -1;
    padding: 4px 8px;
    font-size: 12px;
    align-items: center;
  }

  .result-chip strong {
    font-size: 14px;
  }


  .paper-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .paper-details-row {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 0;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .paper-details summary {
    padding-right: 0;
  }

  .paper-details[open] {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .paper-details-row:has(.paper-details[open]) {
    flex: 1 1 100%;
  }

  .paper-details[open] .paper-details-content {
    width: 100%;
  }

  .paper-reactions {
    flex: 0 0 auto;
    gap: 4px;
    justify-content: flex-start;
  }

  .paper-actions {
    position: static;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 0;
    margin-left: auto;
  }

  .reaction-button {
    min-height: 28px;
    padding: 4px 8px;
  }

  .icon-button,
  .star-button {
    width: 30px;
    min-height: 28px;
  }

  .paper-meta {
    padding-right: 0;
  }
}
