/* ==========================================================
   Quark 的月面通信室 — 2000 年代个人主页风格
   ========================================================== */

:root {
  --sky: #7fd6dc;
  --sky-deep: #3b9cba;
  --mint: #d3f6ef;
  --paper: #fffbe8;
  --cream: #fff3b8;
  --ink: #1d3f63;
  --muted: #557489;
  --link: #1a4fd6;
  --visited: #7346a6;
  --pink: #ef4c72;
  --orange: #f08a3a;
  --gold: #e3a700;
  --lcd: #34ff5a;
  --edge: 2px solid var(--ink);
  --drop: 4px 4px 0 rgba(29, 63, 99, .22);
  --sidebar-w: 250px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: Consolas, "Courier New", "MS Gothic", monospace;
}

/* ---------- 底色：水色墙纸 + 四角星 ---------- */

body {
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  background-color: var(--sky);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M30 18l3 9 9 3-9 3-3 9-3-9-9-3 9-3z' fill='%23fffde8' fill-opacity='.8'/%3E%3Cpath d='M90 76l2 6 6 2-6 2-2 6-2-6-6-2 6-2z' fill='%23fffde8' fill-opacity='.55'/%3E%3Ccircle cx='92' cy='26' r='2' fill='%23fff' fill-opacity='.7'/%3E%3Ccircle cx='24' cy='92' r='1.6' fill='%23fff' fill-opacity='.6'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #9be2e4 0%, var(--sky) 40%, #6bc8d6 100%);
  background-attachment: fixed;
}

a { color: var(--link); text-underline-offset: 3px; }
a:visited { color: var(--visited); }
a:hover, a:focus-visible { color: var(--pink); background: #fff59a; }
::selection { background: #fff28e; color: var(--ink); }

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; }

/* ---------- 侧栏：奶油色格子纸 ---------- */

#quarto-sidebar {
  padding: 18px 14px 28px;
  background-color: var(--cream) !important;
  background-image:
    linear-gradient(45deg, rgba(227, 167, 0, .12) 25%, transparent 25% 75%, rgba(227, 167, 0, .12) 75%),
    linear-gradient(45deg, rgba(227, 167, 0, .12) 25%, transparent 25% 75%, rgba(227, 167, 0, .12) 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
  border-right: 4px double #d39b2a;
}

@media (min-width: 992px) {
  #quarto-sidebar { width: var(--sidebar-w); }
}

.sidebar-header { text-align: center; }

.sidebar-logo {
  display: block;
  width: 96px;
  max-width: 96px;
  margin: 0 auto 6px;
  padding: 0;
  filter: drop-shadow(3px 3px 0 rgba(29, 63, 99, .25));
}

.sidebar-title {
  margin: 0 0 6px !important;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
}

.sidebar-title a, .sidebar-title a:visited { color: var(--ink); }

.sidebar-title::after {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .3em;
  content: "- MENU -";
}

.sidebar-menu-container { padding-top: 4px; }

.sidebar-item { margin: 2px 0; }

.sidebar-item-container .sidebar-item-text,
.sidebar-item-container a,
.sidebar-item-container a:visited {
  padding: 4px 8px;
  color: #0000ee;
  font-size: 1.05rem;
  background: none;
  border-radius: 0;
}

.sidebar-item-container a:hover,
.sidebar-item-container a.active,
.sidebar-item-container a.active .menu-text {
  color: #d10000 !important;
  font-weight: 400;
  background: rgba(255, 255, 255, .55);
}

.sidebar-item-container a.active .menu-text::after { content: " ◀"; font-size: .8em; }

.sidebar-item a[href$="writing.html"] .menu-text::after {
  margin-left: 4px;
  color: var(--pink);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  vertical-align: super;
  content: "NEW!";
  animation: blink 1.2s steps(1) infinite;
}

/* BGM 小窗 */
.sidebar-extra { margin-top: 18px; }

.bgm {
  padding: 8px 10px 10px;
  font-size: .8rem;
  line-height: 1.4;
  background: var(--paper);
  border: var(--edge);
  box-shadow: 3px 3px 0 rgba(29, 63, 99, .2);
}

.bgm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -8px -10px 7px;
  padding: 3px 8px;
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  background: linear-gradient(90deg, var(--sky-deep), #79cfe0);
  border-bottom: var(--edge);
}

.bgm-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 11px; }
.bgm-eq i { width: 3px; height: 3px; background: #fff59a; }
.bgm.playing .bgm-eq i { animation: eq .8s ease-in-out infinite alternate; }
.bgm.playing .bgm-eq i:nth-child(2) { animation-delay: -.3s; }
.bgm.playing .bgm-eq i:nth-child(3) { animation-delay: -.55s; }
@keyframes eq { to { height: 11px; } }

.bgm-now {
  min-height: 2.8em;
  margin-bottom: 6px;
  color: var(--muted);
  text-align: center;
}

.bgm-buttons {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 4px;
}

.bgm button {
  padding: 2px 0;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  background: #fffef6;
  border: 2px outset #e6d38f;
}

.bgm button:active { border-style: inset; }

.bgm-volume { width: 100%; margin-top: 8px; accent-color: var(--sky-deep); }

/* 88×31 风小徽章 */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-top: 14px;
}

.badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 26px;
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  border: 1px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
}

.b-moon { color: #fff59a; background: linear-gradient(#1d3f63, #3b6f9a); }
.b-free { color: #fff; background: repeating-linear-gradient(-45deg, var(--pink) 0 4px, #f46d8e 4px 8px); }
.b-rss { color: #fff; background: var(--orange); }

/* ---------- 主区域 ---------- */

main.content {
  width: 100%;
  max-width: min(980px, 100% - 56px);
  margin-inline: auto !important;
  padding-bottom: 60px;
  align-self: start;
}

.page-navigation { max-width: 980px; margin-inline: auto; }

@media (min-width: 992px) {
  #quarto-content > main.content,
  #quarto-content > .page-navigation { grid-column: body-content-start / screen-end-inset !important; }
}

.quarto-title-block {
  margin: 18px 0 22px;
  padding: 18px 20px 14px;
  text-align: center;
  background: var(--paper);
  border: 3px double var(--ink);
  box-shadow: var(--drop);
}

.quarto-title-block .title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  text-shadow: 2px 2px 0 var(--cream);
}

.quarto-title-block .title::before { color: var(--pink); content: "☆ "; }
.quarto-title-block .title::after { color: var(--pink); content: " ☆"; }

.quarto-title-block .description,
.quarto-title-block .subtitle { margin: 4px 0 0; color: var(--muted); }

.quarto-title-meta { justify-content: center; margin-top: 8px; font-family: var(--mono); font-size: .8rem; }
.quarto-title-meta-heading { color: var(--muted); }
.quarto-categories { justify-content: center; }

.quarto-category,
.listing-category {
  padding: 0 7px !important;
  color: #7a2f52 !important;
  font-size: .72rem !important;
  background: #ffe8a8;
  border: 1px solid #d3a24a !important;
  border-radius: 0 !important;
}

/* 统一的信纸容器：Quarto 会把正文直接放在 main 里，用阴影卡片包起来 */
body:not(:has(.home)):not(:has(.project-grid)):not(:has(.quarto-listing)) main.content {
  padding: 0 28px 28px;
  margin-top: 18px;
  background:
    repeating-linear-gradient(transparent 0 31px, rgba(59, 156, 186, .12) 31px 32px),
    var(--paper);
  border: var(--edge);
  box-shadow: var(--drop);
}

body:not(:has(.home)):not(:has(.project-grid)):not(:has(.quarto-listing)) main.content .quarto-title-block {
  margin: 0 -28px 22px;
  border-width: 0 0 3px;
  border-bottom-style: double;
  box-shadow: none;
  background: linear-gradient(180deg, var(--mint), var(--paper));
}

section.level2 > h2 {
  margin-top: 1.8em;
  padding-bottom: 4px;
  font-size: 1.3rem;
  border-bottom: 2px dashed rgba(59, 156, 186, .55);
}

section.level2 > h2::before { margin-right: 6px; color: var(--pink); content: "◆"; }
section.level3 > h3::before { margin-right: 6px; color: var(--sky-deep); content: "▸"; }

main.content blockquote {
  padding: 8px 16px;
  color: var(--muted);
  background: var(--mint);
  border-left: 5px solid var(--pink);
}

main.content img { max-width: 100%; }

pre, div.sourceCode {
  border: 2px solid var(--ink) !important;
  border-radius: 0 !important;
  box-shadow: 3px 3px 0 rgba(29, 63, 99, .15);
}

code { font-family: var(--mono); color: #b0285a; }
pre code { color: inherit; }

main.content table:not(.directory) {
  border: 2px solid var(--ink);
}

main.content table:not(.directory) th { background: var(--mint); }

/* 文章内折叠目录 */
#quarto-margin-sidebar { display: none !important; }

.inline-toc {
  margin: -6px auto 24px;
  max-width: 560px;
  font-size: .9rem;
  background: var(--mint);
  border: 1px dashed var(--sky-deep);
}

.inline-toc summary { padding: 6px 12px; font-weight: 700; cursor: pointer; text-align: center; }
.inline-toc #TOC { padding: 2px 14px 10px; }
.inline-toc #toc-title { display: none; }
.inline-toc #TOC a { color: var(--link); border-left: 0 !important; }

/* ---------- 窗口组件 ---------- */

.win {
  margin: 0;
  background: var(--paper);
  border: var(--edge);
  box-shadow: var(--drop);
}

.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px 3px 10px;
  color: #fff;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .25);
  background: linear-gradient(90deg, var(--sky-deep), #8fdbe6);
  border-bottom: var(--edge);
}

.win-btns::before {
  color: var(--ink);
  font-style: normal;
  font-size: .7rem;
  letter-spacing: 3px;
  text-shadow: none;
  content: "▁ ▢ ✕";
}

/* ---------- 首页 ---------- */

.home { max-width: 960px; margin: 0 auto; padding-top: 22px; }

.visitor-line {
  margin: 0 0 22px;
  font-size: 1.15rem;
  text-align: center;
}

.visitor-count {
  display: inline-flex;
  gap: 2px;
  margin: 0 6px;
  padding: 3px;
  vertical-align: middle;
  background: #0b0f0c;
  border: 2px inset #8aa;
}

.visitor-count span {
  width: 1.05em;
  color: var(--lcd);
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 6px rgba(52, 255, 90, .75);
  background: #142118;
}

.home-top {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
}

.art-win img { display: block; width: 100%; height: auto; }

.home-side { display: flex; flex-direction: column; gap: 14px; }

.log {
  height: 170px;
  margin: 0;
  padding: 10px 14px 10px 30px;
  overflow-y: auto;
  font-size: .9rem;
  list-style: "✿ ";
}

.log li { margin-bottom: 8px; }
.log li::marker { color: var(--pink); }
.log time { display: block; color: var(--pink); font-family: var(--mono); font-size: .8rem; font-weight: 700; }

.clap-area { text-align: center; }

.web-clap {
  padding: 4px 18px;
  color: #c27400;
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  background: #fffef4;
  border: 2px solid var(--gold);
  box-shadow: 2px 2px 0 rgba(227, 167, 0, .45);
}

.web-clap:hover { background: #fff7c2; }
.web-clap.bump { animation: bump .3s ease-out; }
@keyframes bump { 40% { transform: scale(1.12) rotate(-3deg); } }

.clap-result { display: block; min-height: 1.5em; margin-top: 4px; color: var(--pink); font-size: .85rem; }

.notice {
  margin: 34px auto 26px;
  text-align: center;
}

.notice h2 { margin: 0 0 8px; font-size: 1.35rem; border: 0; }
.notice p { margin: 2px 0; }

.blink-soft { color: var(--pink); animation: soft 2.4s ease-in-out infinite; }
@keyframes soft { 50% { color: var(--sky-deep); } }

.directory {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 34px;
  background: rgba(255, 251, 232, .78);
  border: 3px double var(--ink);
  border-collapse: collapse;
  box-shadow: var(--drop);
}

.directory th, .directory td { padding: 6px 14px; border: 1px solid var(--sky-deep); }
.directory th { color: #fff; font-family: var(--mono); font-weight: 700; background: var(--sky-deep); }
.directory td:first-child { width: 34%; font-weight: 700; white-space: nowrap; }
.directory .new { vertical-align: super; color: var(--pink); font-family: var(--mono); font-size: .7rem; animation: blink 1.2s steps(1) infinite; }

.section-title {
  margin: 10px 0 6px;
  font-size: 1.3rem;
  text-align: center;
}

.section-title::before, .section-title::after { color: var(--pink); content: " ～☆～ "; }

body:has(.home) .quarto-title-block { display: none; }
body:has(.home) #listing-listing,
body:has(.home) .quarto-listing { max-width: 760px; margin: 0 auto; }

/* ---------- 文章列表 ---------- */

.quarto-listing { margin-top: 14px; }

.quarto-post {
  margin-bottom: 12px;
  padding: 12px 16px !important;
  background: var(--paper);
  border: var(--edge) !important;
  box-shadow: 3px 3px 0 rgba(29, 63, 99, .18);
  transition: transform .12s, box-shadow .12s;
}

.quarto-grid-item.card {
  overflow: hidden;
  background: var(--paper);
  border: var(--edge) !important;
  border-radius: 0 !important;
  box-shadow: var(--drop);
  transition: transform .12s, box-shadow .12s;
}

.quarto-post:hover, .quarto-grid-item.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(29, 63, 99, .24);
}

.quarto-grid-item .card-img-top {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: var(--edge);
  border-radius: 0;
}

.quarto-grid-item .card-body { padding: 12px 14px; }

.listing-title, .quarto-post .listing-title { color: var(--link); font-weight: 700; }
.listing-date, .quarto-post .metadata { color: var(--pink); font-family: var(--mono); font-size: .78rem; }
.listing-description { color: var(--muted); }
.quarto-listing div.quarto-post { display: flex; gap: 18px; align-items: baseline; }
.quarto-listing div.quarto-post .metadata { flex: 0 0 auto; order: -1; margin: 0; padding: 0; }
.quarto-listing div.quarto-post .body { flex: 1 1 auto; min-width: 0; }
.quarto-post .listing-title { margin: 0 0 2px; font-size: 1.1rem; }
.quarto-post .listing-description p { margin: 4px 0 0; }
.quarto-post .delink a { color: var(--muted); text-decoration: none; background: none; }
.quarto-post .thumbnail { display: none; }

.quarto-listing-category { font-size: .9rem; }
.quarto-listing-category .category { padding: 2px 4px; cursor: pointer; }
.quarto-listing-category .category.active { color: #d10000; font-weight: 700; }

.listing-actions-group .form-control,
.listing-actions-group .input-group-text { border-radius: 0; border-color: var(--ink); }

/* ---------- 按钮 ---------- */

.retro-button, .retro-button:visited {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 4px 14px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(#fffef4, #f7ebb8);
  border: 2px outset #e3d08c;
}

.retro-button:hover { color: var(--pink); background: #fff59a; }
.retro-button:active { border-style: inset; }

/* ---------- 项目 ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.project-card {
  padding: 18px 22px 22px;
  text-align: center;
  background: var(--paper);
  border: 3px double var(--ink);
  box-shadow: var(--drop);
}

.project-card h2 { margin: 6px 0 0; font-size: 1.2rem; border: 0; }

.project-no {
  display: inline-block;
  padding: 1px 8px;
  color: #fff;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  background: var(--pink);
}

.pixel-grid {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  gap: 4px;
  width: fit-content;
  margin: 16px auto;
  padding: 6px;
  background: var(--ink);
}

.pixel-grid i { width: 30px; height: 30px; background: #ef545d; }
.pixel-grid i:nth-child(2), .pixel-grid i:nth-child(6) { background: #68d6d0; }
.pixel-grid i:nth-child(3), .pixel-grid i:nth-child(7) { background: #f3d64f; }
.pixel-grid i:nth-child(5) { background: #fffbe8; }
.pixel-grid i:nth-child(8) { background: #6284d3; }

.radar-art {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 16px auto;
  overflow: hidden;
  background: repeating-radial-gradient(circle, transparent 0 15px, #4aa9a7 16px 17px), #d9f4df;
  border: 4px double var(--ink);
  border-radius: 50%;
}

.radar-art::before {
  position: absolute;
  inset: 0 0 50% 50%;
  content: "";
  background: conic-gradient(from 90deg at 0 100%, rgba(37, 153, 131, .7), transparent 50deg);
  transform-origin: 0 100%;
  animation: spin 3s linear infinite;
}

.radar-art span {
  position: absolute;
  top: 28px;
  left: 66px;
  width: 9px;
  height: 9px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--pink);
}

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


.construction-sign {
  width: fit-content;
  margin: 10px auto 0;
  padding: 6px 20px;
  color: #5c3519;
  font-weight: 700;
  background: repeating-linear-gradient(-45deg, #ffd756 0 10px, #f5a743 10px 20px);
  border: 3px outset #ecbc45;
}

/* ---------- 关于我 ---------- */

.profile {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  margin: 8px 0 10px;
}

.profile-avatar, .profile img {
  width: 150px;
  height: 150px;
  filter: drop-shadow(4px 4px 0 rgba(29, 63, 99, .22));
}

.profile-copy h2 { margin-top: 0; border: 0; }

/* ---------- 404 ---------- */

.not-found { padding: 20px 0; text-align: center; }
.not-found-title { display: block; color: var(--pink); font-size: 1.5rem; font-weight: 700; }

/* ---------- 页脚 ---------- */

.nav-footer {
  color: #e8ffff;
  font-family: var(--mono);
  font-size: .78rem;
  background: var(--ink);
  border-top: 4px double var(--cream);
}

.nav-footer a, .nav-footer a:visited { color: #fff59a; }

.nav-page a { background: var(--paper); border: var(--edge); padding: 6px 10px; }

/* ---------- 鼠标星屑 ---------- */

.spark {
  position: fixed;
  z-index: 9999;
  width: 10px;
  height: 10px;
  pointer-events: none;
  background: var(--c, #fff59a);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  transform: translate(-50%, -50%);
  animation: spark .7s ease-out forwards;
}

@keyframes spark { to { opacity: 0; transform: translate(-50%, 40%) rotate(90deg) scale(.2); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 窄屏 ---------- */

@media (max-width: 991px) {
  #quarto-sidebar { border-right: 0; border-bottom: 4px double #d39b2a; }
  .home-top { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .visitor-line { font-size: 1rem; }
  .visitor-count span { font-size: 1.1rem; }
  .profile { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  body:not(:has(.home)):not(:has(.project-grid)):not(:has(.quarto-listing)) main.content { padding: 0 16px 20px; }
  body:not(:has(.home)):not(:has(.project-grid)):not(:has(.quarto-listing)) main.content .quarto-title-block { margin: 0 -16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 项目卡片小画 ---------- */

.chip-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 16px auto;
  color: #7af5d6;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .1em;
  background: var(--ink);
  border: 4px solid #2c5a84;
  outline: 6px dashed #c9a640;
  outline-offset: 2px;
}

.chat-art {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 150px;
  margin: 14px auto;
  font-size: .78rem;
}

.chat-art span {
  width: fit-content;
  padding: 2px 10px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px 12px 12px 2px;
}

.chat-art span:nth-child(2) {
  align-self: flex-end;
  background: #c8f5c0;
  border-radius: 12px 12px 2px 12px;
}

.medal-art {
  margin: 10px auto;
  font-size: 4.2rem;
  line-height: 1.3;
  filter: drop-shadow(3px 3px 0 rgba(29, 63, 99, .25));
}

.relay-art {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 26px auto;
  font-family: var(--mono);
  font-size: .8rem;
}

.relay-art b { padding: 4px 8px; color: #fff; background: var(--sky-deep); border: 2px solid var(--ink); }
.relay-art b:nth-child(3) { color: var(--ink); background: var(--cream); }
.relay-art i { color: var(--pink); font-style: normal; font-weight: 700; }

.project-card .retro-button { margin-top: 6px; }
main.content h3 small { color: var(--muted); font-size: .8rem; font-weight: 400; }

.project-card h2, .profile-copy h2 { border: 0 !important; }
.project-card h2::before, .profile-copy h2::before { content: none !important; }
section.level3 > h3 { margin-top: 1.4em; font-size: 1.12rem; }

/* ---------- 中英切换 ---------- */

html:not(.lang-zh) .zh, html.lang-zh .en { display: none !important; }
.feed-sep { display: none; } /* 只在 RSS 里把中英标题隔开 */

.lang-switch {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.lang-switch button {
  padding: 2px 12px;
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  background: #fffef6;
  border: 2px outset #e6d38f;
}

.lang-switch button.on { color: #fff; background: var(--sky-deep); border-style: inset; }

body.is-loading main.content { opacity: .55; transition: opacity .15s; }

.profile-avatar, .profile img {
  image-rendering: pixelated;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(29, 63, 99, .22);
  filter: none;
}

/* 窄屏：宽表格在自身框内横向滚动，不撑破页面 */
@media (max-width: 767.98px) {
  main.content table { display: block; max-width: 100%; overflow-x: auto; }
  main.content a { overflow-wrap: anywhere; }
}
