:root {
  --ink: #111;
  --muted: #444;
  --bg: #fffdf3;
  --yellow: #ffed2a;
  --font: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", Arial, sans-serif;
  --font-noto: "Noto Sans", "NotoSans-Regular", var(--font);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #fff9d6 0%, var(--bg) 180px, #fff 100%);
  -webkit-font-smoothing: antialiased;
}
.top {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 237, 42, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow: visible;
}
.top a.back-link,
.top a.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.top .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  margin-right: auto;
}
.top .brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.lang {
  position: relative;
  z-index: 1001;
}
.lang-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 30px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  font-family: "Noto Sans", "NotoSans-Regular", var(--font);
  font-size: 18px;
  font-weight: 400;
  color: #333;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: none;
}
.lang-btn:hover,
.lang-btn:focus,
.lang-btn:focus-visible {
  color: #333;
  outline: none;
  background: transparent;
}
.lang-text {
  color: inherit;
  font-size: 18px;
  white-space: nowrap;
}
.lang-caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  flex: 0 0 auto;
  border-style: solid;
  border-width: 5px 4px 0;
  border-color: #333 transparent transparent;
  background: none;
  transition: transform 0.2s ease;
  transform-origin: 50% 40%;
}
.lang.is-open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  width: max-content;
  margin: 0;
  padding: 5px 0;
  list-style: none;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  z-index: 1002;
}
.lang.is-open .lang-menu { display: block; }
.lang-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 16px;
  font-family: "Noto Sans", "NotoSans-Regular", var(--font);
  font-size: 14px;
  color: #515a6e;
  white-space: nowrap;
  cursor: pointer;
}
.lang-option:hover { background: #f3f3f3; }
.lang-option.is-active,
.lang-option.is-active:hover {
  background: #f0faff;
  color: #2d8cf0;
}
html[dir="rtl"] .lang-btn { padding: 0 4px; }
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-option { text-align: right; }
html[dir="rtl"] .lang-caret { margin-left: 0; margin-right: 6px; }
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.article {
  font-size: 14px;
  line-height: 1.55;
  color: #111;
  word-break: break-word;
  min-height: 200px;
}
.article img { max-width: 100%; height: auto; }
.article a { color: #2f6fdb; }
.article table { width: 100%; border-collapse: collapse; }
.loading {
  color: #666;
  padding: 40px 0;
  text-align: center;
}
html[dir="rtl"] .lang-btn { padding: 0 4px; }
html[dir="rtl"] .lang-caret { margin-left: 0; margin-right: 6px; }
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-option { text-align: right; }
html[dir="rtl"] .article { direction: rtl; }
@media (max-width: 640px) {
  .wrap { padding: 20px 14px 48px; }
  .article { font-size: 13px; }
}
