/* hsad-theme.css */
:root {
  --bg: #f8f6f2;
  --text: #2a3440;
  --text-soft: #647182;
  --line: rgba(51, 68, 86, 0.11);
  --line-strong: rgba(51, 68, 86, 0.18);
  --accent: #5c7793;
  --accent-soft: #dce8f0;
  --accent-strong: #34475b;
  --sidebar-width: min(21rem, 29vw);
  --content-width: 40rem;
  --toc-width: 13.5rem;
  --post-shell-width: calc(var(--content-width) + var(--toc-width) + 3rem);
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", "STSong", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.68;
}

button {
  font: inherit;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 12;
  height: 2px;
  background: rgba(91, 124, 153, 0.06);
  pointer-events: none;
}

.reading-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 90ms linear;
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  z-index: 3;
}

.sidebar {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(175deg, #232f3e 0%, #151d26 100%);
}

.sidebar__backdrop,
.sidebar__overlay {
  position: absolute;
  inset: 0;
}

.sidebar__backdrop {
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: blur(5px) saturate(0.92);
}

.sidebar__overlay {
  background:
    linear-gradient(180deg, rgba(66, 55, 46, 0.18), rgba(21, 19, 18, 0.52)),
    linear-gradient(140deg, rgba(255, 247, 237, 0.2), rgba(255, 255, 255, 0.03));
}

.sidebar__content {
  position: relative;
  height: 100%;
  padding: 2.2rem 1.7rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #fffdf9;
}

.sidebar__brand {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
}

.sidebar__avatar {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 250, 246, 0.78);
  box-shadow: 0 16px 32px rgba(18, 17, 16, 0.2);
}

.sidebar__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.95rem, 2.3vw, 2.4rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: lowercase;
}

.sidebar__subtitle {
  margin: 0.55rem 0 0;
  max-width: 15.5rem;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.58;
  letter-spacing: 0.01em;
  color: rgba(255, 250, 246, 0.82);
}

.sidebar__description {
  margin: 0;
  max-width: 15rem;
  color: rgba(255, 250, 246, 0.7);
  font-size: 0.84rem;
  line-height: 1.72;
}

.sidebar__nav,
.sidebar__social {
  display: grid;
  gap: 0.6rem;
}

.sidebar__nav {
  margin-top: 0.95rem;
}

.sidebar__nav a,
.sidebar__social a {
  width: fit-content;
  font-size: 0.9rem;
  color: rgba(255, 250, 246, 0.86);
  transition: transform 160ms ease, color 160ms ease, opacity 160ms ease;
}

.sidebar__nav a:hover,
.sidebar__nav a.is-active,
.sidebar__social a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.sidebar__nav a.is-active {
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.2);
}

.sidebar__social {
  margin-top: auto;
  gap: 0.35rem;
}

.site-main {
  position: relative;
  margin-left: var(--sidebar-width);
  padding: 2.7rem clamp(1.7rem, 3.6vw, 3.3rem) 4rem;
  min-height: 100vh;
}

.hero,
.page-intro,
.article,
.post-list,
.friend-grid,
.tax-grid,
.not-found {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.hero,
.page-intro,
.article,
.not-found {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.article-layout {
  width: min(100%, var(--post-shell-width));
  margin: 0 auto;
}

.article-layout--with-toc {
  display: grid;
  grid-template-columns: minmax(0, var(--content-width)) minmax(11.5rem, var(--toc-width));
  grid-template-areas: "main toc";
  column-gap: clamp(1.4rem, 3vw, 3rem);
  align-items: start;
}

.article-layout .article {
  grid-area: main;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.hero {
  padding: 0 0 1.8rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
}

.article__eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.hero__title,
.page-intro__title,
.article__title,
.post-card__title,
.not-found__title {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--accent-strong);
  line-height: 1.16;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero__title {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  letter-spacing: 0;
}

.hero__description,
.page-intro__description,
.empty-state__text,
.not-found__text {
  max-width: 42rem;
  margin: 0.85rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.post-list {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.post-card {
  padding: 1.35rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.post-card:last-child {
  border-bottom: 0;
}

.view-home .post-card:first-child {
  padding-top: 0.15rem;
}

.post-card__header {
  display: grid;
  gap: 0.34rem;
}

.post-card__title {
  font-size: clamp(1.34rem, 2.25vw, 1.72rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.28;
}

.post-card__title a,
.post-card__meta-link,
.post-card__more,
.friend-card:hover .friend-card__name,
.article__eyebrow a:hover,
.article__tag:hover,
.post-nav__item:hover strong {
  color: var(--accent);
}

.post-card__meta,
.article__meta,
.site-footer,
.friend-card__blog,
.post-nav__label {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.6;
}

.post-card__summary,
.friend-card__desc {
  margin: 0.5rem 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.72;
}

.post-card__summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.post-card__more {
  display: inline-flex;
  margin-top: 0.72rem;
  font-weight: 600;
  font-size: 0.84rem;
}

.pagination {
  width: min(100%, var(--content-width));
  margin: 1.1rem auto 0;
}

.pagination .page-number,
.pagination .extend {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.25rem 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.pagination .current {
  background: transparent;
  color: var(--accent-strong);
  font-weight: 600;
}

.archive-list {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.archive-group {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1.15rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.archive-group:first-child {
  padding-top: 0.2rem;
}

.archive-group:last-child {
  border-bottom: 0;
}

.archive-group__year {
  margin: 0;
  padding-top: 0.18rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-strong);
  letter-spacing: 0;
}

.archive-group__items {
  min-width: 0;
}

.archive-entry {
  display: grid;
  grid-template-columns: 3.8rem minmax(0, 1fr) auto;
  gap: 0.95rem;
  align-items: baseline;
  padding: 0.55rem 0;
}

.archive-entry__date,
.archive-entry__meta {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.archive-entry__date {
  font-variant-numeric: tabular-nums;
}

.archive-entry__title {
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--accent-strong);
}

.archive-entry:hover .archive-entry__title {
  color: var(--accent);
}

.tax-list {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.tax-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.tax-row__name {
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.42;
  color: var(--accent-strong);
}

.tax-row__count {
  color: var(--text-soft);
  font-size: 0.84rem;
  white-space: nowrap;
}

.tax-row:hover .tax-row__name,
.tag-cloud__item:hover .tag-cloud__name {
  color: var(--accent);
}

.tag-cloud {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  border-top: 1px solid var(--line);
}

.tag-cloud__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.tag-cloud__name {
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.tag-cloud__count {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.search-panel {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.search-form__input {
  width: 100%;
  min-width: 0;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.72rem;
  outline: 0;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.search-form__input::placeholder {
  color: color-mix(in srgb, var(--text-soft) 78%, transparent);
}

.search-form__input:focus {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 48%, transparent);
}

.search-form__submit {
  padding: 0.78rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.72rem;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.search-form__submit:hover,
.search-form__submit:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent);
}

.search-status {
  margin: 0.85rem 0 0;
  min-height: 1.5em;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.search-results {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}

.search-result {
  padding: 1.1rem 0 1.2rem;
  border-bottom: 1px solid var(--line);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result__title,
.search-result__meta,
.search-result__excerpt {
  margin: 0;
}

.search-result__title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--accent-strong);
}

.search-result__title a:hover,
.search-result__title a:focus-visible {
  color: var(--accent);
}

.search-result__meta {
  margin-top: 0.3rem;
  color: var(--accent);
  font-size: 0.78rem;
}

.search-result__excerpt {
  margin-top: 0.4rem;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.72;
}

.page-intro,
.article,
.not-found {
  padding: 0;
}

.page-intro {
  margin-bottom: 1rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.page-intro__title,
.article__title,
.not-found__title {
  font-size: clamp(1.82rem, 3.4vw, 2.42rem);
  letter-spacing: 0;
}

.article--page {
  margin-top: 0;
}

.article__header {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.45rem;
  border-bottom: 1px solid var(--line);
}

.article__divider,
.post-card__dot {
  margin: 0 0.5rem;
  color: var(--text-soft);
}

.article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}

.article__tag {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.article__tag::before {
  content: "#";
  margin-right: 0.12rem;
  color: var(--accent);
}

.article__content {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--text);
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.article__content > *:first-child {
  margin-top: 0;
}

.article__content > *:last-child {
  margin-bottom: 0;
}

.article__content > h1:first-child {
  display: none;
}

.article__content p,
.article__content li,
.article__content ul,
.article__content ol,
.article__content blockquote {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article__content p,
.article__content ul,
.article__content ol,
.article__content blockquote,
.article__content pre,
.article__content table {
  margin: 1.12rem 0;
}

.article__content h1,
.article__content h2,
.article__content h3,
.article__content h4,
.article__content h5,
.article__content h6 {
  margin: 1.8rem 0 0.72rem;
  line-height: 1.28;
  color: var(--accent-strong);
  font-family: var(--font-serif);
  letter-spacing: 0;
  scroll-margin-top: 5.8rem;
}

.article__content h2 {
  font-size: 1.3rem;
}

.article__content h3 {
  font-size: 1.08rem;
}

.article__content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(91, 124, 153, 0.3);
  text-underline-offset: 0.18em;
}

.article__content .headerlink {
  display: none;
}

.article__content blockquote {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(92, 119, 147, 0.06);
  border-radius: 0 0.85rem 0.85rem 0;
  color: var(--text-soft);
}

.article__content code {
  padding: 0.12rem 0.36rem;
  border-radius: 0.32rem;
  background: rgba(52, 76, 100, 0.08);
  font-family: "SFMono-Regular", "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.82em;
}

.article__content .code-frame {
  position: relative;
  margin: 1.05rem 0 1.2rem;
  border: 0;
  border-left: 2px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 0 0.28rem 0.28rem 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-soft) 18%, rgba(255, 255, 255, 0.34));
  box-shadow: none;
}

.article__content .code-frame__head {
  position: absolute;
  inset: 0.42rem 0.46rem auto 0.72rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

.article__content .code-frame__label {
  margin-right: auto;
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.5rem;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article__content .code-frame__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  min-width: 0;
  padding: 0.34rem;
  border: 0;
  border-radius: 0.28rem;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  pointer-events: auto;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.article__content .code-frame__copy svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.article__content .code-frame__copy:hover,
.article__content .code-frame__copy:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 52%, rgba(255, 255, 255, 0.6));
  color: var(--accent-strong);
}

.article__content .code-frame__copy.is-copied {
  background: color-mix(in srgb, var(--accent-soft) 62%, rgba(255, 255, 255, 0.66));
  color: var(--accent-strong);
}

.article__content pre {
  margin: 0;
  padding: 0.76rem 2.75rem 0.82rem 0.88rem;
  max-width: 100%;
  overflow: auto;
  border-radius: 0;
  background: transparent;
  color: #344352;
  box-shadow: none;
}

.article__content .code-frame--labeled pre {
  padding-top: 2.05rem;
}

.article__content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 0.9em;
  line-height: 1.72;
}

.article__content pre ::selection {
  background: color-mix(in srgb, var(--accent-soft) 78%, white);
}

.article__content pre .token.comment,
.article__content pre .token.prolog,
.article__content pre .token.doctype,
.article__content pre .token.cdata {
  color: #7a8785;
}

.article__content pre .token.punctuation,
.article__content pre .token.operator {
  color: #65727f;
}

.article__content pre .token.property,
.article__content pre .token.tag,
.article__content pre .token.boolean,
.article__content pre .token.number,
.article__content pre .token.constant,
.article__content pre .token.symbol,
.article__content pre .token.deleted {
  color: #916553;
}

.article__content pre .token.selector,
.article__content pre .token.attr-name,
.article__content pre .token.string,
.article__content pre .token.char,
.article__content pre .token.builtin,
.article__content pre .token.inserted {
  color: #657451;
}

.article__content pre .token.atrule,
.article__content pre .token.attr-value,
.article__content pre .token.keyword {
  color: #655d88;
}

.article__content pre .token.function,
.article__content pre .token.class-name {
  color: #3f7080;
}

.article__content pre .token.regex,
.article__content pre .token.important,
.article__content pre .token.variable {
  color: #8a6b45;
}

.article__content table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9em;
}

.article__content th,
.article__content td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.article__content img {
  margin: 1.3rem auto;
  border-radius: 0.9rem;
  box-shadow: 0 16px 28px rgba(38, 54, 74, 0.1);
}

.article__content figure.article-media {
  margin: 1.55rem 0 1.75rem;
}

.article__content figure.article-media img {
  margin: 0 auto;
}

.article__content figcaption.article-media__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.32rem;
  margin-top: 0.65rem;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.7;
  text-align: center;
}

.article-media__label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.article-media__text {
  max-width: 100%;
}

.post-outline {
  grid-area: toc;
  align-self: start;
  min-width: 0;
  padding-top: 0.25rem;
}

.post-outline--desktop {
  position: sticky;
  top: 2.7rem;
  max-height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-outline--mobile {
  display: none;
}

.post-outline__title {
  margin: 0 0 0.9rem;
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.42;
  flex: 0 0 auto;
}

.post-toc {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0.35rem 1rem 1rem;
  border-left: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.post-toc .post-toc__list,
.post-toc .post-toc__list-child,
.post-toc .toc-child {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-toc .post-toc__list-item + .post-toc__list-item,
.post-toc .toc-item + .toc-item {
  margin-top: 0.38rem;
}

.post-toc .post-toc__list-child,
.post-toc .toc-child {
  margin-top: 0.28rem;
  margin-left: 0.1rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(51, 68, 86, 0.08);
}

.post-toc .post-toc__list-link,
.post-toc .toc-link {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-toc .post-toc__list-link:hover,
.post-toc .post-toc__list-link.is-active,
.post-toc .toc-link:hover,
.post-toc .toc-link.is-active {
  color: var(--accent-strong);
}

.post-toc .post-toc__list-link.is-active,
.post-toc .toc-link.is-active {
  font-weight: 600;
}

.post-toc .post-toc__list-number,
.post-toc .toc-number {
  display: none;
}

.post-nav {
  width: min(100%, var(--content-width));
  margin: 1.25rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.post-nav__item {
  padding: 0.9rem 0.15rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-top: 1px solid var(--line);
}

.post-nav__item strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.view-post .post-nav {
  width: min(100%, var(--post-shell-width));
}

.friend-card__name {
  color: var(--accent-strong);
  font-size: 1rem;
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  margin-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.friend-card {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.friend-card__avatar {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  object-fit: cover;
}

.friend-card__body {
  min-width: 0;
}

.friend-card__blog {
  display: block;
  margin-top: 0.22rem;
}

.friend-card__desc {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.empty-state,
.not-found {
  text-align: left;
}

.empty-state {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 2rem 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.empty-state__title,
.not-found__code {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--accent-strong);
}

.not-found__code {
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.not-found__link {
  display: inline-flex;
  margin-top: 1.1rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.site-footer {
  position: absolute;
  right: 1.5rem;
  bottom: 1.25rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  pointer-events: auto;
}

.site-footer__text,
.site-footer__license,
.site-footer__support {
  display: none;
}

.site-footer__custom {
  display: inline-flex;
  align-items: center;
}

.site-footer__custom a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.7);
  transition: color 180ms ease;
}

.site-footer__custom a:hover {
  color: rgba(255, 255, 255, 0.88);
}

.mobile-topbar,
.mobile-drawer,
.mobile-backdrop {
  display: none;
}

@media (max-width: 980px) {
  :root {
    --content-width: 100%;
    --post-shell-width: 100%;
  }

  .reading-progress {
    left: 0;
  }

  .site-sidebar {
    display: none;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.82rem 0.95rem;
    background: var(--bg);
    border-bottom: 1px solid rgba(81, 103, 126, 0.1);
  }

  .mobile-topbar__toggle {
    width: 2.45rem;
    height: 2.45rem;
    padding: 0.62rem;
    display: inline-grid;
    align-content: center;
    gap: 0.28rem;
    border: 0;
    border-radius: 50%;
    background: rgba(91, 124, 153, 0.08);
    cursor: pointer;
  }

  .mobile-topbar__toggle span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: var(--accent-strong);
  }

  .mobile-topbar__title {
    font-family: var(--font-sans);
    font-size: 1.24rem;
    color: var(--accent-strong);
    text-align: center;
    letter-spacing: 0;
    text-transform: lowercase;
  }

  .mobile-topbar__avatar img {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    object-fit: cover;
  }

  .mobile-drawer,
  .mobile-backdrop {
    display: block;
  }

  .mobile-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: min(82vw, 20rem);
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 220ms ease, visibility 0s linear 220ms;
  }

  .mobile-drawer__panel {
    position: relative;
    width: 100%;
    height: 100%;
    box-shadow: none;
    transition: box-shadow 220ms ease;
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9;
    background: rgba(12, 16, 20, 0.34);
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  body.drawer-open .mobile-drawer {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  body.drawer-open .mobile-drawer__panel {
    box-shadow: 8px 0 24px -12px rgba(15, 18, 22, 0.32);
  }

  body.drawer-open .mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.drawer-open {
    overflow: hidden;
  }

  .site-main {
    margin-left: 0;
    padding: 1rem 0.95rem 2.8rem;
    min-height: 100vh;
  }

  .site-footer {
    right: 1rem;
    bottom: 1rem;
  }

  .site-footer__custom a {
    font-size: 0.72rem;
  }

  .article-layout--with-toc {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
    gap: 1.15rem;
  }

  .hero__title,
  .page-intro__title,
  .article__title,
  .not-found__title {
    font-size: clamp(1.55rem, 7.4vw, 1.92rem);
  }

  .post-card__title {
    font-size: clamp(1.12rem, 5.8vw, 1.34rem);
    line-height: 1.34;
  }

  .post-card {
    padding: 1.08rem 0 1.18rem;
  }

  .post-card__summary {
    -webkit-line-clamp: 2;
    font-size: 0.88rem;
  }

  .article__content {
    font-size: 0.95rem;
    line-height: 1.9;
  }

  .article__content .code-frame {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0 0.25rem 0.25rem 0;
  }

  .article__content .code-frame__head {
    inset: 0.38rem 0.4rem auto 0.65rem;
    gap: 0.34rem;
  }

  .article__content .code-frame__copy {
    width: 1.55rem;
    height: 1.55rem;
    flex-basis: 1.55rem;
    padding: 0.33rem;
  }

  .post-outline--desktop {
    display: none;
  }

  .post-outline--mobile {
    display: block;
    position: static;
    margin: -0.75rem 0 1.45rem;
    padding: 0;
    border-bottom: 1px solid var(--line);
  }

  .post-outline--mobile[open] {
    padding-bottom: 0.95rem;
  }

  .post-outline__summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.82rem 0;
    color: var(--accent-strong);
    cursor: pointer;
    list-style: none;
  }

  .post-outline__summary::-webkit-details-marker {
    display: none;
  }

  .post-outline__summary span {
    font-family: var(--font-serif);
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .post-outline__summary small {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: nowrap;
  }

  .post-outline__summary::after {
    content: "";
    flex: 0 0 auto;
    width: 0.48rem;
    height: 0.48rem;
    margin-left: auto;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
    transition: transform 160ms ease;
  }

  .post-outline--mobile[open] .post-outline__summary::after {
    transform: translateY(0.12rem) rotate(225deg);
  }

  .post-outline__title {
    margin-bottom: 0.7rem;
    font-size: 0.92rem;
  }

  .post-outline--mobile .post-toc {
    max-height: 12rem;
    padding: 0.15rem 0 0.2rem;
    border-top: 0;
    border-left: 0;
    mask-image: none;
  }

  .post-nav,
  .friend-grid {
    grid-template-columns: 1fr;
  }

  .archive-group {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .archive-group__year {
    padding-top: 0;
    font-size: 0.88rem;
  }

  .archive-entry {
    grid-template-columns: 3.3rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .archive-entry__meta {
    display: none;
  }

  .tax-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.92rem 0;
  }

  .tag-cloud {
    grid-template-columns: 1fr;
  }

  .search-form {
    gap: 0.55rem;
  }

  .search-form__input,
  .search-form__submit {
    padding: 0.72rem 0.78rem;
  }

  .site-footer__support {
    margin-top: 0.38rem;
  }

  .sidebar--mobile .sidebar__content {
    padding-top: 4.25rem;
  }
}

/* d1-blog.css */
.article__eyebrow{color:var(--accent);font-size:.86rem}
.article__content{overflow-wrap:anywhere}
.article__content h2,.article__content h3{margin-top:2em}
.article__content pre{overflow:auto;padding:1rem;border-radius:8px;background:#263341;color:#f4f6f8}
.article__content code{font-family:ui-monospace,SFMono-Regular,monospace;font-size:.9em}
.article__content :not(pre)>code{padding:.15em .35em;border-radius:4px;background:#e9edf0}
.article__content blockquote{margin:1.4em 0;padding:.2em 1em;border-left:3px solid var(--accent-soft);color:var(--text-soft)}

/* d1-theme-light-overlay.css */
:root[data-theme="dark"]{color-scheme:dark;--bg:#15181b;--text:#e4e7ea;--text-soft:#a9b2bc;--line:rgba(220,232,243,.12);--line-strong:rgba(220,232,243,.22);--accent:#a7c5df;--accent-soft:#354554;--accent-strong:#e0ebf4}
html[data-theme="dark"]{min-height:100%;background:#15181b}
[data-theme="dark"] body{position:relative;min-height:100vh;background-color:#15181b;background-image:none;color:var(--text)}
[data-theme="dark"] body::before{position:fixed;inset:0;z-index:0;background-image:linear-gradient(115deg,rgba(8,10,16,.26),rgba(16,14,22,.20)),var(--site-background,url('/images/background.png'));background-size:cover,cover;background-position:center,center;background-repeat:no-repeat,no-repeat;content:"";pointer-events:none}
[data-theme="dark"] .mobile-topbar{background:#15181b;border-color:var(--line)}
[data-theme="dark"] .search-form__input{background:rgba(255,255,255,.06);color:var(--text)}
[data-theme="dark"] .search-form__input:focus,[data-theme="dark"] .search-form__submit:hover,[data-theme="dark"] .search-form__submit:focus-visible{background:rgba(255,255,255,.1)}
[data-theme="dark"] .article__content blockquote{background:rgba(255,255,255,.045)}
[data-theme="dark"] .article__content :not(pre)>code{background:rgba(255,255,255,.09);color:#e7edf2}
[data-theme="dark"] .article__content .code-frame{background:rgba(255,255,255,.055)}
[data-theme="dark"] .article__content .code-frame__copy:hover,[data-theme="dark"] .article__content .code-frame__copy:focus-visible,[data-theme="dark"] .article__content .code-frame__copy.is-copied{background:rgba(255,255,255,.1)}
[data-theme="dark"] .article__content pre{color:#d7e0e8}
[data-theme="dark"] .article__content pre .token.comment,[data-theme="dark"] .article__content pre .token.prolog,[data-theme="dark"] .article__content pre .token.doctype,[data-theme="dark"] .article__content pre .token.cdata{color:#9ba9a8}
[data-theme="dark"] .article__content pre .token.punctuation,[data-theme="dark"] .article__content pre .token.operator{color:#bcc8d3}
[data-theme="dark"] .article__content pre .token.property,[data-theme="dark"] .article__content pre .token.tag,[data-theme="dark"] .article__content pre .token.boolean,[data-theme="dark"] .article__content pre .token.number,[data-theme="dark"] .article__content pre .token.constant,[data-theme="dark"] .article__content pre .token.symbol,[data-theme="dark"] .article__content pre .token.deleted{color:#e6ad91}
[data-theme="dark"] .article__content pre .token.selector,[data-theme="dark"] .article__content pre .token.attr-name,[data-theme="dark"] .article__content pre .token.string,[data-theme="dark"] .article__content pre .token.char,[data-theme="dark"] .article__content pre .token.builtin,[data-theme="dark"] .article__content pre .token.inserted{color:#c3d69d}
[data-theme="dark"] .article__content pre .token.atrule,[data-theme="dark"] .article__content pre .token.attr-value,[data-theme="dark"] .article__content pre .token.keyword{color:#c9b9ec}
[data-theme="dark"] .article__content pre .token.function,[data-theme="dark"] .article__content pre .token.class-name{color:#9bd0dc}
[data-theme="dark"] .article__content pre .token.regex,[data-theme="dark"] .article__content pre .token.important,[data-theme="dark"] .article__content pre .token.variable{color:#edc58a}
[data-theme="dark"] .article__content pre ::selection{background:rgba(167,197,223,.35)}

/* d1-surface-light-overlay.css */
[data-theme="dark"] .sidebar{background:rgba(8,11,16,.2);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-right:1px solid rgba(230,240,248,.1)}
[data-theme="dark"] .site-main{min-height:100vh;background-color:rgba(12,16,21,.28)}
[data-theme="dark"] .post-list{display:grid;gap:1rem}
[data-theme="dark"] .post-card{margin:0;padding:1.25rem 1.4rem;border:1px solid rgba(230,240,248,.18);border-radius:12px;background:rgba(15,20,26,.58);box-shadow:0 10px 28px rgba(0,0,0,.16);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:background .2s ease,border-color .2s ease,transform .2s ease}
[data-theme="dark"] .post-card:hover{transform:translateY(-2px);border-color:rgba(230,240,248,.3);background:rgba(18,24,31,.72)}
[data-theme="dark"] .view-home .post-card:first-child{margin:0}
[data-theme="dark"] .article{padding:clamp(1.2rem,3vw,2rem);border:1px solid rgba(230,240,248,.18);border-radius:12px;background:rgba(15,20,26,.62);box-shadow:0 10px 28px rgba(0,0,0,.16);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
[data-theme="dark"] .sidebar__overlay{background:linear-gradient(180deg,rgba(8,11,16,.08),rgba(8,11,16,.16))}

/* d1-mobile-nav-light-overlay.css */
@media(max-width:980px){
  html{max-width:100%;overflow-x:hidden}
  .mobile-topbar{position:sticky;top:0;z-index:40;display:grid;grid-template-columns:2.4rem minmax(0,1fr) 2.4rem;align-items:center;gap:.65rem;height:3.85rem;padding:.4rem .85rem;background:rgba(15,18,23,.74);border-bottom:1px solid rgba(230,240,248,.12);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .mobile-topbar__toggle{display:flex;width:2.3rem;height:2.3rem;flex-direction:column;justify-content:center;gap:.28rem;padding:.58rem;border:1px solid rgba(230,240,248,.12);border-radius:50%;background:rgba(255,255,255,.08);cursor:pointer}
  .mobile-topbar__toggle span{display:block;width:100%;height:2px;border-radius:2px;background:#e4e7ea}
  .mobile-topbar__title{overflow:hidden;color:#e4e7ea;font-family:var(--font-sans);font-size:1rem;font-weight:500;text-align:center;text-overflow:ellipsis;white-space:nowrap}
  .mobile-topbar__avatar{display:block;width:2.3rem;height:2.3rem;overflow:hidden;border:1px solid rgba(230,240,248,.2);border-radius:50%}
  .mobile-topbar__avatar img{width:100%;height:100%;object-fit:cover}
  .mobile-menu-scrim{position:fixed;inset:0;z-index:45;display:block;width:100%;height:100%;padding:0;border:0;background:rgba(7,9,12,.48);opacity:0;pointer-events:none;transition:opacity .24s ease}
  [data-theme="dark"] .site-sidebar{position:fixed;inset:0 auto 0 0;z-index:50;display:block;width:min(82vw,21rem);height:100vh;height:100dvh;margin:0;transform:translateX(-105%);visibility:hidden;pointer-events:none;transition:transform .26s cubic-bezier(.2,.75,.25,1),visibility 0s linear .26s}
  [data-theme="dark"] .sidebar{height:100%;overflow:hidden}
  [data-theme="dark"] .sidebar__content{height:100%;padding:2.2rem 1.7rem 1.8rem;gap:1rem}
  [data-theme="dark"] .sidebar__brand{display:grid;gap:.85rem;justify-items:start}
  [data-theme="dark"] .sidebar__avatar{width:4.6rem;height:4.6rem;border-width:2px}
  [data-theme="dark"] .sidebar__title{font-size:clamp(1.95rem,2.3vw,2.4rem);line-height:.98}
  [data-theme="dark"] .sidebar__subtitle{display:block;margin:.55rem 0 0;font-size:.92rem}
  [data-theme="dark"] .sidebar__description{display:block;margin:0;font-size:.84rem}
  [data-theme="dark"] .sidebar__nav{display:grid;align-items:start;gap:.6rem;margin:.95rem 0 0;overflow:visible}
  [data-theme="dark"] .sidebar__nav a{width:fit-content;padding:0;border:0;border-radius:0;background:transparent;font-size:.9rem;transform:none}
  [data-theme="dark"] .sidebar__nav a:hover,[data-theme="dark"] .sidebar__nav a.is-active{transform:translateX(4px)}
  [data-theme="dark"] .sidebar__social{display:grid;gap:.35rem;margin-top:auto;font-size:.9rem}
  body.mobile-menu-open{overflow:hidden}
  html[data-theme="dark"] body.mobile-menu-open .site-sidebar{transform:translateX(0);visibility:visible;pointer-events:auto;transition-delay:0s}
  body.mobile-menu-open .mobile-menu-scrim{opacity:1;pointer-events:auto}
  [data-theme="dark"] .site-main{min-height:calc(100vh - 3.85rem);padding:1rem .9rem 2.5rem;background-color:rgba(12,16,21,.28);background-image:none}
  [data-theme="dark"] .post-card{padding:1rem .95rem}
  [data-theme="dark"] .article{padding:1.05rem .95rem}
  [data-theme="dark"] .tax-list{border:0}
  [data-theme="dark"] .tax-row{margin:0;padding:.85rem 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
  [data-theme="dark"] .article__content pre,[data-theme="dark"] .article__content .code-frame{max-width:calc(100vw - 2.6rem);overflow:auto}
}
@media(min-width:981px){.mobile-topbar,.mobile-menu-scrim{display:none}}

/* d1-visual-refinement-site.css */
/* Site visual refinement: keeps the configured artwork and existing navigation behavior. */
:root[data-theme="dark"] {
  --content-width: 74rem;
  --post-shell-width: calc(74rem + var(--toc-width) + 3rem);
  --font-sans: "Chiron GoRound TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
}

[data-theme="dark"] body {
  background-image: none;
}

/* A slim highlighted edge gives the sidebar a cleaner separation. */
[data-theme="dark"] .sidebar {
  position: relative;
  background: rgba(8, 11, 16, .25);
  border-right: 1px solid rgba(235, 240, 248, .14);
  box-shadow: 8px 0 28px rgba(4, 7, 12, .14), inset -1px 0 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(16px) saturate(112%);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
}

[data-theme="dark"] .sidebar::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 3%, rgba(255, 255, 255, .22) 30%, rgba(255, 255, 255, .10) 72%, transparent 98%);
  content: "";
  pointer-events: none;
}

/* Keep one shared page background visible through the content column. */
[data-theme="dark"] .site-main {
  background-color: rgba(12, 13, 20, .16);
}

/* Center the list, then use the available width for a calm two-column layout. */
[data-theme="dark"] .post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  gap: 1.15rem;
}

/* Black liquid-glass cards, with depth supplied by light and shadow instead of borders. */
[data-theme="dark"] .post-card,
[data-theme="dark"] .article {
  border: 0;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 42%), rgba(8, 10, 14, .72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 -1px 0 rgba(255, 255, 255, .025),
    0 18px 44px rgba(3, 5, 9, .30);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

[data-theme="dark"] .post-card {
  position: relative;
  padding: 1.35rem 1.5rem;
  transition: transform 240ms cubic-bezier(.2, .75, .25, 1), background 240ms ease, box-shadow 240ms ease;
}

[data-theme="dark"] .post-card:hover {
  transform: translateY(-4px) scale(1.008);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), transparent 42%), rgba(10, 12, 17, .80);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(255, 255, 255, .035),
    0 25px 58px rgba(2, 4, 8, .42),
    0 0 28px rgba(255, 255, 255, .035);
}

[data-theme="dark"] .post-card__title,
[data-theme="dark"] .post-card__title a {
  color: var(--text);
  line-height: 1.4;
}

[data-theme="dark"] .post-card__meta,
[data-theme="dark"] .post-card__summary {
  color: var(--text-soft);
  line-height: 1.8;
}

[data-theme="dark"] .article {
  line-height: 1.85;
}

[data-theme="dark"] .article__content {
  max-width: 76ch;
  line-height: 1.9;
}

[data-theme="dark"] :where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  [data-theme="dark"] .post-list {
    grid-template-columns: 1fr;
    gap: .9rem;
  }

  [data-theme="dark"] .post-card {
    padding: 1.05rem 1rem;
    border-radius: 14px;
  }

  [data-theme="dark"] .post-card:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .post-card,
  [data-theme="dark"] .sidebar__nav a,
  [data-theme="dark"] .sidebar__social a {
    transition: none;
  }

  [data-theme="dark"] .post-card:hover {
    transform: none;
  }
}

/* d1-site-pages-v15.css */
/* Site-wide font coverage and archive/search refinements. */
:root[data-theme="dark"] {
  --font-sans: "Chiron GoRound TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  --font-serif: "Chiron GoRound TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
}

[data-theme="dark"] body {
  font-family: var(--font-sans);
}

/* Search controls: dark glass, legible over the shared artwork. */
[data-theme="dark"] .search-form__input {
  border-color: rgba(238, 242, 248, .18);
  background: rgba(5, 8, 13, .72);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

[data-theme="dark"] .search-form__input::placeholder {
  color: rgba(228, 231, 234, .58);
}

[data-theme="dark"] .search-form__input:focus {
  border-color: rgba(255, 255, 255, .32);
  background: rgba(4, 7, 12, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 3px rgba(255, 255, 255, .08), 0 12px 28px rgba(0, 0, 0, .22);
}

[data-theme="dark"] .search-form__submit {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(5, 8, 13, .72);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .2);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

[data-theme="dark"] .search-form__submit:hover,
[data-theme="dark"] .search-form__submit:focus-visible {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(18, 21, 28, .88);
  color: #fff;
}

/* Archive as a year/month timeline, with each month's posts still using blog cards. */
[data-theme="dark"] .archive-timeline {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

[data-theme="dark"] .archive-year {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

[data-theme="dark"] .archive-year__label {
  margin: 0;
  padding-top: .05rem;
  color: var(--accent-strong);
  font-size: 1.35rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .archive-year__months {
  display: grid;
  gap: 1.45rem;
  padding-left: 1.4rem;
  border-left: 2px solid rgba(255, 255, 255, .62);
  box-shadow: -1px 0 8px rgba(255, 255, 255, .08);
}

[data-theme="dark"] .archive-month {
  position: relative;
  min-width: 0;
}

[data-theme="dark"] .archive-month::before {
  position: absolute;
  top: .48rem;
  left: calc(-1.4rem - 5px);
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, .96);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .08), 0 0 12px rgba(255, 255, 255, .32);
  content: "";
}

[data-theme="dark"] .archive-month__label {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin: 0 0 .65rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

[data-theme="dark"] .archive-month__label span {
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 400;
}

[data-theme="dark"] .archive-month .post-list {
  width: 100%;
}

@media (max-width: 700px) {
  [data-theme="dark"] .archive-year {
    grid-template-columns: 3.4rem minmax(0, 1fr);
    gap: .75rem;
  }

  [data-theme="dark"] .archive-year__months {
    padding-left: 1rem;
  }

  [data-theme="dark"] .archive-month::before {
    left: calc(-1rem - 5px);
  }
}


/* Article readability and a clear route back to the home page. */
[data-theme="dark"] .article__content {
  font-size: clamp(1.08rem, 1rem + .22vw, 1.2rem);
  line-height: 1.95;
}

[data-theme="dark"] .article__home-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 1.4rem;
  padding: .5rem .75rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: .65rem;
  background: rgba(255, 255, 255, .055);
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

[data-theme="dark"] .article__home-link:hover,
[data-theme="dark"] .article__home-link:focus-visible {
  transform: translateX(-2px);
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

/* Community comments and email-code registration. */
[data-theme="dark"] .community{width:min(100%,var(--content-width));margin:1.5rem auto 0;padding:clamp(1.1rem,3vw,1.7rem);border:1px solid rgba(255,255,255,.12);border-radius:1rem;background:rgba(12,15,20,.72);box-shadow:0 14px 38px rgba(0,0,0,.2);backdrop-filter:blur(16px) saturate(120%);-webkit-backdrop-filter:blur(16px) saturate(120%)}
[data-theme="dark"] .community__header{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;border-bottom:1px solid rgba(255,255,255,.1);padding-bottom:.7rem}
[data-theme="dark"] .community__header h2{margin:0;color:var(--text);font-size:1.35rem}
[data-theme="dark"] .community__header span{color:var(--text-soft);font-size:.9rem}
[data-theme="dark"] .community-status{min-height:1.4em;margin:.7rem 0;color:var(--accent-soft);font-size:.9rem}
[data-theme="dark"] .community-status.is-error{color:#ffaaa5}
[data-theme="dark"] .community-comments{display:grid;gap:1rem;margin:1rem 0 1.3rem}
[data-theme="dark"] .community-empty{color:var(--text-soft);margin:.2rem 0}
[data-theme="dark"] .community-comment{display:grid;grid-template-columns:2.6rem minmax(0,1fr);gap:.8rem;padding:.9rem 0;border-bottom:1px solid rgba(255,255,255,.08)}
[data-theme="dark"] .community-comment__avatar{width:2.6rem;height:2.6rem;object-fit:cover;border-radius:50%;background:rgba(255,255,255,.08)}
[data-theme="dark"] .community-comment__meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:.35rem .65rem}
[data-theme="dark"] .community-comment__meta strong{color:var(--text)}
[data-theme="dark"] .community-comment__meta span,[data-theme="dark"] .community-comment__meta time{color:var(--text-soft);font-size:.8rem}
[data-theme="dark"] .community-comment__meta time{margin-left:auto}
[data-theme="dark"] .community-comment__body{margin:.45rem 0 0;color:var(--text);line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
[data-theme="dark"] .community-login,[data-theme="dark"] .community-profile{padding:1rem;border:1px solid rgba(255,255,255,.1);border-radius:.8rem;background:rgba(255,255,255,.035)}
[data-theme="dark"] .community-login h3{margin:0 0 .25rem;color:var(--text);font-size:1.05rem}
[data-theme="dark"] .community-login p{color:var(--text-soft);font-size:.9rem}
[data-theme="dark"] .community-login form,[data-theme="dark"] .community-profile{display:grid;gap:.85rem}
[data-theme="dark"] .community-login label,[data-theme="dark"] .community-profile>label,[data-theme="dark"] .community-compose label{display:grid;gap:.35rem;color:var(--text-soft);font-size:.9rem}
[data-theme="dark"] .community-login small{font-weight:400;opacity:.75}
[data-theme="dark"] .community input:not([type="file"]),[data-theme="dark"] .community textarea{width:100%;padding:.7rem .8rem;border:1px solid rgba(255,255,255,.14);border-radius:.55rem;background:rgba(0,0,0,.3);color:var(--text);font:inherit}
[data-theme="dark"] .community textarea{resize:vertical;line-height:1.7}
[data-theme="dark"] .community .community-button--quiet{background:transparent;color:var(--text-soft)}
[data-theme="dark"] .community-actions{display:flex;flex-wrap:wrap;gap:.6rem}
[data-theme="dark"] .community-profile__avatar{display:flex;align-items:center;gap:.8rem;color:var(--text-soft)}
[data-theme="dark"] .community-profile__avatar img{width:3.5rem;height:3.5rem;border-radius:50%;object-fit:cover}
[data-theme="dark"] .community-profile__avatar label{font-size:.88rem;cursor:pointer}
[data-theme="dark"] .community-profile__avatar input{display:block;max-width:100%;margin-top:.25rem;font-size:.8rem}
[data-theme="dark"] .community-compose{display:grid;gap:.7rem;margin-top:1rem}
[data-theme="dark"] .community [hidden]{display:none!important}
@media(max-width:600px){[data-theme="dark"] .community{padding:1rem .9rem}[data-theme="dark"] .community-comment__meta time{width:100%;margin-left:0}}

/* Account entry and standalone profile page. */
[data-theme="dark"] .community-account-link,[data-theme="dark"] .mobile-topbar__account{display:inline-flex;align-items:center;justify-content:center;min-height:2.45rem;padding:.5rem .85rem;border:1px solid rgba(255,255,255,.17);border-radius:999px;background:rgba(12,15,20,.76);box-shadow:0 8px 24px rgba(0,0,0,.18);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:var(--text);font-size:.88rem;text-decoration:none;transition:background .18s ease,border-color .18s ease,transform .18s ease}
[data-theme="dark"] .community-account-link{position:fixed;top:1.1rem;right:1.35rem;z-index:35}
[data-theme="dark"] .community-account-link:hover,[data-theme="dark"] .mobile-topbar__account:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.32);background:rgba(20,24,31,.92);color:#fff}
[data-theme="dark"] .mobile-topbar__account{display:none}
[data-theme="dark"] .account-page{width:min(100%,38rem);margin:clamp(1rem,5vh,3rem) auto}
[data-theme="dark"] .account-page__header{margin-bottom:1.2rem}
[data-theme="dark"] .account-page__header .page-intro__title{margin:.2rem 0 .5rem}
[data-theme="dark"] .account-page__header>p:last-child{color:var(--text-soft)}
[data-theme="dark"] .account-status{min-height:1.5em;color:var(--accent-soft)}
[data-theme="dark"] .account-status.is-error{color:#ffaaa5}
[data-theme="dark"] .account-panel{padding:clamp(1.15rem,3vw,1.7rem);border:1px solid rgba(255,255,255,.14);border-radius:1rem;background:rgba(12,15,20,.76);box-shadow:0 14px 38px rgba(0,0,0,.22);backdrop-filter:blur(16px) saturate(120%);-webkit-backdrop-filter:blur(16px) saturate(120%)}
[data-theme="dark"] .account-panel h2{margin:0;color:var(--text);font-size:1.2rem}
[data-theme="dark"] .account-panel>p{color:var(--text-soft);line-height:1.7}
[data-theme="dark"] .account-panel form{display:grid;gap:.9rem}
[data-theme="dark"] .account-panel label{display:grid;gap:.35rem;color:var(--text-soft);font-size:.9rem}
[data-theme="dark"] .account-panel small{font-weight:400;opacity:.75}
[data-theme="dark"] .account-panel input:not([type="file"]){width:100%;padding:.72rem .82rem;border:1px solid rgba(255,255,255,.15);border-radius:.58rem;background:rgba(0,0,0,.3);color:var(--text);font:inherit}
[data-theme="dark"] .account-actions{display:flex;flex-wrap:wrap;gap:.6rem}
[data-theme="dark"] .account-avatar{display:flex;align-items:center;gap:.9rem;margin:.8rem 0;color:var(--text-soft)}
[data-theme="dark"] .account-avatar img{width:4rem;height:4rem;object-fit:cover;border-radius:50%;background:rgba(255,255,255,.08)}
[data-theme="dark"] .account-avatar label{cursor:pointer}
[data-theme="dark"] .account-avatar input{display:block;max-width:100%;margin-top:.35rem;font-size:.8rem}
[data-theme="dark"] .account-panel [hidden]{display:none!important}
[data-theme="dark"] .account-panel[hidden]{display:none!important}
@media(max-width:980px){
  [data-theme="dark"] .community-account-link{display:none}
  [data-theme="dark"] .mobile-topbar{grid-template-columns:2.4rem minmax(0,1fr) auto}
  [data-theme="dark"] .mobile-topbar__account{display:inline-flex;min-width:3.2rem;min-height:2.2rem;padding:.42rem .7rem;font-size:.82rem}
}

/* Account mode tabs and animated login/register/verification transitions. */
[data-theme="dark"] .account-auth-stage { display:grid; }
[data-theme="dark"] .account-auth-view { grid-area:1/1; min-width:0; opacity:1; transform:translateX(0) scale(1); filter:blur(0); transition:opacity .32s ease,transform .38s cubic-bezier(.2,.75,.25,1),filter .32s ease; }
[data-theme="dark"] .account-auth-view[aria-hidden="true"] { opacity:0; transform:translateX(18px) scale(.985); filter:blur(3px); pointer-events:none; }
[data-theme="dark"] .account-mode-forms { display:grid; }
[data-theme="dark"] .account-mode-forms>[data-account-form] { grid-area:1/1; min-width:0; opacity:1; transform:translateX(0); transition:opacity .3s ease,transform .38s cubic-bezier(.2,.75,.25,1); }
[data-theme="dark"] .account-mode-forms>[data-account-form][aria-hidden="true"] { opacity:0; transform:translateX(16px); pointer-events:none; }
[data-theme="dark"] .account-mode-switch { position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;width:11.8rem;box-sizing:border-box;margin-bottom:1.1rem;padding:.25rem;border:1px solid rgba(255,255,255,.13);border-radius:999px;background:transparent;box-shadow:none; }
[data-theme="dark"] .account-mode-switch__thumb { position:absolute;z-index:0;top:.25rem;bottom:.25rem;left:.25rem;width:calc(50% - .25rem);border:1px solid rgba(255,255,255,.2);border-radius:999px;background:linear-gradient(180deg,rgba(255,255,255,.2),rgba(255,255,255,.1));box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 3px 10px rgba(0,0,0,.2);transition:transform .38s cubic-bezier(.22,.8,.25,1),background .25s ease,box-shadow .25s ease;pointer-events:none; }
[data-theme="dark"] .account-mode-switch[data-account-mode-current="register"] .account-mode-switch__thumb { transform:translateX(100%); }
[data-theme="dark"] .account-panel .account-mode-switch__button { position:relative;z-index:1;width:100%;min-width:0;box-sizing:border-box;padding:.52rem .7rem;border:1px solid transparent;border-radius:999px;background:transparent;box-shadow:none;color:var(--text-soft);transition:color .2s ease; }
[data-theme="dark"] .account-panel .account-mode-switch__button.is-active { border-color:transparent;background:transparent;box-shadow:none;color:#fff; }
[data-theme="dark"] .account-panel .account-mode-switch__button:hover:not(:disabled) { background:transparent;color:#fff; }
[data-theme="dark"] .account-panel .account-mode-switch__button.is-active:hover { background:transparent; }

@media (prefers-reduced-motion:reduce) {
  [data-theme="dark"] .account-auth-view,
  [data-theme="dark"] .account-mode-forms>[data-account-form],
  [data-theme="dark"] .account-mode-switch__thumb { transition:none; }
}

/* Keep the animated form layers content-sized instead of stretching each row. */
[data-theme="dark"] .account-auth-stage,
[data-theme="dark"] .account-auth-view,
[data-theme="dark"] .account-mode-forms,
[data-theme="dark"] .account-panel form {
  align-content: start;
}
[data-theme="dark"] .account-mode-forms>[data-account-form] { align-self:start; }
[data-theme="dark"] .account-panel form > * { min-height:0; }
[data-theme="dark"] .account-panel form > button { min-height:2.65rem; height:auto; align-self:start; border-radius:999px; }

/* Profile page: identity row followed by a distinct avatar replacement area. */
[data-theme="dark"] .account-profile { display:grid; gap:1.45rem; }
[data-theme="dark"] .account-profile[hidden] { display:none!important; }
[data-theme="dark"] .account-profile__header h2 { margin:0; }
[data-theme="dark"] .account-profile__identity,
[data-theme="dark"] .account-profile__avatar-edit {
  display:grid;
  grid-template-columns:minmax(6rem,8rem) minmax(0,1fr);
  align-items:center;
  gap:1.2rem;
}
[data-theme="dark"] .account-profile__avatar {
  display:block;
  width:8rem;
  aspect-ratio:1;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.14);
  border-radius:50%;
  background:rgba(255,255,255,.06);
}
[data-theme="dark"] .account-profile__identity-fields { display:grid; gap:.55rem; min-width:0; }
[data-theme="dark"] .account-profile__identity-fields label { display:grid; gap:.45rem; }
[data-theme="dark"] .account-profile__handle { margin:0 .65rem; color:var(--text-soft); font-size:.95rem; }
[data-theme="dark"] .account-profile__avatar-edit { align-items:center; }
[data-theme="dark"] .account-profile__upload-tile {
  position:relative;
  overflow:hidden;
  display:grid;
  place-items:center;
  width:8rem;
  aspect-ratio:1;
  border:1px dashed rgba(255,255,255,.2);
  border-radius:.8rem;
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.55);
  font-size:.78rem;
  text-align:center;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
[data-theme="dark"] .account-profile__upload-tile:hover { border-color:rgba(255,255,255,.42); background:rgba(255,255,255,.075); }
[data-theme="dark"] .account-profile__upload-tile:focus-within { outline:2px solid rgba(255,255,255,.55); outline-offset:3px; box-shadow:0 0 18px rgba(255,255,255,.12); }
[data-theme="dark"] .account-profile__upload-tile input[type="file"] { position:absolute; inset:0; z-index:2; width:100%; height:100%; opacity:0; cursor:pointer; }
[data-theme="dark"] .account-profile__upload-tile img,
[data-theme="dark"] .account-profile__upload-tile span { pointer-events:none; }
[data-theme="dark"] .account-profile__upload-copy { display:grid; justify-items:start; gap:.6rem; }
[data-theme="dark"] .account-profile__upload-copy strong { color:var(--text); font-weight:600; }
[data-theme="dark"] .account-profile__upload-copy small { color:var(--text-soft); }
[data-theme="dark"] .account-profile__upload-button {
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  position:relative;
  min-height:2.65rem;
  padding:.55rem 1.1rem;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:rgba(255,255,255,.1);
  color:var(--text)!important;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
[data-theme="dark"] .account-profile__upload-button:hover { border-color:rgba(255,255,255,.32); background:rgba(255,255,255,.17); transform:translateY(-1px); }
[data-theme="dark"] .account-profile__upload-button input[type="file"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
[data-theme="dark"] .account-profile__actions { justify-content:flex-end; padding-top:.25rem; }
@media(max-width:600px) {
  [data-theme="dark"] .account-profile__identity,
  [data-theme="dark"] .account-profile__avatar-edit { grid-template-columns:5.5rem minmax(0,1fr); gap:.85rem; }
  [data-theme="dark"] .account-profile__avatar,
  [data-theme="dark"] .account-profile__upload-tile { width:5.5rem; }
}
[data-theme="dark"] .account-profile__upload-tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
[data-theme="dark"] .account-profile__upload-tile span[hidden] { display:none; }
[data-theme="dark"] .article__content img[data-size="small"]{width:min(100%,30rem)}
[data-theme="dark"] .article__content img[data-size="medium"]{width:min(100%,45rem)}
[data-theme="dark"] .article__content img[data-size="full"]{width:100%}
.content-pagination{display:flex;align-items:center;justify-content:center;gap:1rem;margin:2rem auto 0;color:var(--text-soft);font-size:.92rem}
.content-pagination a,.content-pagination span{padding:.55rem .9rem;border-radius:.8rem}
.content-pagination a{color:var(--text);background:rgba(255,255,255,.08);text-decoration:none;transition:background .18s ease,transform .18s ease}
.content-pagination a:hover{background:rgba(255,255,255,.15);transform:translateY(-1px)}
.content-pagination span[aria-disabled="true"]{opacity:.45}
@media(max-width:520px){.content-pagination{gap:.35rem;font-size:.82rem}.content-pagination a,.content-pagination span{padding:.5rem .6rem}}

/* d1-archive-timeline-v1.css */
/* Center archive dots on the timeline's border despite the content inset. */
[data-theme="dark"] .archive-month::before {
  left: calc(-1.4rem - 6px);
}

@media (max-width: 700px) {
  [data-theme="dark"] .archive-month::before {
    left: calc(-1rem - 6px);
  }
}

/* d1-account-switch-v2.css */
/* The sliding selector sits above the track and below transparent tab labels. */
[data-theme="dark"] .account-mode-switch__thumb {
  z-index: 2;
}

[data-theme="dark"] .account-panel .account-mode-switch .account-mode-switch__button,
[data-theme="dark"] .account-panel .account-mode-switch .account-mode-switch__button:hover,
[data-theme="dark"] .account-panel .account-mode-switch .account-mode-switch__button:active,
[data-theme="dark"] .account-panel .account-mode-switch .account-mode-switch__button.is-active {
  position: relative;
  z-index: 3;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
}

/* d1-sidebar-nav-sizing-v1.css */
/* Give sidebar navigation labels a little more presence within the panel. */
[data-theme="dark"] .sidebar__nav {
  gap: .65rem;
}

[data-theme="dark"] .sidebar__nav a {
  font-size: 1rem;
  line-height: 1.45;
}

.sidebar__social a[data-admin-link][hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  [data-theme="dark"] .sidebar__nav {
    gap: .65rem;
  }

  [data-theme="dark"] .sidebar__nav a {
    font-size: 1rem;
    line-height: 1.45;
  }
}

/* d1-sidebar-admin-visibility-v1.css */
.sidebar__social a[data-admin-link][hidden] {
  display: none !important;
}

/* d1-sidebar-glass-nav-v1.css */
/* A sliding glass capsule makes the current sidebar destination unmistakable. */
[data-theme="dark"] .sidebar__nav {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .38rem;
  width: 100%;
  isolation: isolate;
}

[data-theme="dark"] .sidebar__nav-indicator {
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  height: var(--sidebar-indicator-height, 2.8rem);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .035) 56%, rgba(255, 255, 255, .075)), rgba(13, 17, 23, .2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    inset 1px 0 0 rgba(255, 255, 255, .075),
    inset -1px 0 0 rgba(255, 255, 255, .055),
    inset 0 -1px 0 rgba(255, 255, 255, .09),
    inset 0 -10px 22px rgba(255, 255, 255, .025),
    0 10px 26px rgba(0, 0, 0, .24);
  backdrop-filter: blur(24px) saturate(175%);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, var(--sidebar-indicator-y, 0), 0);
  transition: none;
}

[data-theme="dark"] .sidebar__nav.indicator-ready .sidebar__nav-indicator {
  transition: transform 460ms cubic-bezier(.22, 1, .36, 1), height 220ms ease, opacity 160ms ease, background 220ms ease, box-shadow 220ms ease;
}

[data-theme="dark"] .sidebar__nav-indicator::before {
  position: absolute;
  content: "";
  pointer-events: none;
}

[data-theme="dark"] .sidebar__nav-indicator::before {
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .045) 42%, transparent 100%);
}

[data-theme="dark"] .sidebar__nav-indicator::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, .08), transparent 28%, transparent 76%, rgba(255, 255, 255, .045));
  content: "";
  pointer-events: none;
}

[data-theme="dark"] .sidebar__nav.has-indicator .sidebar__nav-indicator { opacity: 1; }

[data-theme="dark"] .sidebar__nav a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.8rem;
  padding: .62rem .9rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(255, 255, 255, .72);
  font-size: 1rem;
  line-height: 1.45;
  text-decoration: none;
  transform: none;
  transition: color 180ms ease, text-shadow 180ms ease;
}

[data-theme="dark"] .sidebar__nav-icon {
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: .8rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .78;
  transition: opacity 180ms ease, filter 180ms ease;
}

[data-theme="dark"] .sidebar__nav a:hover,
[data-theme="dark"] .sidebar__nav a:focus-visible,
[data-theme="dark"] .sidebar__nav a.is-active {
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 255, 255, .22);
  transform: none;
}

[data-theme="dark"] .sidebar__nav a:hover .sidebar__nav-icon,
[data-theme="dark"] .sidebar__nav a:focus-visible .sidebar__nav-icon,
[data-theme="dark"] .sidebar__nav a.is-active .sidebar__nav-icon {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .32));
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .sidebar__nav-indicator,
  [data-theme="dark"] .sidebar__nav a { transition: none; }
}

/* d1-home-dashboard-v1.css */
/* Home dashboard mosaic: profile, listening status, recent posts and a gallery pick. */
[data-theme="dark"] .home-dashboard {
  width: min(100%, 78rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(3.1rem, auto);
  gap: clamp(.9rem, 2vw, 1.5rem);
  align-items: stretch;
}

[data-theme="dark"] .site-main--home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: clamp(2rem, 5vh, 4rem);
}

[data-theme="dark"] .home-profile-card,
[data-theme="dark"] .home-lastfm-card,
[data-theme="dark"] .home-post-card,
[data-theme="dark"] .home-empty-card,
[data-theme="dark"] .home-random-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 1.45rem;
  background: rgba(14, 18, 24, .68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 18px 42px rgba(0, 0, 0, .24);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

[data-theme="dark"] .home-profile-card {
  grid-column: 1 / span 8;
  grid-row: 1 / span 3;
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2rem);
  padding: clamp(1.15rem, 3vw, 2rem);
}

[data-theme="dark"] .home-profile-card__avatar {
  flex: 0 0 clamp(7rem, 13vw, 10rem);
  width: clamp(7rem, 13vw, 10rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .3);
}

[data-theme="dark"] .home-profile-card__copy { min-width: 0; }
[data-theme="dark"] .home-dashboard__eyebrow {
  display: block;
  margin: 0 0 .55rem;
  color: rgba(235, 241, 249, .62);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}
[data-theme="dark"] .home-profile-card h1 {
  margin: 0;
  color: #f3f5f8;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.2;
  overflow-wrap: normal;
}
[data-theme="dark"] .home-profile-card__copy > p:last-child {
  margin: .55rem 0 0;
  color: rgba(232, 236, 242, .78);
  font-size: clamp(.92rem, 1.4vw, 1.05rem);
  line-height: 1.7;
}

[data-theme="dark"] .home-lastfm-card {
  position: relative;
  isolation: isolate;
  grid-column: 9 / span 4;
  grid-row: 1 / span 3;
  display: flex;
  align-items: end;
  color: #fff;
  text-decoration: none;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
[data-theme="dark"] .home-lastfm-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 24px 54px rgba(0, 0, 0, .36);
}
[data-theme="dark"] .home-lastfm-card__cover,
[data-theme="dark"] .home-lastfm-card__shade {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}
[data-theme="dark"] .home-lastfm-card__cover { object-fit: cover; }
[data-theme="dark"] .home-lastfm-card__shade {
  background: linear-gradient(180deg, rgba(8, 10, 14, .04) 8%, rgba(8, 10, 14, .38) 46%, rgba(8, 10, 14, .88) 100%);
}
[data-theme="dark"] .home-lastfm-card__info {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  gap: .28rem;
  padding: clamp(1rem, 2vw, 1.45rem);
}
[data-theme="dark"] .home-lastfm-card__info strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
[data-theme="dark"] .home-lastfm-card__info [data-home-lastfm-details] {
  overflow: hidden;
  color: rgba(255, 255, 255, .78);
  font-size: .86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="dark"] .home-dashboard__mosaic { display: contents; }
[data-theme="dark"] .home-post-card,
[data-theme="dark"] .home-empty-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.3vw, 1.8rem);
  border: 0;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 42%), rgba(8, 10, 14, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(255, 255, 255, .025), 0 18px 44px rgba(3, 5, 9, .3);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  transition: transform 240ms cubic-bezier(.2, .75, .25, 1), background 240ms ease, box-shadow 240ms ease;
}
[data-theme="dark"] .home-post-card:hover {
  transform: translateY(-4px) scale(1.008);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), transparent 42%), rgba(10, 12, 17, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(255, 255, 255, .035), 0 25px 58px rgba(2, 4, 8, .42), 0 0 28px rgba(255, 255, 255, .035);
}
[data-theme="dark"] .home-post-card--1 { grid-column: 1 / span 3; grid-row: 4 / 11; }
[data-theme="dark"] .home-post-card--2 { grid-column: 4 / span 9; grid-row: 4 / span 4; }
[data-theme="dark"] .home-post-card--3 { grid-column: 4 / span 6; grid-row: 8 / span 3; }
[data-theme="dark"] .home-post-card__eyebrow {
  margin: 0 0 .7rem;
  color: var(--text-soft);
  font-size: .84rem;
  line-height: 1.6;
  letter-spacing: .025em;
}
[data-theme="dark"] .home-post-card h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.34rem, 2.25vw, 1.72rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
[data-theme="dark"] .home-post-card h2 a { color: inherit; }
[data-theme="dark"] .home-post-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: .5rem 0 0;
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
[data-theme="dark"] .home-post-card__more {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  margin-top: 1rem;
  color: var(--accent);
  font-size: .84rem;
  font-weight: 600;
}
[data-theme="dark"] .home-post-card__more span { transition: transform .2s ease; }
[data-theme="dark"] .home-post-card__more:hover span { transform: translate(2px, -2px); }
[data-theme="dark"] .home-empty-card { grid-column: 1 / span 9; grid-row: 4 / span 4; color: #fff; }
[data-theme="dark"] .home-empty-card h2 { margin: 0; }
[data-theme="dark"] .home-empty-card p { color: rgba(255, 255, 255, .72); }

[data-theme="dark"] .home-random-card {
  position: relative;
  isolation: isolate;
  grid-column: 10 / span 3;
  grid-row: 8 / span 3;
  display: block;
  color: #fff;
  background: #07090d;
  text-decoration: none;
  transition: transform .24s ease, box-shadow .24s ease;
}
[data-theme="dark"] .home-random-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 24px 54px rgba(0, 0, 0, .36);
}
[data-theme="dark"] .home-random-card img {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease, transform .5s ease;
}
[data-theme="dark"] .home-random-card[data-image-ready="true"] img { opacity: 1; }
[data-theme="dark"] .home-random-card:hover img { transform: scale(1.045); }
[data-theme="dark"] .home-random-card::before {
  position: absolute;
  z-index: 1;
  inset: 35% 0 0;
  background: linear-gradient(180deg, transparent, rgba(7, 9, 13, .82));
  content: "";
}
[data-theme="dark"] .home-random-card__caption {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: .9rem;
  left: 1rem;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  color: rgba(255, 255, 255, .94);
  font-size: .84rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .48);
}

/* Shared home card surface, with restrained amber and blue light. */
[data-theme="dark"] section.home-dashboard .home-profile-card {
  border: 0;
  border-radius: 12px;
  background: radial-gradient(ellipse at 14% 18%, rgba(236, 143, 76, .12), transparent 43%), radial-gradient(ellipse at 88% 84%, rgba(83, 151, 231, .14), transparent 46%), rgba(15, 20, 26, .72);
  box-shadow: 0 18px 44px rgba(3, 5, 9, .3), -10px 8px 30px rgba(236, 143, 76, .055), 10px -6px 28px rgba(83, 151, 231, .065), inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  transition: transform 240ms cubic-bezier(.2, .75, .25, 1), box-shadow 240ms ease, background 240ms ease;
}
[data-theme="dark"] section.home-dashboard .home-profile-card:hover {
  transform: translateY(-4px) scale(1.008);
  background: radial-gradient(ellipse at 14% 18%, rgba(236, 143, 76, .16), transparent 43%), radial-gradient(ellipse at 88% 84%, rgba(83, 151, 231, .18), transparent 46%), rgba(18, 24, 31, .82);
  box-shadow: 0 25px 58px rgba(2, 4, 8, .42), -12px 10px 34px rgba(236, 143, 76, .075), 12px -8px 32px rgba(83, 151, 231, .09), inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(255, 255, 255, .045);
}
[data-theme="dark"] section.home-dashboard .home-lastfm-card,
[data-theme="dark"] section.home-dashboard .home-random-card {
  box-shadow: 0 18px 44px rgba(3, 5, 9, .3), -10px 8px 30px rgba(236, 143, 76, .045), 10px -6px 28px rgba(83, 151, 231, .055), inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -1px 0 rgba(255, 255, 255, .035);
}
[data-theme="dark"] section.home-dashboard .home-lastfm-card:hover,
[data-theme="dark"] section.home-dashboard .home-random-card:hover {
  box-shadow: 0 25px 58px rgba(2, 4, 8, .42), -12px 10px 34px rgba(236, 143, 76, .065), 12px -8px 32px rgba(83, 151, 231, .08), inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(255, 255, 255, .045);
}
[data-theme="dark"] section.home-dashboard article.home-post-card {
  border: 0;
  border-color: transparent;
  border-radius: 12px;
  background: radial-gradient(ellipse at 14% 18%, rgba(236, 143, 76, .12), transparent 43%), radial-gradient(ellipse at 88% 84%, rgba(83, 151, 231, .14), transparent 46%), rgba(15, 20, 26, .72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3), -10px 8px 30px rgba(236, 143, 76, .055), 10px -6px 28px rgba(83, 151, 231, .065), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}
[data-theme="dark"] section.home-dashboard article.home-post-card:hover {
  border: 0;
  background: radial-gradient(ellipse at 14% 18%, rgba(236, 143, 76, .16), transparent 43%), radial-gradient(ellipse at 88% 84%, rgba(83, 151, 231, .18), transparent 46%), rgba(18, 24, 31, .82);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .42), -12px 10px 34px rgba(236, 143, 76, .075), 12px -8px 32px rgba(83, 151, 231, .09), inset 0 1px 0 rgba(255, 255, 255, .09);
}

/* Keep the lower-left feature card visually stable if desktop backdrop blur glitches. */
@media (min-width: 981px) {
  [data-theme="dark"] section.home-dashboard article.home-post-card--1 {
    background: radial-gradient(ellipse at 14% 18%, rgba(236, 143, 76, .11), transparent 43%), radial-gradient(ellipse at 88% 84%, rgba(83, 151, 231, .13), transparent 46%), rgba(13, 17, 23, .94);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  [data-theme="dark"] section.home-dashboard article.home-post-card--1:hover {
    background: radial-gradient(ellipse at 14% 18%, rgba(236, 143, 76, .14), transparent 43%), radial-gradient(ellipse at 88% 84%, rgba(83, 151, 231, .16), transparent 46%), rgba(16, 21, 28, .95);
  }
}

@media(prefers-reduced-transparency:reduce) {
  [data-theme="dark"] section.home-dashboard article.home-post-card { -webkit-backdrop-filter:none;backdrop-filter:none; }
}

@media (max-width: 980px) {
  [data-theme="dark"] .home-dashboard {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(3rem, auto);
    gap: 1rem;
  }
  [data-theme="dark"] .home-profile-card { grid-column: 1 / span 4; grid-row: 1 / span 3; }
  [data-theme="dark"] .home-lastfm-card { grid-column: 5 / span 2; grid-row: 1 / span 3; }
  [data-theme="dark"] .home-post-card--1 { grid-column: 1 / span 2; grid-row: 4 / 11; }
  [data-theme="dark"] .home-post-card--2 { grid-column: 3 / span 4; grid-row: 4 / span 4; }
  [data-theme="dark"] .home-post-card--3 { grid-column: 3 / span 2; grid-row: 8 / span 3; }
  [data-theme="dark"] .home-random-card { grid-column: 5 / span 2; grid-row: 8 / span 3; }
  [data-theme="dark"] .home-empty-card { grid-column: 1 / span 6; grid-row: 4 / span 3; }
}

@media (max-width: 620px) {
  [data-theme="dark"] .home-dashboard {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: .85rem;
  }
  [data-theme="dark"] .home-profile-card,
  [data-theme="dark"] .home-lastfm-card,
  [data-theme="dark"] .home-post-card--1,
  [data-theme="dark"] .home-post-card--2,
  [data-theme="dark"] .home-post-card--3,
  [data-theme="dark"] .home-random-card,
  [data-theme="dark"] .home-empty-card {
    grid-column: 1;
    grid-row: auto;
  }
  [data-theme="dark"] .home-profile-card { min-height: 10.5rem; gap: 1rem; padding: 1rem; }
  [data-theme="dark"] .home-profile-card__avatar { flex-basis: 6rem; width: 6rem; }
  [data-theme="dark"] .home-profile-card h1 { font-size: 1.4rem; }
  [data-theme="dark"] .home-profile-card__copy > p:last-child { font-size: .88rem; }
  [data-theme="dark"] .home-lastfm-card { min-height: 13rem; }
  [data-theme="dark"] .home-post-card { height: 16rem; min-height: 16rem; padding: 1rem; }
  [data-theme="dark"] .home-post-card h2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  [data-theme="dark"] .home-post-card__excerpt { -webkit-line-clamp: 2; }
  [data-theme="dark"] .home-random-card { min-height: 13rem; }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .home-profile-card,
  [data-theme="dark"] .home-lastfm-card,
  [data-theme="dark"] .home-post-card,
  [data-theme="dark"] .home-random-card,
  [data-theme="dark"] .home-random-card img,
  [data-theme="dark"] .home-post-card__more span { transition: none; }
  [data-theme="dark"] .home-profile-card:hover { transform: none; }
}

/* d1-page-transitions-v1.css */
/* Internal links swap only .site-main; avoid full-page snapshots that flatten glass blur. */


/* d1-search-archive-refinement-v1.css */
/* Improve archive/search intro contrast and keep search in the site's glass language. */
[data-theme="dark"] .page-intro__title {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .82), 0 8px 28px rgba(0, 0, 0, .52);
}

[data-theme="dark"] .page-intro__description {
  color: rgba(245, 247, 250, .86);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9), 0 4px 16px rgba(0, 0, 0, .58);
}

[data-theme="dark"] .search-form__input,
[data-theme="dark"] .search-form__submit {
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(145deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .018) 48%), rgba(10, 13, 19, .54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 30px rgba(0, 0, 0, .24);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

[data-theme="dark"] .search-form__input {
  color: #fff;
}

[data-theme="dark"] .search-form__input::placeholder {
  color: rgba(240, 243, 248, .68);
  text-shadow: 0 1px 5px rgba(0, 0, 0, .65);
}

[data-theme="dark"] .search-form__input:focus {
  border-color: rgba(255, 255, 255, .2);
  background: linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .025) 48%), rgba(10, 13, 19, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 0 18px rgba(255, 255, 255, .09), 0 14px 34px rgba(0, 0, 0, .28);
}

[data-theme="dark"] .search-form__submit {
  color: rgba(255, 255, 255, .94);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

[data-theme="dark"] .search-form__submit:hover,
[data-theme="dark"] .search-form__submit:focus-visible {
  border-color: rgba(255, 255, 255, .24);
  background: linear-gradient(145deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .035) 48%), rgba(10, 13, 19, .68);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 20px rgba(255, 255, 255, .1), 0 16px 36px rgba(0, 0, 0, .3);
  transform: translateY(-1px);
}

[data-theme="dark"] .search-status {
  color: rgba(245, 247, 250, .82);
  text-shadow: 0 1px 7px rgba(0, 0, 0, .85), 0 4px 14px rgba(0, 0, 0, .5);
}

[data-theme="dark"] .search-results {
  width: min(100%, var(--content-width));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  gap: 1.15rem;
  margin: .85rem auto 0;
  padding: 0;
  list-style: none;
}

[data-theme="dark"] .search-results .search-result {
  min-width: 0;
  padding: 1.35rem 1.5rem;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 42%), rgba(8, 10, 14, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(255, 255, 255, .025), 0 18px 44px rgba(3, 5, 9, .3);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  transition: transform 240ms cubic-bezier(.2, .75, .25, 1), background 240ms ease, box-shadow 240ms ease;
}

[data-theme="dark"] .search-results .search-result:hover {
  transform: translateY(-4px) scale(1.008);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), transparent 42%), rgba(10, 12, 17, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(255, 255, 255, .035), 0 25px 58px rgba(2, 4, 8, .42), 0 0 28px rgba(255, 255, 255, .035);
}

[data-theme="dark"] .search-results .post-card__meta {
  margin-top: .45rem;
}

[data-theme="dark"] .search-results .post-card__summary {
  margin-top: .7rem;
}

@media (max-width: 560px) {
  [data-theme="dark"] .search-results .search-result {
    padding: 1.15rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .search-form__submit,
  [data-theme="dark"] .search-results .search-result {
    transition: none;
  }
}

/* d1-navigation-shell-v1.css */
/* Persistent sidebar account control and social icons on the home profile card. */
[data-theme="dark"] .sidebar__bottom {
  position: absolute;
  right: 1.7rem;
  bottom: 1.8rem;
  left: 1.7rem;
  display: grid;
  gap: .65rem;
  margin-top: 0;
}

[data-theme="dark"] .sidebar__account-link {
  display: flex;
  align-items: center;
  gap: .72rem;
  min-width: 0;
  padding: .7rem .75rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)), rgba(12, 15, 21, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 22px rgba(0, 0, 0, .16);
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

[data-theme="dark"] .sidebar__account-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .22);
  background: linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035)), rgba(12, 15, 21, .42);
}

[data-theme="dark"] .sidebar__account-link > img {
  display: block;
  width: 2.55rem;
  height: 2.55rem;
  padding: .55rem;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .88);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  object-fit: cover;
}

[data-theme="dark"] .sidebar__account-link > img[hidden] { display: none; }
[data-theme="dark"] .sidebar__account-copy { display: grid; min-width: 0; gap: .1rem; }
[data-theme="dark"] .sidebar__account-copy [data-account-label] { overflow: hidden; font-size: .92rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
[data-theme="dark"] .sidebar__account-copy small { overflow: hidden; color: rgba(255, 255, 255, .58); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
[data-theme="dark"] .sidebar__admin-link { padding: .2rem .75rem; color: rgba(255, 255, 255, .68); font-size: .82rem; }

/* Signed-in identity is a simple avatar and two-line link, without a card. */
[data-theme="dark"] .sidebar__account-link.is-authenticated {
  display: flex;
  gap: .75rem;
  padding: .15rem 0;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
[data-theme="dark"] .sidebar__account-link.is-authenticated:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
  opacity: .78;
}
[data-theme="dark"] .sidebar__account-link.is-authenticated > img {
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .36);
  background: transparent;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .28);
}
[data-theme="dark"] .sidebar__account-link.is-authenticated .sidebar__account-copy { gap: .08rem; }
[data-theme="dark"] .sidebar__account-link.is-authenticated .sidebar__account-copy [data-account-label] { font-size: .95rem; }
[data-theme="dark"] .sidebar__account-link.is-authenticated .sidebar__account-copy small { color: rgba(255, 255, 255, .62); font-size: .76rem; }

[data-theme="dark"] .home-profile-card__copy { flex: 1 1 auto; }
[data-theme="dark"] .home-profile-card__copy > p { margin: .55rem 0 0; color: rgba(232, 236, 242, .78); font-size: clamp(.92rem, 1.4vw, 1.05rem); line-height: 1.7; }
[data-theme="dark"] .home-profile-card__social { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: .85rem; }
[data-theme="dark"] .home-profile-card__social-link {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .88);
  box-shadow: none;
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}
[data-theme="dark"] .home-profile-card__social-link:hover { transform: translateY(-2px); color: #fff; opacity: .78; }
[data-theme="dark"] .home-profile-card__social-link svg { width: 1.65rem; height: 1.65rem; fill: currentColor; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .home-profile-card__social-link svg.social-icon-github { stroke: none; }
[data-theme="dark"] .home-profile-card__social-link svg.social-icon-music { fill: none; stroke: currentColor; stroke-width: 1.9; }
[data-theme="dark"] .home-profile-card__social-link:has(svg rect) svg { fill: none; }
[data-theme="dark"] .home-profile-card__social-link img { width: 1.65rem; height: 1.65rem; border-radius: 50%; object-fit: cover; }

@media (max-width: 980px) {
  [data-theme="dark"] .mobile-topbar { grid-template-columns: 2.4rem minmax(0, 1fr); }
  [data-theme="dark"] .mobile-topbar__title { justify-self: center; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .sidebar__account-link,
  [data-theme="dark"] .home-profile-card__social-link { transition: none; }
}

/* d1-public-components-v1.css */
/* Shared public-site controls and material tokens. Admin uses its own stylesheet. */
textarea { resize: none !important; }

:root[data-theme="dark"] {
  font-size: 100%;
  --ui-glass-line: rgba(255, 255, 255, .15);
  --ui-control-face: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .075));
  --ui-control-face-hover: linear-gradient(180deg, rgba(255, 255, 255, .23), rgba(255, 255, 255, .11));
  --ui-control-shadow: inset 1px -1px 1px -1px rgba(255, 255, 255, .72), inset -1px 1px 1px -1px rgba(255, 255, 255, .68), inset 0 1px 0 rgba(255, 255, 255, .18), 0 5px 16px rgba(0, 0, 0, .2);
  --ui-control-shadow-hover: inset 1px -1px 1px -1px rgba(255, 255, 255, .86), inset -1px 1px 1px -1px rgba(255, 255, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .23), 0 8px 22px rgba(0, 0, 0, .27);
  --ui-field-bg: rgba(5, 8, 12, .42);
  --ui-focus-halo: inset 0 2px 5px rgba(0, 0, 0, .3), inset 0 1px 1px rgba(0, 0, 0, .2), 0 0 0 3px rgba(255, 255, 255, .07), 0 0 16px rgba(255, 255, 255, .12);
  --ui-control-radius: 999px;
  --ui-control-motion: 180ms;
  --ui-control-easing: cubic-bezier(.2, .75, .25, 1);
}

/* One neutral white-glass treatment for public actions. */
[data-theme="dark"] :is(
  .community button:not(.account-mode-switch__button),
  .account-panel button:not(.account-mode-switch__button),
  .board-page button:not(.board-replies-toggle),
  .search-form__submit,
  .article__home-link,
  .content-pagination a,
  .not-found-page .not-found__home,
  .mobile-topbar__account,
  .community-account-link
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .58rem 1rem;
  border: 1px solid var(--ui-glass-line);
  border-radius: var(--ui-control-radius);
  background: var(--ui-control-face);
  box-shadow: var(--ui-control-shadow);
  backdrop-filter: blur(12px) saturate(155%);
  -webkit-backdrop-filter: blur(12px) saturate(155%);
  color: rgba(255, 255, 255, .94);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background var(--ui-control-motion) ease,
    border-color var(--ui-control-motion) ease,
    box-shadow var(--ui-control-motion) ease,
    color var(--ui-control-motion) ease,
    transform 120ms var(--ui-control-easing);
}

@media (hover: hover) {
[data-theme="dark"] :is(
  .community button:not(.account-mode-switch__button):hover,
  .account-panel button:not(.account-mode-switch__button):hover,
  .board-page button:not(.board-replies-toggle):hover,
  .search-form__submit:hover,
  .article__home-link:hover,
  .content-pagination a:hover,
  .not-found-page .not-found__home:hover,
  .mobile-topbar__account:hover,
  .community-account-link:hover
) {
  border-color: rgba(255, 255, 255, .27);
  background: var(--ui-control-face-hover);
  box-shadow: var(--ui-control-shadow-hover);
  color: #fff;
}
}

[data-theme="dark"] :is(
  .community button:not(.account-mode-switch__button):active,
  .account-panel button:not(.account-mode-switch__button):active,
  .board-page button:not(.board-replies-toggle):active,
  .search-form__submit:active,
  .article__home-link:active,
  .content-pagination a:active,
  .not-found-page .not-found__home:active,
  .mobile-topbar__account:active,
  .community-account-link:active
):not(:disabled) {
  transform: scale(.98);
}

[data-theme="dark"] :is(
  .community button:disabled,
  .account-panel button:disabled,
  .board-page button:not(.board-replies-toggle):disabled,
  .search-form__submit:disabled
) {
  opacity: .48;
  cursor: not-allowed;
}

[data-theme="dark"] :is(.community .community-button--quiet, .account-panel .account-button--quiet) {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .72);
}

[data-theme="dark"] :is(.community .community-button--quiet:hover, .account-panel .account-button--quiet:hover) {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .11);
  color: #fff;
}

/* Quiet fields at rest; focus is a local glow with no bright outline frame. */
[data-theme="dark"] input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .community input:not([type="file"]),
[data-theme="dark"] .community textarea,
[data-theme="dark"] .community select,
[data-theme="dark"] .account-panel input:not([type="file"]),
[data-theme="dark"] .account-panel textarea,
[data-theme="dark"] .account-panel select,
[data-theme="dark"] .search-form__input {
  min-height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: .78rem;
  background: var(--ui-field-bg);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .3), inset 0 1px 1px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .94);
  font: inherit;
  transition: background var(--ui-control-motion) ease, box-shadow var(--ui-control-motion) ease, border-color var(--ui-control-motion) ease;
}

[data-theme="dark"] textarea,
[data-theme="dark"] .community textarea,
[data-theme="dark"] .account-panel textarea {
  min-height: 7rem;
  line-height: 1.7;
}

[data-theme="dark"] input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] .community input:not([type="file"]):focus,
[data-theme="dark"] .community textarea:focus,
[data-theme="dark"] .community select:focus,
[data-theme="dark"] .account-panel input:not([type="file"]):focus,
[data-theme="dark"] .account-panel textarea:focus,
[data-theme="dark"] .account-panel select:focus,
[data-theme="dark"] .search-form__input:focus {
  border-color: rgba(255, 255, 255, .17);
  outline: none;
  background: rgba(7, 10, 15, .56);
  box-shadow: var(--ui-focus-halo);
}

[data-theme="dark"] :is(input, textarea, select)::placeholder {
  color: rgba(238, 242, 248, .57);
}

[data-theme="dark"] :is(a, button, input, textarea, select):focus-visible {
  outline: 2px solid rgba(255, 255, 255, .68);
  outline-offset: 3px;
}

[data-theme="dark"] .content-pagination span[aria-disabled="true"] {
  opacity: .42;
}

[data-theme="dark"] input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus-visible,
[data-theme="dark"] textarea:focus-visible,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] .community input:not([type="file"]):focus-visible,
[data-theme="dark"] .community textarea:focus-visible,
[data-theme="dark"] .account-panel input:not([type="file"]):focus-visible,
[data-theme="dark"] .account-panel textarea:focus-visible,
[data-theme="dark"] .search-form__input:focus-visible {
  outline: none;
}

/* Listing cards share one dark glass depth; the home keeps its restrained amber/blue light. */
[data-theme="dark"] :is(.post-card, .search-results .search-result, .home-post-card) {
  border: 0;
  border-radius: 1.05rem;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

@media (max-width: 980px) {
  [data-theme="dark"] .mobile-topbar {
    position: sticky;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  /* Let the same body artwork and darkness overlay pass behind the toolbar and content. */
  [data-theme="dark"] .site-main {
    background-color: transparent;
    background-image: none;
  }

  [data-theme="dark"] .mobile-topbar__title {
    position: absolute;
    left: 50%;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: calc(100% - 7rem);
    min-height: 2.55rem;
    box-sizing: border-box;
    padding: .48rem .95rem;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: 999px;
    background: rgba(255, 255, 255, .055);
    box-shadow:
      inset 1px -1px 1px -1px rgba(255, 255, 255, .9),
      inset -1px 1px 1px -1px rgba(255, 255, 255, .82),
      inset 4px -4px 1px -4px rgba(255, 255, 255, .5),
      inset -4px 4px 1px -4px rgba(255, 255, 255, .46),
      inset 0 0 2px rgba(0, 0, 0, .48),
      0 5px 18px rgba(0, 0, 0, .2);
    backdrop-filter: blur(12px) saturate(175%);
    -webkit-backdrop-filter: blur(12px) saturate(175%);
    color: rgba(255, 255, 255, .96);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  }

  [data-theme="dark"] .mobile-topbar__title::before,
  [data-theme="dark"] .mobile-topbar__toggle::before {
    position: absolute;
    z-index: 0;
    inset: 20% 8%;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: inherit;
    content: "";
    filter: blur(5px);
    pointer-events: none;
  }

  [data-theme="dark"] .mobile-topbar__title::after,
  [data-theme="dark"] .mobile-topbar__toggle::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, .5), transparent 30%, transparent 72%, rgba(255, 255, 255, .28));
    content: "";
    mix-blend-mode: screen;
    opacity: .56;
    pointer-events: none;
  }

  [data-theme="dark"] .mobile-topbar__title > span {
    position: relative;
    z-index: 2;
  }

  [data-theme="dark"] .mobile-topbar__toggle {
    position: relative;
    z-index: 1;
    width: 2.55rem;
    height: 2.55rem;
    padding: .66rem;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .055);
    box-shadow:
      inset 1px -1px 1px -1px rgba(255, 255, 255, .9),
      inset -1px 1px 1px -1px rgba(255, 255, 255, .82),
      inset 4px -4px 1px -4px rgba(255, 255, 255, .5),
      inset -4px 4px 1px -4px rgba(255, 255, 255, .46),
      inset 0 0 2px rgba(0, 0, 0, .48),
      0 5px 18px rgba(0, 0, 0, .2);
    backdrop-filter: blur(10px) saturate(175%);
    -webkit-backdrop-filter: blur(10px) saturate(175%);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  }

  [data-theme="dark"] .mobile-topbar__toggle span {
    position: relative;
    z-index: 2;
    border-radius: 999px;
    background: rgba(255, 255, 255, .93);
    box-shadow: 0 0 8px rgba(255, 255, 255, .12);
  }

  [data-theme="dark"] .mobile-topbar__toggle:active {
    transform: scale(.96);
  }

  [data-theme="dark"] .mobile-topbar__title:active {
    transform: translateX(-50%) scale(.97);
  }
}

@media (hover: hover) and (max-width: 980px) {
  [data-theme="dark"] .mobile-topbar__toggle:hover,
  [data-theme="dark"] .mobile-topbar__title:hover {
    border-color: rgba(255, 255, 255, .36);
    background: rgba(255, 255, 255, .09);
    box-shadow:
      inset 1px -1px 1px -1px rgba(255, 255, 255, .95),
      inset -1px 1px 1px -1px rgba(255, 255, 255, .9),
      inset 4px -4px 1px -4px rgba(255, 255, 255, .6),
      inset -4px 4px 1px -4px rgba(255, 255, 255, .56),
      inset 0 0 2px rgba(0, 0, 0, .4),
      0 8px 24px rgba(0, 0, 0, .28);
  }
}

@media (prefers-reduced-transparency: reduce) and (max-width: 980px) {
  [data-theme="dark"] .mobile-topbar__title,
  [data-theme="dark"] .mobile-topbar__toggle {
    background: rgba(16, 20, 26, .94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Keep every homepage tile on the same corner radius, including media and empty states. */
[data-theme="dark"] :is(
  .home-profile-card,
  .home-lastfm-card,
  .home-post-card,
  .home-empty-card,
  .home-random-card
) {
  border-radius: 12px;
}

[data-theme="dark"] .article__content {
  max-width: 72ch;
  font-size: 1.04rem;
  line-height: 1.9;
}

[data-theme="dark"] .article__content :is(h1, h2, h3) {
  line-height: 1.32;
}

/* Plain-text community board. */
[data-theme="dark"] .board-page {
  width: min(100%, 58rem);
  margin: 0 auto;
}

[data-theme="dark"] .board-page__intro { margin-bottom: 1.4rem; }
[data-theme="dark"] .board-compose,
[data-theme="dark"] .board-card {
  border: 0;
  border-radius: 12px;
  background: radial-gradient(ellipse at 12% 12%, rgba(232, 145, 82, .075), transparent 38%), radial-gradient(ellipse at 88% 88%, rgba(88, 148, 218, .085), transparent 42%), rgba(12, 16, 21, .74);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .055);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}
[data-theme="dark"] .board-compose { display: grid; gap: .7rem; margin-bottom: 1.2rem; padding: 1.1rem; }
[data-theme="dark"] .board-compose[hidden] { display: none; }
[data-theme="dark"] .board-compose > label { color: rgba(255, 255, 255, .88); font-weight: 600; }
[data-theme="dark"] .board-compose textarea,
[data-theme="dark"] .board-reply-form textarea {
  width: 100%;
  min-height: 5.8rem;
  padding: .8rem .9rem;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: .85rem;
  background: rgba(0, 0, 0, .24);
  color: rgba(255, 255, 255, .94);
  font: inherit;
  line-height: 1.7;
}
[data-theme="dark"] .board-compose textarea:focus,
[data-theme="dark"] .board-reply-form textarea:focus { outline: 0; box-shadow: var(--ui-focus-halo); }
[data-theme="dark"] .board-compose__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: rgba(255, 255, 255, .48); font-size: .8rem; }
[data-theme="dark"] .board-compose__footer button,
[data-theme="dark"] .board-reply-form button { min-height: 2.4rem; padding: .45rem .95rem; }
[data-theme="dark"] .board-status { min-height: 1.4em; color: rgba(255, 255, 255, .72); }
[data-theme="dark"] .board-status.is-error { color: #ffb4aa; }
[data-theme="dark"] .board-login-note { display: flex; flex-wrap: wrap; gap: .35rem; color: rgba(255, 255, 255, .82); text-shadow: 0 1px 8px rgba(0, 0, 0, .72), 0 0 18px rgba(0, 0, 0, .35); }
[data-theme="dark"] .board-login-note a,
[data-theme="dark"] .board-sign-in { color: rgba(255, 255, 255, .98); text-decoration: underline; text-underline-offset: .2em; text-shadow: 0 1px 8px rgba(0, 0, 0, .78), 0 0 18px rgba(0, 0, 0, .42); }
[data-theme="dark"] .board-feed { display: grid; gap: 1rem; }
[data-theme="dark"] .board-card--enter { animation: board-post-enter 480ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes board-post-enter {
  from { opacity: 0; transform: translateY(12px) scale(.985); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
  55% { opacity: 1; box-shadow: 0 18px 42px rgba(232, 145, 82, .12), 0 12px 34px rgba(88, 148, 218, .14); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
[data-theme="dark"] .board-card { padding: clamp(1rem, 2.5vw, 1.4rem); }
[data-theme="dark"] .board-card__header { display: flex; align-items: center; gap: .8rem; }
[data-theme="dark"] .board-card__avatar { flex: 0 0 2.7rem; width: 2.7rem; height: 2.7rem; border: 1px solid rgba(255, 255, 255, .19); border-radius: 50%; object-fit: cover; }
[data-theme="dark"] .board-card__identity { display: grid; min-width: 0; gap: .12rem; }
[data-theme="dark"] .board-card__identity strong { overflow: hidden; color: rgba(255, 255, 255, .96); text-overflow: ellipsis; white-space: nowrap; }
[data-theme="dark"] .board-card__identity span,
[data-theme="dark"] .board-card__header time { color: rgba(255, 255, 255, .53); font-size: .8rem; }
[data-theme="dark"] .board-card__header time { margin-left: auto; text-align: right; }
[data-theme="dark"] .board-card__body { margin: 1.1rem 0; color: rgba(246, 247, 250, .91); line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-theme="dark"] .board-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.15rem; }
[data-theme="dark"] .con-like { position: relative; display: inline-flex; align-items: center; gap: .68rem; min-width: 2.35rem; min-height: 2.4rem; color: rgba(255, 255, 255, .68); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .2s ease; }
[data-theme="dark"] .con-like:hover { color: rgba(255, 255, 255, .98); }
[data-theme="dark"] .con-like .like { position: absolute; z-index: 3; inset: 0 auto 0 0; width: 2.35rem; height: 2.35rem; margin: 0; opacity: 0; cursor: pointer; }
[data-theme="dark"] .con-like .checkmark { position: relative; display: grid; flex: 0 0 2.35rem; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: 50%; transition: background .2s ease, transform .18s cubic-bezier(.2,.75,.25,1); }
[data-theme="dark"] .con-like .checkmark svg { position: absolute; width: 1.28rem; height: 1.28rem; overflow: visible; fill: currentColor; }
[data-theme="dark"] .con-like .outline { color: rgba(255, 255, 255, .9); transition: color .2s ease, opacity .2s ease, transform .25s cubic-bezier(.2,.75,.25,1); }
[data-theme="dark"] .con-like:hover .outline { transform: scale(1.06); }
[data-theme="dark"] .con-like .filled { display: none; color: #ff657a; transform-origin: center; }
[data-theme="dark"] .con-like.is-liked .outline { color: #ff657a; opacity: 0; transform: scale(.72); }
[data-theme="dark"] .con-like .like:checked ~ .checkmark .filled { display: block; }
[data-theme="dark"] .con-like .like:focus-visible ~ .checkmark { outline: 2px solid rgba(255, 255, 255, .78); outline-offset: 2px; }
[data-theme="dark"] .con-like:active .checkmark { transform: scale(.9); }
[data-theme="dark"] .con-like .like:disabled { cursor: wait; }
[data-theme="dark"] .con-like .celebrate { display: none; width: 2.9rem !important; height: 2.9rem !important; overflow: visible; pointer-events: none; }
[data-theme="dark"] .con-like.is-animating .filled { animation: board-heart-pop .46s cubic-bezier(.2,.75,.25,1); }
[data-theme="dark"] .con-like.is-animating .celebrate { display: block; animation: board-heart-spark .52s ease-out forwards; }
[data-theme="dark"] .con-like .poly { fill: #ff657a; stroke: #ff657a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .board-like__count { min-width: .7em; color: inherit; font-size: .84rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .con-like.is-liked .board-like__count { color: rgba(255, 215, 219, .92); }
[data-theme="dark"] .board-page .board-action:not(.con-like) { min-height: 2.35rem; padding: .38rem .78rem; border-radius: 999px; background: rgba(255, 255, 255, .045); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 4px 12px rgba(0, 0, 0, .15); color: rgba(255, 255, 255, .77); font-size: .86rem; }
[data-theme="dark"] .board-replies-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .68rem;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: rgba(255, 255, 255, .68);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease, transform .18s cubic-bezier(.2,.75,.25,1);
}
[data-theme="dark"] .board-replies-toggle:hover,
[data-theme="dark"] .board-replies-toggle[aria-expanded="true"] { color: rgba(255, 255, 255, .98); }
[data-theme="dark"] .board-replies-toggle:hover .board-reply-icon { transform: scale(1.06); }
[data-theme="dark"] .board-replies-toggle:active { transform: scale(.9); }
[data-theme="dark"] .board-replies-toggle:focus-visible { outline: 2px solid rgba(255, 255, 255, .68); outline-offset: 2px; }
[data-theme="dark"] .board-reply-icon {
  display: block;
  flex: 0 0 1.28rem;
  width: 1.28rem;
  height: 1.28rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s cubic-bezier(.2,.75,.25,1);
}
[data-theme="dark"] .board-replies-toggle[aria-expanded="true"] .board-reply-icon { transform: scale(1.08); }
[data-theme="dark"] .board-replies-toggle .board-like__count { min-width: .7em; color: inherit; font-size: .84rem; line-height: 1.2; font-variant-numeric: tabular-nums; }

/* Profile-card actions use the same Apple primary and destructive faces. */
[data-theme="dark"] .account-profile__actions [data-account-save] {
  border-color: rgba(255, 255, 255, .38);
  background: var(--ui-primary-face);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 6px 18px rgba(0, 0, 0, .24);
  color: var(--ui-primary-ink);
  font-weight: 650;
}
[data-theme="dark"] .account-profile__actions [data-account-save]:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .5);
  background: linear-gradient(180deg, #fff, rgba(239, 243, 248, .94));
}
[data-theme="dark"] .account-profile__actions [data-account-logout] {
  border-color: rgba(255, 120, 110, .28);
  background: rgba(255, 69, 58, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 5px 16px rgba(0, 0, 0, .2);
  color: #ffb6b0;
}
[data-theme="dark"] .account-profile__actions [data-account-logout]:hover:not(:disabled) {
  border-color: rgba(255, 120, 110, .42);
  background: rgba(255, 69, 58, .22);
  color: #ffd0cb;
}

/* Nested composer controls: generous inset, stepped corners, compact actions. */
[data-theme="dark"] .community-compose textarea {
  min-height: 8rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
}
[data-theme="dark"] .community-compose button[type="submit"] {
  justify-self: end;
  width: auto;
  min-width: 9rem;
  min-height: 2.6rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
}
[data-theme="dark"] .board-compose textarea {
  min-height: 7rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
}
[data-theme="dark"] .board-compose__footer button,
[data-theme="dark"] .board-reply-form button {
  width: auto;
  min-width: 6.5rem;
  min-height: 2.6rem;
  padding: .55rem 1rem;
  border-radius: 999px;
}
[data-theme="dark"] .board-reply-form textarea {
  min-height: 4rem;
  padding: .9rem 1rem;
  border-radius: 14px;
}
[data-theme="dark"] .board-reply-form button { justify-self: end; }

/* Use the same bottom-right action pattern for article comments and board replies. */
[data-theme="dark"] .board-reply-form { grid-template-columns: minmax(0, 1fr); }
[data-theme="dark"] .community-compose button[type="submit"],
[data-theme="dark"] .board-compose__footer button,
[data-theme="dark"] .board-reply-form button { justify-self: end; width: auto; }
[data-theme="dark"] :is(.community-compose button[type="submit"], .board-compose__footer button, .board-reply-form button):disabled {
  border-color: transparent;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .3);
  opacity: 1;
  cursor: not-allowed;
}
[data-theme="dark"] :is(.community-compose button[type="submit"], .board-compose__footer button, .board-reply-form button) {
  display: inline-flex;
  width: 6.5rem;
  min-width: 6.5rem;
  height: 2.6rem;
  min-height: 2.6rem;
  flex: 0 0 6.5rem;
  padding: .55rem 1rem;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}
[data-theme="dark"] .board-compose {
  padding: clamp(1rem, 2.5vw, 1.4rem);
}
[data-theme="dark"] .board-compose__footer,
[data-theme="dark"] .board-reply-form {
  width: 100%;
  margin-inline: 0;
}
[data-theme="dark"] .board-compose__footer { justify-content: space-between; }
[data-theme="dark"] .board-compose__footer button,
[data-theme="dark"] .board-reply-form button { margin-right: 0; justify-self: end; }
@keyframes board-heart-pop { 0% { opacity: 0; transform: scale(0); } 56% { opacity: 1; transform: scale(1.23); } 100% { opacity: 1; transform: scale(1); } }
@keyframes board-heart-spark { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.2); } }
[data-theme="dark"] .board-replies {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  padding: 0 0 0 1rem;
  border-top: 1px solid transparent;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: grid-template-rows 280ms cubic-bezier(.2,.75,.25,1), margin-top 280ms cubic-bezier(.2,.75,.25,1), padding 280ms cubic-bezier(.2,.75,.25,1), border-color 220ms ease, opacity 190ms ease, transform 280ms cubic-bezier(.2,.75,.25,1);
}
[data-theme="dark"] .board-replies.is-open {
  grid-template-rows: 1fr;
  margin-top: 1rem;
  padding-top: 1rem;
  border-color: rgba(255, 255, 255, .085);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
[data-theme="dark"] .board-replies__inner { display: grid; min-height: 0; gap: .75rem; overflow: hidden; }
[data-theme="dark"] .board-replies.is-open .board-replies__inner { overflow: visible; }
[data-theme="dark"] .board-reply { display: flex; gap: .65rem; }
[data-theme="dark"] .board-reply .board-card__avatar { flex-basis: 2.1rem; width: 2.1rem; height: 2.1rem; }
[data-theme="dark"] .board-reply__content { min-width: 0; flex: 1; }
[data-theme="dark"] .board-reply__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; color: rgba(255, 255, 255, .5); font-size: .76rem; }
[data-theme="dark"] .board-reply__meta strong { color: rgba(255, 255, 255, .88); font-size: .84rem; }
[data-theme="dark"] .board-reply__content p { margin: .28rem 0 0; color: rgba(255, 255, 255, .82); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-theme="dark"] .board-reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
[data-theme="dark"] .board-reply-form textarea { min-height: 3rem; resize: vertical; }
[data-theme="dark"] .board-replies__empty { margin: 0; color: rgba(255, 255, 255, .55); font-size: .88rem; }
[data-theme="dark"] .board-pagination { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1.3rem; }
[data-theme="dark"] .board-pagination[hidden] { display: none; }
[data-theme="dark"] .board-pagination button { min-height: 2.45rem; }
[data-theme="dark"] .board-card--skeleton { display: grid; gap: .85rem; }
[data-theme="dark"] .board-skeleton__identity,
[data-theme="dark"] .board-skeleton__line,
[data-theme="dark"] .board-skeleton__actions {
  display: block;
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(255, 255, 255, .045) 20%, rgba(255, 255, 255, .095) 42%, rgba(255, 255, 255, .045) 64%);
  background-size: 220% 100%;
  animation: board-skeleton-shimmer 1.35s ease-in-out infinite;
}
[data-theme="dark"] .board-skeleton__identity { width: 48%; height: 2.7rem; }
[data-theme="dark"] .board-skeleton__line { width: 94%; height: .75rem; }
[data-theme="dark"] .board-skeleton__line--short { width: 62%; }
[data-theme="dark"] .board-skeleton__actions { width: 8rem; height: 2.2rem; margin-top: .25rem; }
@keyframes board-skeleton-shimmer { to { background-position: -220% 0; } }

@media (max-width: 560px) {
  [data-theme="dark"] .board-card__header time { max-width: 6.5rem; font-size: .7rem; }
  [data-theme="dark"] .board-replies { padding-left: .2rem; }
  [data-theme="dark"] .board-reply-form { grid-template-columns: 1fr; }
  [data-theme="dark"] .board-reply-form button { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .board-card--enter { animation: none; }
  [data-theme="dark"] .con-like,
  [data-theme="dark"] .con-like .checkmark,
  [data-theme="dark"] .con-like .outline,
  [data-theme="dark"] .con-like .filled,
  [data-theme="dark"] .con-like .celebrate { transition: none; animation: none !important; }
  [data-theme="dark"] .board-skeleton__identity,
  [data-theme="dark"] .board-skeleton__line,
  [data-theme="dark"] .board-skeleton__actions { animation: none; }
  [data-theme="dark"] .board-replies { transition: none; }
}

/* Shared Apple-style glass language across public cards and actions. */
[data-theme="dark"] {
  --ui-card-radius: 1.125rem;
  --ui-card-edge: rgba(255, 255, 255, .075);
  --ui-card-face: linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 44%), rgba(8, 10, 14, .72);
  --ui-card-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -1px 0 rgba(255, 255, 255, .025), 0 18px 42px rgba(3, 5, 9, .28);
  --ui-primary-face: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(229, 235, 243, .86));
  --ui-primary-ink: #11161d;
  --ui-destructive-face: rgba(255, 69, 58, .12);
  --ui-destructive-ink: #ffb6b0;
}

[data-theme="dark"] :is(
  .post-card,
  .article,
  .search-results .search-result,
  .community,
  .account-panel,
  .board-compose,
  .board-card,
  .not-found-page .not-found__terminal,
  .friend-card
) {
  border: 1px solid var(--ui-card-edge);
  border-radius: var(--ui-card-radius);
  background: var(--ui-card-face);
  box-shadow: var(--ui-card-shadow);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

/* Keep the homepage's existing amber/blue halo treatment intact. */
[data-theme="dark"] :is(
  .home-profile-card,
  .home-lastfm-card,
  .home-post-card,
  .home-empty-card,
  .home-random-card
) {
  border-radius: var(--ui-card-radius);
}

[data-theme="dark"] :is(
  .community button:not(.account-mode-switch__button),
  .account-panel button:not(.account-mode-switch__button),
  .board-page button:not(.board-replies-toggle),
  .search-form__submit,
  .article__home-link,
  .content-pagination a,
  .not-found-page .not-found__home,
  .home-profile-card__social-link,
  .mobile-topbar__account,
  .community-account-link
) {
  border-color: rgba(255, 255, 255, .13);
  border-radius: var(--ui-control-radius);
  background: rgba(255, 255, 255, .065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .11), 0 5px 16px rgba(0, 0, 0, .2);
  backdrop-filter: blur(14px) saturate(155%);
  -webkit-backdrop-filter: blur(14px) saturate(155%);
}

[data-theme="dark"] :is(
  .community [type="submit"],
  .account-panel form > button[type="submit"],
  .board-compose__footer [data-board-post-submit],
  .board-reply-form button,
  .search-form__submit
) {
  border-color: rgba(255, 255, 255, .38);
  background: var(--ui-primary-face);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 6px 18px rgba(0, 0, 0, .24);
  color: var(--ui-primary-ink);
  font-weight: 650;
}

[data-theme="dark"] :is(
  .community .community-button--quiet,
  .account-panel .account-button--quiet,
  .board-page .board-action:not(.con-like),
  .content-pagination a,
  .not-found-page .not-found__home
) {
  background: rgba(255, 255, 255, .055);
  color: rgba(255, 255, 255, .9);
}

[data-theme="dark"] :is(.community .is-destructive, .account-panel .is-destructive, .board-page .is-destructive) {
  border-color: rgba(255, 120, 110, .2);
  background: var(--ui-destructive-face);
  color: var(--ui-destructive-ink);
}

[data-theme="dark"] :is(
  .community button:disabled,
  .account-panel button:disabled,
  .board-page button:not(.board-replies-toggle):disabled,
  .search-form__submit:disabled
) {
  opacity: .42;
  filter: saturate(.35);
  box-shadow: none;
}

@media (prefers-reduced-transparency: reduce) {
  [data-theme="dark"] :is(
    .post-card, .article, .search-results .search-result, .community,
    .account-panel, .board-compose, .board-card, .not-found-page .not-found__terminal, .friend-card
  ) {
    background: rgba(15, 19, 25, .96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Footer text sits directly on the page; its absolute anchor follows the main area's height. */
[data-theme="dark"] .site-main {
  position: relative;
}

[data-theme="dark"] .site-footer {
  position: absolute;
  right: 1.5rem;
  bottom: 1.25rem;
  width: max-content;
  max-width: calc(100% - 3rem);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="dark"] .site-footer::before,
[data-theme="dark"] .site-footer::after {
  content: none;
  display: none;
}

[data-theme="dark"] .site-footer__custom {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .site-footer__custom a {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 980px) {
  [data-theme="dark"] .site-footer {
    right: 1rem;
    bottom: 1rem;
    max-width: calc(100% - 2rem);
  }
}

@media (hover: none) {
  [data-theme="dark"] :is(.post-card, .search-results .search-result, .home-post-card, .home-lastfm-card, .home-random-card):hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] :is(
    .community button,
    .account-panel button,
    .search-form__submit,
    .article__home-link,
    .content-pagination a,
    .not-found-page .not-found__home,
    .mobile-topbar__account,
    .community-account-link,
    input,
    textarea,
    select,
    .post-card,
    .search-results .search-result,
    .home-post-card
  ) {
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  [data-theme="dark"] :is(.community, .account-panel, .post-card, .search-results .search-result, .home-post-card, .home-lastfm-card, .home-random-card, .sidebar__nav-indicator) {
    border: 1px solid rgba(255, 255, 255, .2);
    background-color: rgba(10, 13, 18, .96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  [data-theme="dark"] .sidebar__nav-indicator { background: rgba(10, 13, 18, .96); }
  [data-theme="dark"] :is(.community button, .account-panel button, .search-form__submit, .article__home-link, .content-pagination a, .not-found-page .not-found__home, .mobile-topbar__account, .community-account-link) {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  [data-theme="dark"] :is(
    .community button:not(.account-mode-switch__button),
    .account-panel button:not(.account-mode-switch__button),
    .search-form__submit,
    .article__home-link,
    .content-pagination a,
    .not-found-page .not-found__home,
    .mobile-topbar__account,
    .community-account-link,
    input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    textarea,
    select
  ) {
    border-color: rgba(255, 255, 255, .55);
  }
}

/* Keep account controls on their Apple color faces at rest, not only on hover. */
[data-theme="dark"] .account-panel.account-profile .account-profile__actions button[data-account-save],
[data-theme="dark"] .account-panel .account-auth-view--verify button[type="submit"] {
  border: 1px solid rgba(255, 255, 255, .46);
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(225, 232, 241, .9));
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(0, 0, 0, .24);
  color: #11161d;
  font-weight: 650;
}
[data-theme="dark"] .account-panel .account-auth-view--verify button:is([data-account-resend], [data-account-back]) {
  border: 1px solid rgba(255, 255, 255, .24);
  background: linear-gradient(180deg, rgba(255, 255, 255, .19), rgba(255, 255, 255, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 5px 16px rgba(0, 0, 0, .2);
  color: rgba(255, 255, 255, .96);
}
[data-theme="dark"] .account-panel.account-profile .account-profile__actions button[data-account-logout] {
  border: 1px solid rgba(255, 112, 104, .42);
  background: linear-gradient(180deg, rgba(255, 79, 70, .27), rgba(184, 39, 35, .2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 5px 16px rgba(0, 0, 0, .2);
  color: #ffd0cb;
}

/* d1-search-inline-button-v1.css */
/* A single search field contains both the editable input and its action. */
[data-theme="dark"] .search-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 52px;
  padding: 0 7px 0 0;
  border: 1px solid rgba(238, 242, 248, .18);
  border-radius: .72rem;
  background: rgba(5, 8, 13, .48);
  box-shadow: inset 0 3px 9px rgba(0, 0, 0, .38), inset 0 1px 2px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .035), 0 8px 24px rgba(0, 0, 0, .14);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

[data-theme="dark"] .search-container:focus-within {
  border-color: rgba(255, 255, 255, .32);
  background: rgba(4, 7, 12, .58);
  box-shadow: inset 0 3px 9px rgba(0, 0, 0, .4), inset 0 1px 2px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .045), 0 0 0 3px rgba(255, 255, 255, .08), 0 12px 28px rgba(0, 0, 0, .18);
}

[data-theme="dark"] #site-search-input.search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0 80px 0 16px;
  border: 0;
  border-radius: 11px;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .72), 0 -1px 0 rgba(255, 255, 255, .035);
  font: inherit;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="dark"] #site-search-input.search-input::placeholder {
  color: rgba(240, 243, 248, .68);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .82), 0 -1px 0 rgba(255, 255, 255, .04);
}

[data-theme="dark"] #site-search-input.search-input:focus,
[data-theme="dark"] #site-search-input.search-input:focus-visible {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .search-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  box-shadow: none;
  color: rgba(255, 255, 255, .4);
  font: inherit;
  line-height: 1;
  opacity: .4;
  pointer-events: none;
  cursor: not-allowed;
  transform: translateY(-50%);
  transition: all 200ms ease;
}

[data-theme="dark"] .search-button.active:not(:disabled) {
  border: 1px solid rgba(255, 255, 255, .46);
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(225, 232, 241, .9));
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(0, 0, 0, .24);
  color: #11161d;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

[data-theme="dark"] .search-button.active:not(:disabled):hover,
[data-theme="dark"] .search-button.active:not(:disabled):focus-visible {
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #fff, rgba(238, 242, 248, .96));
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(0, 0, 0, .28);
  color: #11161d;
  transform: translateY(calc(-50% - 1px));
}

[data-theme="dark"] .search-button.active:not(:disabled):active {
  transform: translateY(-50%) scale(.97);
}

/* Minimal transparent return action aligned to the article heading edge. */
[data-theme="dark"] main.site-main .article .article__home-link {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  aspect-ratio: 1 / 1;
  flex: 0 0 40px;
  margin: 0 0 14px;
  margin-left: 0;
  padding: 0;
  padding-left: 0;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(225, 232, 241, .92));
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(0, 0, 0, .24);
  color: #11161d;
  line-height: 1;
  text-decoration: none;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

[data-theme="dark"] main.site-main .article .article__home-link svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] main.site-main .article .article__home-link:hover,
[data-theme="dark"] main.site-main .article .article__home-link:focus-visible {
  background: linear-gradient(180deg, #fff, rgba(238, 242, 248, .98));
  box-shadow: inset 0 1px 0 #fff, 0 7px 18px rgba(0, 0, 0, .3);
  color: #080a0d;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  [data-theme="dark"] .search-container {
    background: rgba(5, 8, 13, .48);
    box-shadow: inset 0 3px 9px rgba(0, 0, 0, .38), inset 0 1px 2px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .035), 0 8px 24px rgba(0, 0, 0, .14);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
  }

  [data-theme="dark"] .search-container:focus-within {
    background: rgba(4, 7, 12, .58);
    box-shadow: inset 0 3px 9px rgba(0, 0, 0, .4), inset 0 1px 2px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .045), 0 0 0 3px rgba(255, 255, 255, .08), 0 12px 28px rgba(0, 0, 0, .18);
  }

  [data-theme="dark"] #site-search-input.search-input {
    text-shadow: 0 1px 2px rgba(0, 0, 0, .72), 0 -1px 0 rgba(255, 255, 255, .035);
  }

  [data-theme="dark"] #site-search-input.search-input::placeholder {
    text-shadow: 0 1px 2px rgba(0, 0, 0, .82), 0 -1px 0 rgba(255, 255, 255, .04);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .search-container,
  [data-theme="dark"] .search-button {
    transition: none;
  }
}

/* White primary controls keep their Apple-white face while hovered or focused. */
[data-theme="dark"] :is(
  .community [type="submit"],
  .account-panel form > button[type="submit"],
  .account-profile__actions [data-account-save],
  .account-auth-view--verify button[type="submit"],
  .board-compose__footer [data-board-post-submit],
  .board-reply-form button,
  .search-button.active:not(:disabled),
  main.site-main .article .article__home-link
):is(:hover, :focus-visible):not(:disabled) {
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #fff, rgba(238, 242, 248, .96));
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(0, 0, 0, .28);
  color: #11161d;
}
