:root {
  --cuckoo-accent: #6750a4;
  --cuckoo-card-opacity: 0.8;
  --cuckoo-input-opacity: 0.42;
  --cuckoo-bg-mask-opacity: 0.46;
  --cuckoo-text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;

  color: rgb(var(--mdui-color-on-background));
  background: rgb(var(--mdui-color-background));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(var(--mdui-color-primary), 0.28), transparent 30rem),
    radial-gradient(circle at 90% 88%, rgba(var(--mdui-color-tertiary), 0.18), transparent 28rem),
    rgb(var(--mdui-color-background));
}

.background picture,
.background img {
  display: block;
  width: 100%;
  height: 100%;
}

.background img {
  object-fit: cover;
}

.index-filter {
  position: absolute;
  inset: 0;
  background: rgba(var(--mdui-color-background), var(--cuckoo-bg-mask-opacity));
}

.pjax-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  width: 0;
  height: 4px;
  background: rgb(var(--mdui-color-secondary-container));
  opacity: 0;
  transition: width 0.24s ease, opacity 0.24s ease;
}

.pjax-progress.is-active {
  width: 74%;
  opacity: 1;
}

.pjax-progress.is-done {
  width: 100%;
  opacity: 0;
}


mdui-top-app-bar.appbar,
mdui-top-app-bar.appbar::part(top) {
  background: rgba(var(--mdui-color-primary-container), 0.88);
  color: rgb(var(--mdui-color-on-primary-container));
}


mdui-top-app-bar.appbar mdui-tooltip {
  display: contents;
}

.appbar-title {
  max-width: min(42vw, 360px);
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.appbar-title-link {
  color: inherit;
  text-decoration: none;
}

.appbar-spacer {
  flex: 1 1 auto;
}

.appbar-search {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
  text-shadow: none;
  transition: width 0.22s ease, background-color 0.22s ease;
}

.appbar-search.is-expanded {
  width: min(34vw, 320px);
  color: rgb(var(--mdui-color-on-secondary-container));
  background: rgb(var(--mdui-color-secondary-container));
}

.appbar-search button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: rgb(var(--mdui-color-on-primary-container));
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.appbar-search-icon {
  width: 40px;
  height: 40px;
}

.appbar-search mdui-icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.appbar-search input {
  width: 100%;
  min-width: 0;
  color: rgb(var(--mdui-color-on-primary-container));
  border: 0;
  outline: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.appbar-search input::placeholder {
  color: rgba(var(--mdui-color-on-primary-container), 0.74);
}

.appbar-search.is-expanded button,
.appbar-search.is-expanded input {
  color: rgb(var(--mdui-color-on-secondary-container));
}

.appbar-search.is-expanded input::placeholder {
  color: rgba(var(--mdui-color-on-secondary-container), 0.74);
}

.appbar-search.is-expanded input {
  opacity: 1;
}

.appbar-search-close {
  opacity: 0;
  pointer-events: none;
}

.appbar-search.is-expanded .appbar-search-close {
  opacity: 1;
  pointer-events: auto;
}

mdui-text-field::part(container) {
  background-color: rgba(var(--mdui-color-surface-container-highest), var(--cuckoo-input-opacity));
}

mdui-text-field:hover::part(container),
mdui-text-field:focus-within::part(container),
mdui-text-field[focused]::part(container),
mdui-text-field[focused-style]::part(container) {
  background-color: rgba(var(--mdui-color-surface-container-highest), var(--cuckoo-input-opacity));
}


.drawer-img {
  display: flex;
  justify-content: center;
  height: 120px;
  margin: 24px 0 10px;
}

.drawer-avatar {
  width: 120px;
  height: 120px;
}

.drawer-img .drawer-avatar {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.drawer-img .drawer-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(var(--mdui-color-shadow), 0.22);
}

.drawer-contact {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 0 20px 14px;
  text-align: center;
}

.drawer-contact strong {
  font-size: 20px;
  font-weight: 600;
}

.drawer-contact span {
  color: rgb(var(--mdui-color-on-surface-variant));
  font-size: 14px;
  line-height: 1.5;
}

.drawer-divider {
  margin: 0 12px;
}


.drawer-sublist mdui-list-item {
  --mdui-color-on-surface: var(--mdui-color-on-surface-variant);
}

.drawer-empty {
  color: rgb(var(--mdui-color-on-surface-variant));
  padding: 0 24px;
}

.drawer-bottom {
  margin-top: auto;
  padding: 12px;
  color: rgb(var(--mdui-color-on-surface-variant));
  border-top: 1px solid rgb(var(--mdui-color-outline-variant));
  text-align: center;
}

.drawer-bottom a {
  color: inherit;
}

.drawer-bottom a:hover,
.drawer-bottom a:focus-visible,
footer a:hover,
footer a:focus-visible {
  color: rgb(var(--mdui-color-secondary));
}

.index-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 35px;
  width: min(1150px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 24px;
}

.index-main,
.site-sidebar {
  min-width: 0;
}

.article {
  display: grid;
  gap: 20px;
}

.page-card,
.archive-card,
.pagination,
.notice-card {
  border-radius: 7px;
  color: rgb(var(--mdui-color-on-surface));
  background: rgba(var(--mdui-color-surface), var(--cuckoo-card-opacity));
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.index-card,
.index-card-normal,
.index-card-daily,
.post-card,
.comment-card,
.comment-respond,
.post-neighbors-card,
.post-related,
.sidebar-info,
.sidebar-module,
.toc-card {
  border-radius: 7px;
  color: rgb(var(--mdui-color-on-surface));
  background: rgba(var(--mdui-color-surface), var(--cuckoo-card-opacity));
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.index-card {
  display: block;
  height: 350px;
  overflow: hidden;
  margin: 0;
}

.index-normal {
  color: inherit;
  text-decoration: none;
}

.index-card-normal {
  min-height: 104px;
  overflow: hidden;
}

.index-card-normal:hover {
  box-shadow: 0 6px 18px rgba(var(--mdui-color-shadow), 0.22);
  transform: translateY(-2px);
}

.index-primary-normal {
  padding: 20px 24px;
}

.index-chip-normal {
  max-width: 100%;
  margin-top: 14px;
}

.index-title-normal {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}

.index-subtitle-normal {
  margin: 6px 0 0;
  color: rgb(var(--mdui-color-on-surface-variant));
  font-size: 14px;
}

.index-card-daily {
  position: relative;
  overflow: visible;
  margin-top: 23px;
}

.index-icon {
  position: absolute;
  top: -23px;
  left: 20px;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  color: rgb(var(--mdui-color-on-primary-container));
  background: rgb(var(--mdui-color-primary-container));
  box-shadow: 0 3px 5px -1px rgba(var(--mdui-color-shadow), 0.2), 0 6px 10px 0 rgba(var(--mdui-color-shadow), 0.14);
  transition: transform 0.2s ease;
}

.index-icon mdui-icon {
  font-size: 24px;
}

.index-card-daily:hover .index-icon {
  transform: scale(1.12);
}

.daily-primary {
  padding: 34px 40px 0;
}

.daily-permalink {
  display: inline-block;
  text-decoration: none;
}

.daily-subtitle {
  margin-top: 0;
  color: rgb(var(--mdui-color-on-surface-variant));
  font-size: 14px;
}

.daily-content {
  padding: 14px 40px 32px;
  color: rgb(var(--mdui-color-on-surface));
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.index-img-media,
.post-card-media {
  position: relative;
  height: 350px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(var(--mdui-color-primary-container), 0.92), rgba(var(--mdui-color-primary), 0.62));
}

.index-img {
  width: 100%;
  height: 100%;
  background: center center / cover no-repeat;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.index-card-filter {
  position: absolute;
  inset: 0;
  transition: all 0.3s ease;
}

.index-media-covered,
.post-media-covered {
  position: absolute;
  inset: auto 0 0;
  color: #fff;
  text-shadow: var(--cuckoo-text-shadow);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  transition: all 0.2s ease;
}

.index-card:hover .index-media-covered {
  background: rgba(0, 0, 0, 0.3);

}

.index-card:hover .index-img {
  transform: scale(1.05);
}

.index-primary,
.post-primary {
  padding: 24px;
}

.index-primary {
  transition: margin-bottom 0.2s ease;
}

.index-title,
.post-title {
  display: block;
  margin: 0;
  overflow: hidden;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-overflow: ellipsis;
}

.index-title {
  font-size: 21px;
}

.post-title {
  font-size: 30px;
}

.index-info,
.index-excerpt,
.post-subtitle {
  margin: 8px 0 0;
  overflow: hidden;
  min-height: 24px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (min-width: 1024px) {
  .index-info {
    margin-bottom: 16px;
    transition: all 0.2s ease;
  }

  .index-primary {
    margin-bottom: -56px;
    transition: all 0.2s ease;
  }

  .index-card:hover .index-info {
    margin-bottom: 0;
  }

  .index-card:hover .index-primary {
    margin-bottom: -14px;
  }
}

.archive-card,
.page-card {
  padding: 24px;
  text-align: center;
}

.archive-card {
  margin-bottom: 20px;
}

.archive-title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 18px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 5px;
}

.pagination a:hover {
  color: rgb(var(--mdui-color-on-secondary-container));
  background: rgb(var(--mdui-color-secondary-container));
}

.pagination-disabled {
  color: rgb(var(--mdui-color-on-surface-variant));
  opacity: 0.5;
}

.changePage {
  display: block;
  width: 140px;
  margin: 20px auto 0;
}

.changePage.is-loading {
  pointer-events: none;
}

body[data-infinite-scroll="1"] .post-pagination {
  display: none;
}

.site-sidebar {
  display: grid;
  align-content: start;
  gap: 20px;
}

.sidebar-info {
  overflow: hidden;
}

.sidebar-info-img {
  position: relative;
  height: 120px;
  overflow: visible;
}

.sidebar-info-bg {
  height: 120px;
  background-color: rgb(var(--mdui-color-primary));
  background-image: var(--sidebar-bg-image);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
}

.sidebar-info:hover .sidebar-info-bg {
  transform: scale(1.1);
}

.sidebar-avatar {
  position: absolute;
  right: 0;
  bottom: -35px;
  left: 0;
  width: 100px;
  height: 100px;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(var(--mdui-color-shadow), 0.28);
}

.sidebar-info-body {
  width: 85%;
  margin: 44px auto 17px;
  text-align: center;
  word-break: break-word;
}

.sidebar-info-name {
  font-size: 20px;
  font-weight: 500;
}

.sidebar-info-desc {
  margin-top: 5px;
  color: rgb(var(--mdui-color-on-surface-variant));
  font-size: 15px;
  line-height: 1.6;
}

.sidebar-module {
  padding: 0 0 10px;
}

.sidebar-module-title {
  margin: 0;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgb(var(--mdui-color-outline-variant));
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}


.sidebar-list mdui-list-item {
  font-size: 14px;
}

.sidebar-list .sidebar-empty {
  color: rgb(var(--mdui-color-on-surface-variant));
}

.sidebar-list mdui-list-item::part(text) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 14px 4px;
}

.sidebar-tag mdui-chip {
  color: rgb(var(--mdui-color-on-secondary-container));
  background-color: rgb(var(--mdui-color-secondary-container));
  border-color: transparent;
}

.sidebar-tag mdui-chip:hover,
.sidebar-tag mdui-chip:focus-visible {
  box-shadow: 0 2px 6px rgba(var(--mdui-color-shadow), 0.18);
}

.sidebar-tag .sidebar-empty {
  color: rgb(var(--mdui-color-on-surface-variant));
}


.post-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.post-card > :not(.post-end-image) {
  position: relative;
  z-index: 1;
}

.post-end-image {
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 0;
  display: block;
  width: min(46%, 340px);
  max-height: 320px;
  pointer-events: none;
}

.post-end-image img {
  display: block;
  width: 100%;
  max-height: inherit;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0.85;
}

.post-card-media {
  height: 350px;
  overflow: hidden;
  border-radius: 7px 7px 0 0;
}

.post-card-media-normal {
  height: 118px;
  background: linear-gradient(180deg, rgba(var(--mdui-color-primary-container), 0.85), rgba(var(--mdui-color-primary), 0.48));
}

.post-card-media-normal .post-media-covered {
  color: rgb(var(--mdui-color-on-surface));
  text-shadow: none;
  background: transparent;
}

.post-card-media-normal .post-title {
  color: rgb(var(--mdui-color-on-surface));
}

.post-card-media-normal .post-subtitle,
.post-card-media-normal .post-subtitle a {
  color: rgb(var(--mdui-color-on-surface-variant));
}

.post-card-media .post-title {
  white-space: normal;
}

.post-card-media .post-subtitle a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  color: rgb(var(--mdui-color-on-tertiary-container));
  background: rgb(var(--mdui-color-tertiary-container));
  border-top: 1px solid rgba(var(--mdui-color-tertiary), 0.24);
  border-bottom: 1px solid rgba(var(--mdui-color-tertiary), 0.24);
}

.post-content {
  padding: 24px;
  font-size: 16px;
  line-height: 1.85;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

.post-content img:not(.fancybox__image) {
  cursor: zoom-in;
}

.fancybox__container {
  --fancybox-accent-color: rgb(var(--mdui-color-primary));
}

.post-content h1,
.post-content h2 {
  margin-top: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgb(var(--mdui-color-outline-variant));
  letter-spacing: 0;
}

.post-content h1::before,
.post-content h2::before {
  content: "# ";
  color: var(--cuckoo-accent);
}

.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 0;
  letter-spacing: 0;
}

.post-content h3::before,
.post-content h4::before,
.post-content h5::before,
.post-content h6::before {
  content: "";
  padding-left: 7px;
  border-left: 4px solid var(--cuckoo-accent);
  border-radius: 2px;
}

.post-content blockquote {
  margin: 1em;
  padding-left: 16px;
  border-left: 4px solid rgba(var(--mdui-color-primary), 0.45);
  color: rgb(var(--mdui-color-on-surface-variant));
}

.post-content code {
  padding: 2px 6px;
  color: rgb(var(--mdui-color-primary));
  background: rgba(var(--mdui-color-primary), 0.1);
  border-radius: 4px;
  font-size: 0.875em;
}

.post-content pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

.post-content li:has(> input[type="checkbox"]) {
  list-style: none;
  position: relative;
  margin-left: -1.5em;
}

.post-content li > input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
  border: 2px solid rgba(var(--mdui-color-primary), 0.5);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.post-content li > input[type="checkbox"]:checked {
  background: rgb(var(--mdui-color-primary));
  border-color: rgb(var(--mdui-color-primary));
}

.post-content li > input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.post-content pre:not(.mermaid) {
  position: relative;
  max-width: 100%;
  margin-bottom: 24px;
  overflow: hidden;
  padding: 34px 0 0;
  color: #abb2bf;
  border-radius: 5px;
  background: #282c34;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.post-content pre:not(.mermaid) code {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  padding: 0 16px;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font-size: 0.875em;
  line-height: 1.6;
  scrollbar-color: rgba(171, 178, 191, 0.58) #282c34;
  scrollbar-width: thin;
  white-space: pre;
  word-wrap: normal;
}

.post-content pre:not(.mermaid) code::after {
  content: "";
  display: block;
  height: 12px;
}

.post-content pre:not(.mermaid) code::-webkit-scrollbar {
  height: 10px;
}

.post-content pre:not(.mermaid) code::-webkit-scrollbar-track {
  background: #282c34;
}

.post-content pre:not(.mermaid) code::-webkit-scrollbar-thumb {
  border: 2px solid #282c34;
  border-radius: 5px;
  background: rgba(171, 178, 191, 0.58);
}

.post-content .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 24px;
}

.post-content table {
  min-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
  font-size: 0.9em;
}

.post-content table th,
.post-content table td {
  padding: 8px 12px;
  border: 1px solid rgb(var(--mdui-color-outline-variant));
  text-align: left;
}

.post-content table th {
  font-weight: 600;
  background: rgba(var(--mdui-color-primary), 0.08);
}

.post-content table tr:nth-child(even) td {
  background: rgba(var(--mdui-color-on-surface), 0.03);
}

.post-content pre:not(.mermaid)::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fc625d;
  box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
}

.post-content-code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #d1d5db;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.post-protected {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 24px;
}

.post-neighbors-card {
  margin-top: 20px;
  padding: 18px 24px;
}

.post-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-right: 4px;
}

.post-like-btn {
  --mdui-color-on-surface: var(--mdui-color-on-surface-variant);
}

.post-like-btn.is-liked {
  color: rgb(var(--mdui-color-on-secondary-container));
}

.post-like-btn mdui-icon {
  font-size: 20px;
}

.post-like-count {
  min-width: 1em;
  text-align: center;
}

.post-neighbors {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.post-neighbors a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  max-width: 48%;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 5px;
  color: rgb(var(--mdui-color-on-secondary-container));
  background: rgb(var(--mdui-color-secondary-container));
  white-space: nowrap;
  text-overflow: ellipsis;
}

.post-related {
  margin-top: 20px;
  padding: 18px;
}

.post-related h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: 0;
}

.friend-page {
  min-width: 0;
  margin-top: 20px;
}

.friend-page-title {
  margin: 0 0 18px;
  color: rgb(var(--mdui-color-on-surface));
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
}

.friend-links-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.friend-link {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.friend-link-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 116px;
  grid-template-columns: 86px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(var(--mdui-color-outline-variant), 0.62);
  border-radius: 7px;
  box-sizing: border-box;
  background: rgba(var(--mdui-color-surface-container), var(--cuckoo-card-opacity));
  box-shadow: 0 4px 14px rgba(var(--mdui-color-shadow), 0.12);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.friend-link:hover .friend-link-card,
.friend-link:focus-visible .friend-link-card {
  border-color: rgba(var(--mdui-color-secondary), 0.5);
  background: rgba(var(--mdui-color-secondary-container), 0.72);
  box-shadow: 0 8px 22px rgba(var(--mdui-color-shadow), 0.18);
  transform: translateY(-2px);
}

.friend-link-avatar {
  width: 86px;
  height: 86px;
}

.friend-link-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.friend-link-copy strong,
.friend-link-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-link-copy strong {
  color: rgb(var(--mdui-color-on-surface));
  font-size: 19px;
  font-weight: 600;
  white-space: nowrap;
}

.friend-link-copy span {
  display: -webkit-box;
  color: rgb(var(--mdui-color-on-surface-variant));
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.friend-link-card > mdui-icon {
  color: rgb(var(--mdui-color-primary));
  font-size: 20px;
  opacity: 0.72;
  transition: transform 180ms ease, opacity 180ms ease;
}

.friend-link:hover .friend-link-card > mdui-icon,
.friend-link:focus-visible .friend-link-card > mdui-icon {
  opacity: 1;
  transform: translate(2px, -2px);
}

.friend-links-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: rgb(var(--mdui-color-on-surface-variant));
  text-align: center;
  border-radius: 7px;
  background: rgba(var(--mdui-color-surface), var(--cuckoo-card-opacity));
}

.friend-page-content {
  margin-top: 20px;
}

.comment-title {
  position: relative;
  margin: 20px 0;
  color: rgb(var(--mdui-color-primary));
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
}

.comments-wrap {
  min-width: 0;
  margin-top: 20px;
}

.comment-title::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 0;
  z-index: -1;
  width: 120px;
  height: 10px;
  background: rgba(var(--mdui-color-primary), 0.15);
}

.comment-list {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.comment-card {
  position: relative;
  min-width: 0;
  max-width: 100%;
  padding: 15px 20px;
}

.comment-child {
  position: relative;
  min-width: 0;
  max-width: 100%;
  padding-top: 15px;
  border-top: 1px solid rgba(var(--mdui-color-outline-variant), 0.65);
}

.comment-children {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.comment-reply-slot:empty {
  display: none;
}

.comment-header {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-right: 52px;
}

.comment-header-no-avatar {
  grid-template-columns: minmax(0, 1fr);
}

.comment-avatar-box {
  position: relative;
  display: block;
  width: 50px;
  height: 50px;
}

.comment-avatar {
  width: 50px;
  height: 50px;
}

.comment-avatar-badge {
  position: absolute;
  top: 33px;
  left: 33px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid rgba(var(--mdui-color-surface), 0.96);
  border-radius: 50%;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(var(--mdui-color-shadow), 0.24);
}

.comment-avatar-badge mdui-icon {
  font-size: 13px;
}

.comment-avatar-badge-owner {
  color: rgb(var(--mdui-color-on-primary));
  background: rgb(var(--mdui-color-primary));
}

.comment-avatar-badge-friend {
  color: rgb(var(--mdui-color-on-tertiary));
  background: rgb(var(--mdui-color-tertiary));
}

.comment-header-meta {
  min-width: 0;
}

.comment-author-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.comment-author {
  min-width: 0;
  overflow-wrap: anywhere;
}

.comment-pending {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 22px;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  color: rgb(var(--mdui-color-on-primary-container));
  background: rgb(var(--mdui-color-primary-container));
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}

.comment-date {
  display: block;
  margin-top: 2px;
  color: rgb(var(--mdui-color-on-surface-variant));
  font-size: 14px;
}

.comment-content {
  min-width: 0;
  margin: 10px 30px 10px 64px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.comment-content p {
  margin: 0 0 8px;
}

.comment-content pre,
.comment-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.comment-content pre {
  white-space: pre;
}

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

.comment-reply {
  position: absolute;
  top: 16px;
  right: 20px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 8px;
  border-radius: 4px;
  color: rgb(var(--mdui-color-primary));
}

.comment-child > .comment-reply {
  top: 15px;
  right: 0;
}

.comment-reply:hover,
.comment-reply:focus-visible {
  color: rgb(var(--mdui-color-on-secondary-container));
  background: rgb(var(--mdui-color-secondary-container));
}

.comment-reply-name {
  color: rgb(var(--mdui-color-primary));
  font-weight: 500;
  text-decoration: none;
}

.notice-card {
  margin-bottom: 14px;
  padding: 12px 16px;
}

.notice-error {
  color: rgb(var(--mdui-color-on-error-container));
  background: rgb(var(--mdui-color-error-container));
}

.comment-respond {
  position: relative;
  margin-top: 20px;
  padding: 16px;
  overflow: visible;
  isolation: isolate;
}

.comment-respond.has-avatar {
  margin-top: 58px;
  padding-top: 48px;
}

.comment-respond.is-replying {
  width: 100%;
  margin: 16px 0 2px;
  box-sizing: border-box;
  border-top: 1px solid rgba(var(--mdui-color-secondary), 0.24);
  border-radius: 5px;
  background: rgba(var(--mdui-color-secondary-container), calc(var(--cuckoo-card-opacity) * 0.72));
  box-shadow: none;
}

.comment-respond.is-replying.has-avatar {
  margin-top: 58px;
}

.comment-form-avatar-wrap {
  position: absolute;
  top: -40px;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border: 4px solid rgba(var(--mdui-color-surface), 0.96);
  border-radius: 50%;
  background: rgb(var(--mdui-color-surface-container));
  box-shadow: 0 3px 10px rgba(var(--mdui-color-shadow), 0.2);
  transform: translateX(-50%);
}

.comment-form-avatar {
  width: 100%;
  height: 100%;
}

.comment-respond-head {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.comment-respond-title {
  color: rgb(var(--mdui-color-on-surface));
  font-size: 16px;
  font-weight: 600;
}

.comment-cancel-reply {
  color: rgb(var(--mdui-color-primary));
}

.comment-cancel-reply[hidden] {
  display: none;
}

.comment-bg-image {
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 0;
  width: min(44%, 340px);
  max-height: 320px;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  opacity: 0.82;
}

.comment-respond > :not(.comment-bg-image):not(.comment-form-avatar-wrap) {
  position: relative;
  z-index: 1;
}

.comment-web {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.comment-current-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  margin-bottom: 12px;
  color: rgb(var(--mdui-color-on-surface));
}

.comment-textarea {
  width: 100%;
}

.comment-form-button {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#toc {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
}

.toc {
  max-height: calc(100vh - 180px);
  overflow: auto;
  scroll-behavior: auto;
}

.toc mdui-list-item {
  font-size: 14px;
}

.toc mdui-list-item::part(container) {
  min-height: 36px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.toc mdui-list-item[data-level="1"]::part(container) {
  padding-left: 32px;
}

.toc mdui-list-item[data-level="2"]::part(container) {
  padding-left: 48px;
}

.toc mdui-list-item[data-level="3"]::part(container) {
  padding-left: 64px;
}

.toc mdui-list-item::part(headline) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

mdui-fab.top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 55;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

mdui-fab.top::part(button) {
  border-radius: 50%;
}

mdui-fab.top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  color: rgb(var(--mdui-color-on-surface-variant));
  background: rgba(var(--mdui-color-surface), var(--cuckoo-card-opacity));
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

footer a {
  color: inherit;
}

.muted {
  color: rgb(var(--mdui-color-on-surface-variant));
}

mdui-icon {
  vertical-align: middle;
}

@media (max-width: 1024px) {
  .index-container {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    order: -1;
  }

  .toc {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .appbar-search {
    display: grid;
  }

  .appbar-search.is-expanded {
    width: min(52vw, 240px);
  }

  .appbar-title {
    max-width: 42vw;
    font-size: 18px;
  }

  .index-container {
    width: min(100% - 20px, 1150px);
    padding-top: 16px;
  }

  .site-sidebar {
    order: 1;
  }

  .index-card,
  .index-img-media {
    height: 230px;
  }

  .index-card-normal {
    min-height: 92px;
  }

  .daily-primary {
    padding: 34px 20px 0;
  }

  .daily-content {
    padding: 12px 20px 24px;
  }

  .post-card-media {
    height: 270px;
  }

  .friend-page-title {
    font-size: 24px;
  }

  .friend-links-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .friend-link-card {
    min-height: 104px;
    grid-template-columns: 72px minmax(0, 1fr) 20px;
    gap: 14px;
    padding: 15px;
  }

  .friend-link-avatar {
    width: 72px;
    height: 72px;
  }

  .index-title,
  .post-title {
    font-size: 24px;
  }

  .index-primary,
  .post-primary,
  .post-content {
    padding: 20px;
  }


  .post-card-media .post-subtitle {
    white-space: normal;
  }

  .post-protected,
  .comment-web {
    grid-template-columns: 1fr;
  }

  .post-neighbors {
    flex-direction: column;
  }

  .post-neighbors a {
    max-width: 100%;
  }

  .comment-content {
    margin-left: 0;
  }

  .post-end-image img {
    max-height: 260px;
  }

  .post-end-image {
    width: min(70%, 280px);
    max-height: 260px;
  }

  .comment-bg-image {
    width: min(72%, 260px);
    max-height: 240px;
    opacity: 0.42;
  }

  mdui-fab.top {
    right: 16px;
    bottom: 16px;
  }
}
