body {
  --font-ui: "LXGW WenKai Screen", "LXGW WenKai", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --reading-root-size: 16px;
  font-family: var(--font-ui);
  font-size: var(--reading-root-size);
  background: var(--page-bg);
  color: var(--text-main);
}

body.size-compact {
  --reading-root-size: 15px;
}

body.size-normal {
  --reading-root-size: 16px;
}

body.size-large {
  --reading-root-size: 17px;
}


body.theme-hn {
  --page-bg: #f6f6ef;
  --header-bg: #ff6600;
  --panel-bg: #f6f6ef;
  --sidebar-bg: #f6f6ef;
  --border: #d7d1be;
  --text-main: #000000;
  --text-muted: #828282;
  --primary: #000000;
  --primary-hover: #000000;
  --accent: #000000;
  --accent-hover: #000000;
  --danger: #000000;
  --danger-hover: #000000;
  --card-border: #f6f6ef;
}

.app-header, .app-sidebar, .app-panel, .compose-panel, .modal-panel {
  border-color: var(--border) !important;
}
.app-header { background: var(--header-bg) !important; }
.site-brand-logo {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
  object-fit: contain;
}
.app-header {
  --header-control-height: 2.05rem;
}
.app-header .header-action-button,
.app-header .header-menu-button,
.app-header .header-user-button,
.app-header .header-search-trigger {
  min-width: var(--header-control-height);
  height: var(--header-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(0, 0, 0, .22) !important;
  background: rgba(255, 246, 230, .42) !important;
  color: #111 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  border-radius: 5px !important;
}
.app-header .header-menu-button:hover,
.app-header .header-user-button:hover,
.app-header .header-search-trigger:hover {
  background: rgba(255, 246, 230, .58) !important;
  border-color: rgba(0, 0, 0, .32) !important;
}
.app-header .header-user-button {
  padding-left: .8rem;
  padding-right: .8rem;
  font-weight: 600;
}
.app-sidebar { background: var(--sidebar-bg) !important; }
.app-panel, .compose-panel, .modal-panel { background: var(--panel-bg) !important; }
.app-shell {
  width: 760px;
  max-width: 100%;
  margin: 0;
}
@media (max-width: 767px) {
  .app-shell {
    width: 100%;
  }
}

.text-muted { color: var(--text-muted) !important; }
.tab, .channel-link, .ghost-btn, .page-link {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
}
.tab-active, .channel-active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}
.channel-link:hover, .tab:hover, .ghost-btn:hover, .page-link:hover {
  background: color-mix(in srgb, var(--primary) 10%, white);
}

.input-field {
  border: 1px solid var(--border);
  background: #fff;
}
.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}
.search-toolbar .search-control {
  height: 2.25rem;
  box-sizing: border-box;
}
.search-toolbar input.search-control {
  line-height: 2.25rem;
  padding-top: 0;
  padding-bottom: 0;
}
.search-toolbar button.search-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
.header-search-form {
  min-width: 0;
  display: none;
}
.header-search-form .search-control {
  height: 1.85rem;
  box-sizing: border-box;
}
.header-search-form input.search-control {
  min-width: 12rem;
  line-height: 1.85rem;
  padding-top: 0;
  padding-bottom: 0;
}
.app-header .header-search-input {
  height: var(--header-control-height) !important;
  line-height: var(--header-control-height) !important;
  border-radius: 5px !important;
  border-color: rgba(0, 0, 0, .28) !important;
  background: rgba(255, 246, 230, .54) !important;
  color: #111 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.app-header .header-search-input::placeholder {
  color: rgba(0, 0, 0, .52);
}
.app-header .header-search-input:focus {
  border-color: rgba(0, 0, 0, .42) !important;
  background: rgba(255, 250, 240, .72) !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .08);
}
.header-search-trigger {
  width: var(--header-control-height);
  height: var(--header-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 0;
  line-height: 1;
}
.mobile-search-trigger {
  display: none;
}
.channel-toolbar {
  padding-top: .6rem;
  padding-bottom: .6rem;
}
@media (max-width: 767px) {
  .mobile-search-trigger {
    display: inline-flex !important;
  }
  #quickPostModal input,
  #quickPostModal select,
  #quickPostModal textarea,
  .todo-input {
    font-size: 16px !important;
  }
}
@media (min-width: 768px) {
  .header-search-form {
    display: flex;
  }
  .mobile-search-trigger {
    display: none !important;
  }
}
.search-modal-panel {
  width: min(92vw, 34rem);
}
#aiSummaryModal {
  justify-content: flex-start !important;
}
.ai-summary-panel {
  width: min(92vw, 42rem);
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  margin-left: max(0px, calc((min(100vw, 760px) - min(92vw, 42rem)) / 2 - 1rem));
  overflow-y: auto;
  box-sizing: border-box;
}
.ai-summary-result {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.search-modal-panel .search-control {
  height: 2.75rem;
  font-size: .95rem;
}
.search-modal-panel input.search-control {
  padding-left: 1rem;
  padding-right: 1rem;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
button {
  border: 1px solid var(--border);
}

.message-card {
  border: 1px solid var(--card-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}


.overlay { background: rgba(0, 0, 0, 0.35); }
.channel-ops summary::-webkit-details-marker { display: none; }
.channel-item {
  position: relative;
}
.channel-item .channel-link {
  padding-right: 2.4rem;
}
.channel-item .channel-ops {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.channel-item .channel-ops summary {
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: .375rem;
  padding: .125rem .4rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.channel-item .channel-ops[open] summary,
.channel-item:hover .channel-ops summary {
  border-color: var(--border);
  background: color-mix(in srgb, var(--primary) 10%, white);
}
.channel-menu {
  min-width: 9rem;
  border: 1px solid var(--border);
  background: var(--panel-bg);
}
.channel-menu-btn {
  width: 100%;
  display: block;
  border-radius: .375rem;
  padding: .35rem .5rem;
  font-size: .75rem;
  text-align: left;
  color: var(--text-main);
}
.channel-menu-btn:hover {
  background: color-mix(in srgb, var(--primary) 10%, white);
}
.channel-menu-danger {
  color: var(--danger);
}
.channel-menu-danger:hover {
  background: color-mix(in srgb, var(--danger) 12%, white);
}
.task-editable {
  cursor: text;
}
.search-snippet mark {
  background: #fde68a;
  color: inherit;
  padding: 0 .1em;
}
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: .375rem;
  padding: 0 .5rem;
  background: #fff;
}
.date-pill-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
  min-width: .75rem;
  text-align: center;
}
.date-pill-input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 8.4rem;
  min-width: 7.8rem;
  font-size: .875rem;
  color: var(--text-main);
  padding: 0;
}
@media (min-width: 768px) {
  .date-pill-input {
    width: 10rem;
  }
}
.task-compose-controls {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: nowrap;
}
.task-compose-controls .attach-btn {
  flex: 0 0 auto;
  padding-left: .55rem;
  padding-right: .55rem;
  font-size: .875rem;
}
.task-compose-controls .date-pill {
  flex: 1 1 0;
  min-width: 0;
  padding-left: .4rem;
  padding-right: .4rem;
}
.task-compose-controls .date-pill-input {
  width: 100%;
  min-width: 0;
  font-size: .8125rem;
}
.file-attachment {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: min(100%, 56rem);
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: #fff;
  padding: .38rem .55rem;
  line-height: 1.2;
  vertical-align: top;
  position: relative;
}
.file-attachment:hover {
  background: color-mix(in srgb, var(--primary) 8%, white);
}
.file-attachment-name {
  display: inline-block;
  max-width: min(76vw, 44rem);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.file-attachment-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.35rem;
  border: 1px solid var(--border);
  border-radius: .35rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--text-muted);
}
.file-attachment-actions {
  display: none;
  align-items: center;
  gap: .25rem;
  margin-left: .35rem;
}
.file-attachment:hover .file-attachment-actions,
.file-attachment:focus-within .file-attachment-actions {
  display: inline-flex;
}
.file-attachment-action {
  border: 1px solid var(--border);
  border-radius: .35rem;
  background: color-mix(in srgb, var(--panel-bg) 90%, white);
  color: var(--text-muted);
  padding: .12rem .4rem;
  font-size: .72rem;
  line-height: 1.2;
  white-space: nowrap;
}
.file-attachment-action:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.attachment-preview-panel {
  width: min(100%, 760px);
  max-height: calc(100vh - 1.5rem);
  overflow-y: auto;
}
.attachment-preview-modal {
  align-items: center;
  justify-content: flex-start;
}
@media (max-width: 767px) {
  .attachment-preview-modal {
    justify-content: center;
  }
}
.attachment-preview-frame {
  width: 100%;
  height: min(74vh, 44rem);
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: #fff;
}
@media (hover: none) {
  .file-attachment-actions {
    display: inline-flex;
  }
}
@media (min-width: 768px) {
  .task-compose-controls {
    gap: .5rem;
  }
  .task-compose-controls .attach-btn {
    padding-left: .75rem;
    padding-right: .75rem;
    font-size: .875rem;
  }
  .task-compose-controls .date-pill {
    flex: 0 0 auto;
    min-width: unset;
    padding-left: .5rem;
    padding-right: .5rem;
  }
  .task-compose-controls .date-pill-input {
    width: 10rem;
    font-size: .875rem;
  }
  .file-attachment-name {
    max-width: min(68vw, 52rem);
  }
}

body.theme-hn {
  font-family: var(--font-ui);
  font-size: 10pt;
}
body.theme-hn .app-header {
  min-height: 24px;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  border-bottom: 1px solid #b3a58b !important;
}
body.theme-hn .app-sidebar,
body.theme-hn .app-panel,
body.theme-hn .compose-panel,
body.theme-hn .modal-panel,
body.theme-hn .message-card {
  border-color: #d7d1be !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #f6f6ef !important;
}
body.theme-hn .message-card {
  border: 0 !important;
}
body.theme-hn .app-sidebar {
  border-right: 1px solid #d7d1be !important;
}
body.theme-hn .app-panel {
  border-bottom: 1px solid #d7d1be !important;
}
body.theme-hn .channel-toolbar {
  padding-top: .45rem;
  padding-bottom: .45rem;
}
body.theme-hn .channel-toolbar h1 {
  font-size: 1.05rem;
  line-height: 1.2;
}
body.theme-hn .compose-panel {
  border-top: 1px solid #d7d1be !important;
}
body.theme-hn .tab,
body.theme-hn .channel-link,
body.theme-hn .ghost-btn,
body.theme-hn .page-link,
body.theme-hn .btn-primary,
body.theme-hn .btn-accent,
body.theme-hn .btn-danger {
  border: none !important;
  background: transparent !important;
  color: #000 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  line-height: 1.3;
  text-decoration: none !important;
}
body.theme-hn button.ghost-btn,
body.theme-hn button.btn-primary,
body.theme-hn button.btn-accent,
body.theme-hn button.btn-danger {
  border: 1px solid #b3a58b !important;
  background: #f6f6ef !important;
  height: 1.85rem !important;
  box-sizing: border-box !important;
  padding: 0 .55rem !important;
  border-radius: 3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}
body.theme-hn .tab-active,
body.theme-hn .channel-active {
  font-weight: 700;
  background: transparent !important;
  color: #000 !important;
}
body.theme-hn .app-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.theme-hn .channel-item {
  padding-left: 0 !important;
}
body.theme-hn .channel-item::before {
  content: none !important;
}
body.theme-hn .channel-link {
  text-decoration: none !important;
}
body.theme-hn .channel-link:hover {
  text-decoration: none !important;
}
body.theme-hn .input-field {
  border: 1px solid #828282 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
body.theme-hn .search-toolbar button.search-control {
  height: 1.85rem !important;
  padding: 0 .55rem !important;
  line-height: 1 !important;
}
body.theme-hn .search-toolbar input.search-control {
  height: 1.85rem !important;
  line-height: 1.85rem !important;
  padding: 0 .6rem !important;
}
body.theme-hn .header-search-trigger {
  border: 1px solid #b3a58b !important;
  background: #f6f6ef !important;
  border-radius: 3px !important;
}
body.theme-hn .app-header .header-action-button,
body.theme-hn .app-header .header-menu-button,
body.theme-hn .app-header .header-user-button,
body.theme-hn .app-header .header-search-trigger {
  height: 2.05rem !important;
  min-width: 2.05rem !important;
  padding: 0 .58rem !important;
  border: 1px solid rgba(0, 0, 0, .22) !important;
  border-radius: 5px !important;
  background: rgba(255, 246, 230, .38) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22) !important;
  color: #111 !important;
  line-height: 1 !important;
}
body.theme-hn .app-header .header-action-button:hover,
body.theme-hn .app-header .header-menu-button:hover,
body.theme-hn .app-header .header-user-button:hover,
body.theme-hn .app-header .header-search-trigger:hover {
  background: rgba(255, 246, 230, .55) !important;
  border-color: rgba(0, 0, 0, .32) !important;
}
body.theme-hn .app-header .header-user-button {
  padding-left: .78rem !important;
  padding-right: .78rem !important;
  font-weight: 600 !important;
}
body.theme-hn .app-header .header-search-input {
  height: 2.05rem !important;
  line-height: 2.05rem !important;
  padding: 0 .78rem !important;
  border: 1px solid rgba(0, 0, 0, .24) !important;
  border-radius: 5px !important;
  background: rgba(255, 246, 230, .48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2) !important;
  color: #111 !important;
}
body.theme-hn .app-header .header-search-input::placeholder {
  color: rgba(0, 0, 0, .52) !important;
}
body.theme-hn .app-header .header-search-input:focus {
  border-color: rgba(0, 0, 0, .38) !important;
  background: rgba(255, 250, 240, .68) !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .08) !important;
}
body.theme-hn .post-entry {
  position: relative;
  padding: 0 0 8px 0 !important;
  margin: 0 !important;
}
body.theme-hn .post-entry::before {
  content: attr(data-rank) ".";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  text-align: right;
  color: #828282;
  font-size: 13px;
  line-height: 1.2;
}
body.theme-hn .post-meta,
body.theme-hn .post-content,
body.theme-hn .reply-tree {
  padding-left: 24px;
}
body.theme-hn .read-more-link-row {
  margin-left: 0 !important;
  padding-left: 24px !important;
}
body.theme-hn .read-more-link {
  border: 0 !important;
  border-radius: 10px !important;
  background: #e5e1d8 !important;
  padding: 1px 9px 2px !important;
  color: #111 !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}
body.theme-hn .post-meta {
  margin-bottom: 2px;
  color: #828282 !important;
  font-size: 14px;
  line-height: 1.28;
}
body.theme-hn .post-content {
  font-size: 14px;
  line-height: 1.28;
  text-align: justify;
  text-justify: inter-ideograph;
}
body.theme-hn .reply-content {
  text-align: justify;
  text-justify: inter-ideograph;
}
body.theme-hn .post-content p,
body.theme-hn .reply-content p {
  margin: 0;
  text-align: justify;
  text-justify: inter-ideograph;
}
body.theme-hn .reply-tree {
  margin-top: 4px !important;
  border-left: 1px solid #d7d1be !important;
  padding-left: 24px !important;
  space-y: 0;
}
body.theme-hn .reply-row {
  border: 0 !important;
  background: transparent !important;
  margin-bottom: 0;
  padding: 0 !important;
  box-shadow: none !important;
}
body.theme-hn .reply-meta {
  color: #828282 !important;
  font-size: 14px;
  line-height: 1.28;
}
body.theme-hn .reply-content {
  font-size: 14px;
  line-height: 1.28;
  text-align: justify;
  text-justify: inter-ideograph;
}
body.theme-hn img {
  border-radius: 0 !important;
}
body.theme-hn .file-attachment {
  border: 1px solid #d7d1be;
  border-radius: 2px;
  background: #f6f6ef;
  padding: .2rem .35rem;
}
body.theme-hn .file-attachment-icon {
  border-color: #c9bea4;
  border-radius: 2px;
  color: #6a6a6a;
  min-width: 1.75rem;
  height: 1.2rem;
  font-size: .62rem;
}
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px;
  margin: .2rem 0;
}
.image-tile {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  display: block;
  height: auto;
  cursor: zoom-in;
	  max-width: 100%;
}
.image-tile > img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  display: block;
  border: 0;
  border-radius: 0;
}
.inline-image-attachment > img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
}
.diary-section .inline-image-attachment,
.diary-section .image-tile {
  max-width: 100%;
  overflow: visible;
}
.diary-section .inline-image-attachment > img,
.diary-section .image-tile > img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
}
body.theme-hn .image-tile > img {
  height: 150px;
}
@media (max-width: 767px) {
  .image-gallery {
    display: block;
    gap: 0;
  }
  .image-tile {
    display: block;
    width: 100%;
    margin: 0 0 6px 0;
  }
  .image-tile:last-child {
    margin-bottom: 0;
  }
  .image-tile > img,
  .inline-image-attachment > img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
  }
  .diary-section .image-tile > img,
  .diary-section .inline-image-attachment > img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .post-content,
  .reply-content,
  .post-content p,
  .reply-content p {
    text-align: justify !important;
    text-justify: inter-character;
  }
  .post-content p,
  .reply-content p {
    white-space: pre-line !important;
    overflow-wrap: anywhere;
  }
}
#imageLightbox {
  background: rgba(0, 0, 0, .78);
  z-index: 70;
}
#imageLightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: .35rem;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  font-size: 1rem;
  line-height: 1;
}
.lightbox-original {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: .35rem;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  padding: .45rem .75rem;
  cursor: pointer;
  font-size: .875rem;
}
.lightbox-nav:hover {
  background: rgba(0, 0, 0, .55);
}
.lightbox-prev { left: .75rem; }
.lightbox-next { right: .75rem; }
.quick-fab {
  position: fixed;
  right: max(1rem, calc(100vw - 760px + 1rem));
  bottom: 1rem;
  z-index: 45;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.knowledge-index-row {
  color: inherit;
  text-decoration: none;
}
.knowledge-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: .25rem;
  padding: .05rem .35rem;
  font-size: .72rem;
  line-height: 1.3;
  color: var(--text-muted);
  white-space: nowrap;
}
a.knowledge-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.knowledge-tag-active {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, white);
}
.knowledge-article h1,
.knowledge-content h1 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin: 1.5rem 0 .8rem;
}
.knowledge-content h2 {
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 1.4rem 0 .65rem;
}
.sport-index-row {
  display: grid;
  grid-template-columns: 2.4rem 7.2rem 5.5rem 5rem 5.6rem 5rem;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding-top: .375rem;
  padding-bottom: .375rem;
  color: inherit;
  text-decoration: none;
}
.sport-index-row:hover {
  background: rgba(0, 0, 0, .03);
  text-decoration: none;
}
.sport-index-rank,
.sport-index-date,
.sport-index-metric {
  font-size: .875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.sport-index-rank,
.sport-index-metric {
  text-align: right;
}
@media (max-width: 680px) {
  .sport-index-row {
    grid-template-columns: 2.1rem 5.8rem minmax(3.5rem, 1fr) 4.8rem;
    gap: .5rem;
  }
  .sport-index-pace,
  .sport-index-hr {
    display: none;
  }
}
.sport-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
/* The day summary always has exactly four metrics, so keep them on one row. */
.sport-detail-metrics--summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sport-detail-metric {
  min-width: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: .375rem .5rem;
}
/* Weather is a sentence, not a single figure: give it the whole row and let it
   wrap instead of being ellipsised inside a one-third cell. */
.sport-detail-metric--wide {
  grid-column: 1 / -1;
}
.sport-detail-metric--wide .sport-detail-value {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.sport-detail-label {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.2;
}
.sport-detail-value {
  margin-top: .125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sport-activity-record {
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}
@media (max-width: 680px) {
  .sport-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.sport-split-row {
  display: grid;
  grid-template-columns: 4rem minmax(4.5rem, 1fr) minmax(4.5rem, 1fr) minmax(5.5rem, 1fr) minmax(5.5rem, 1fr);
  align-items: center;
  gap: .75rem;
  border-top: 1px solid var(--border);
  padding: .35rem .5rem;
  font-variant-numeric: tabular-nums;
}
.sport-split-row > span {
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}
.sport-split-row > span:first-child {
  text-align: left;
  color: var(--text-muted);
}
.sport-split-head {
  color: var(--text-muted);
  font-weight: 600;
}
.sport-ai-body {
  overflow-wrap: anywhere;
  line-height: 1.75;
}
.sport-note-body {
  overflow-wrap: anywhere;
  line-height: 1.75;
}
.sport-note-body p {
  margin: 0;
  white-space: pre-wrap;
}
.sport-diary-section {
  border-top: 1px solid var(--border);
  padding-top: .875rem;
}
.sport-note-input {
  font-size: 16px !important;
  line-height: 1.5rem;
}
@media (max-width: 680px) {
  .sport-split-row {
    grid-template-columns: 3rem minmax(4rem, 1fr) minmax(4rem, 1fr) minmax(4.5rem, 1fr);
  }
  .sport-split-hr {
    display: none;
  }
}
.knowledge-content h3 {
  font-size: 1.1rem;
  margin: 1.2rem 0 .55rem;
}
.knowledge-content p {
  margin: 0 0 .8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
}
.knowledge-content mark {
  background: #fde68a;
  color: inherit;
  padding: 0 .12em;
}
.knowledge-content .knowledge-list-item {
  margin: .35rem 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.8;
}
.knowledge-content .knowledge-list-item::before {
  content: '•';
  position: absolute;
  left: .35rem;
}
.knowledge-content code {
  padding: .08rem .3rem;
  border-radius: .2rem;
  background: rgba(15, 23, 42, .08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
}
.knowledge-content .knowledge-code {
  overflow-x: auto;
  margin: 1rem 0;
  padding: .9rem 1rem;
  border-radius: .35rem;
  background: #18212f;
  color: #edf2f7;
  line-height: 1.65;
}
.knowledge-content .knowledge-code code {
  padding: 0;
  background: transparent;
  color: inherit;
}
.knowledge-editor textarea {
  min-height: 24rem;
}
.project-section-title {
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.project-index-row {
  color: inherit;
  text-decoration: none;
}
.project-status-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: .25rem;
  padding: .08rem .55rem;
  font-size: .72rem;
  line-height: 1.3;
  color: var(--text-muted);
  white-space: nowrap;
}
.project-timeline-date {
  position: sticky;
  top: .25rem;
  z-index: 1;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.project-timeline-date span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-bg) 86%, white);
  padding: .08rem .55rem;
  font-size: .72rem;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.project-message {
  padding: .25rem 0;
}
.project-todo-panel {
  margin-top: .35rem;
}
.project-todo-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem 0;
  font-size: .92rem;
  line-height: 1.55;
}
.project-todo-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}
.project-todo-done {
  color: var(--text-muted);
}
.project-todo-done .project-todo-body {
  text-decoration: line-through;
}
.project-composer {
  margin-top: .75rem;
  background: color-mix(in srgb, var(--panel-bg) 88%, white);
  backdrop-filter: blur(12px);
}
.project-composer.is-floating {
  position: fixed;
  left: .75rem;
  right: .75rem;
  bottom: calc(env(safe-area-inset-bottom, 0px) + .6rem);
  z-index: 45;
  max-height: min(72vh, 30rem);
  overflow-y: auto;
  margin-top: 0;
}
@media (min-width: 768px) {
  .project-composer.is-floating {
    left: 50%;
    right: auto;
    width: min(56rem, calc(100vw - 2rem));
    transform: translateX(-50%);
  }
}
.project-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.25rem;
  cursor: text;
}
.project-composer-body {
  display: block;
}
.project-composer.is-collapsed {
  padding: .45rem .7rem;
}
.project-composer.is-collapsed .project-composer-body {
  display: none;
}
.project-composer.is-expanded .project-composer-bar {
  display: none;
}
.project-composer.is-floating.is-expanded .project-composer-body {
  display: block;
}
.project-composer-dock {
  position: fixed;
  left: .75rem;
  right: .75rem;
  bottom: calc(env(safe-area-inset-bottom, 0px) + .6rem);
  z-index: 35;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.6rem;
  background: color-mix(in srgb, var(--panel-bg) 92%, white);
  backdrop-filter: blur(14px);
}
.project-composer-dock.is-visible {
  display: flex;
}
@media (min-width: 768px) {
  .project-composer-dock {
    left: 50%;
    right: auto;
    width: min(56rem, calc(100vw - 2rem));
    transform: translateX(-50%);
  }
}
.project-organize-controls,
.project-edit-form {
  display: none;
}
.project-organizing .project-organize-controls {
  display: inline-flex;
}
.project-message.is-editing .project-edit-form {
  display: block;
}
.project-message.is-editing .project-message-view {
  display: none;
}
.pull-refresh-indicator {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 3.75rem);
  z-index: 60;
  transform: translate(-50%, -150%);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.pull-refresh-indicator.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* 工具页不依赖精简版 utility CSS，保持与频道页一致的紧凑节奏。 */
.tools-page { width: 100%; max-width: 700px; margin: 0 auto; }
.tools-page > * + * { margin-top: 1rem; }
.pomodoro-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1.15rem; padding: .2rem 0 .55rem; }
.pomodoro-stat { min-width: 0; display: inline-flex; align-items: baseline; gap: .25rem; }
.pomodoro-stat-label { font-size: .78rem; color: var(--text-muted); }
.pomodoro-stat-value { font-size: 1rem; font-weight: 600; line-height: 1.25; }
.pomodoro-card, .pomodoro-history { padding: 1.25rem 0; }
.pomodoro-history { border-top: 1px solid var(--border); }
.pomodoro-card-heading { margin: 0 0 1rem; }
.pomodoro-card-heading h1 { margin: 0; font-size: 1.5rem; }
.pomodoro-card-heading p { margin: .25rem 0 0; font-size: .9rem; color: var(--text-muted); }
#pomodoroApp { width: 100%; max-width: 430px; margin: 0 auto; text-align: center; }
#pomodoroTime { width: 12.5rem; height: 12.5rem; margin: 0 auto; display: flex; align-items: center; justify-content: center; border: 4px solid var(--accent); border-radius: 50%; background: #fff; font-size: 3rem; font-weight: 600; box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.pomodoro-content-field { margin-top: 1.25rem; text-align: left; }
.pomodoro-content-field label { display: block; margin-bottom: .3rem; font-size: .9rem; color: var(--text-muted); }
.pomodoro-content-field input { box-sizing: border-box; width: 100%; }
.pomodoro-actions, .pomodoro-durations, .pomodoro-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
.pomodoro-actions { margin-top: .8rem; }
.pomodoro-hint { margin: .55rem 0 0; font-size: .78rem; color: var(--text-muted); }
.pomodoro-durations { margin-top: 1rem; font-size: .9rem; }
.pomodoro-audio { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: .7rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; }
.pomodoro-audio-status { margin-left: .45rem; font-size: .78rem; color: var(--text-muted); }
.pomodoro-history-head, .pomodoro-history-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pomodoro-history-head { margin-bottom: .75rem; }
.pomodoro-history-head h2 { margin: 0; font-size: 1.1rem; }
.pomodoro-history-meta, .pomodoro-empty, .pomodoro-history-footer { font-size: .88rem; color: var(--text-muted); }
.pomodoro-list { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pomodoro-row { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; font-size: .9rem; }
.pomodoro-row + .pomodoro-row { border-top: 1px solid var(--border); }
.pomodoro-row-check { color: var(--accent); }
.pomodoro-row-time { width: 8.25rem; flex: 0 0 auto; color: var(--text-muted); }
.pomodoro-row-content { min-width: 0; overflow-wrap: anywhere; }
.pomodoro-empty { padding: 1.5rem 0; text-align: center; }
.pomodoro-history-footer { margin-top: 1rem; }
@media (max-width: 640px) {
  .pomodoro-stats { gap: .3rem .8rem; }
  .pomodoro-card, .pomodoro-history { padding: 1rem 0; }
  #pomodoroTime { width: 10rem; height: 10rem; font-size: 2.45rem; }
  .pomodoro-row-time { width: auto; }
  .pomodoro-row { align-items: flex-start; flex-wrap: wrap; }
}
