
:root {
  --ink: #101114;
  --muted: #60636a;
  --paper: #f4f1e9;
  --panel: #fffdf8;
  --line: #d9d5cc;
  --accent: #d5533c;
  --accent-dark: #a93628;
  --teal: #2d6c6a;
  --teal-pale: #dceae8;
  --red-pale: #f6e4df;
  --gray-pale: #eceae5;
  --shadow: 0 18px 50px rgba(27, 39, 42, 0.09);
  --sidebar-width: 310px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(213, 83, 60, 0.38);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 70px auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 30px 20px 92px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  color: #edf3f2;
  background: var(--ink);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar-toggle {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dce6e7;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.sidebar-toggle span {
  font-size: 23px;
  line-height: 1;
}

.sidebar-toggle-close {
  position: absolute;
  top: 30px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.sidebar-toggle-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-toggle-open {
  position: fixed;
  top: 100px;
  left: 0;
  z-index: 45;
  display: none;
  width: 40px;
  height: 44px;
  border-left: 0;
  border-radius: 0 11px 11px 0;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 9px 24px rgba(21, 33, 38, 0.2);
}

.sidebar-toggle-open:hover { background: var(--accent-dark); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  margin: 0 52px 26px 4px;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: 0.03em; }
.brand small { margin-top: 3px; color: #9fb0b2; font-size: 13px; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 25px;
  padding: 0 10px 0 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
}
.search-box input::placeholder { color: #8fa0a3; }
.search-box input::-webkit-search-cancel-button { filter: invert(1); }
.shot-nav > p {
  margin: 0 8px 11px;
  color: #7f9295;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shot-nav button {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 2px 0;
  padding: 6px 10px;
  text-align: left;
  border: 0;
  border-radius: 11px;
  color: #b8c6c7;
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.shot-nav button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.shot-nav button.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.shot-nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.shot-nav button.dimmed { opacity: 0.32; }
.shot-nav button > span:first-child { color: #819294; font-size: 11px; font-variant-numeric: tabular-nums; }
.shot-nav button strong,
.shot-nav button small { display: block; }
.shot-nav button strong { font-size: 15px; font-weight: 650; }
.shot-nav button small { margin-top: 2px; color: #829497; font-size: 11px; }

.about-link {
  position: fixed;
  left: 20px;
  right: calc(100vw - var(--sidebar-width) + 20px);
  bottom: 22px;
  z-index: 2;
  width: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #dce6e7;
  background: var(--ink);
  text-decoration: none;
}
.about-link span {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--teal-pale);
  font-size: 12px;
  font-weight: 800;
}
.about-link strong { font-size: 12px; line-height: 1.35; }
.about-link:hover { color: #fff; border-color: rgba(255, 255, 255, 0.26); }

.group-navigation { display: grid; gap: 10px; }
.mobile-directory-backdrop,
.mobile-directory-sheet-header,
.mobile-directory-fab { display: none; }
.mobile-directory-sheet { display: contents; }
.nav-group {
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}
.group-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
}
.group-link {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 2px 8px;
  min-height: 54px;
  padding: 8px 6px 8px 11px;
  text-align: left;
  border: 0;
  color: #dce6e6;
  background: transparent;
  cursor: pointer;
}
.group-toggle {
  display: grid;
  place-items: center;
  min-width: 46px;
  padding: 0;
  border: 0;
  color: #849799;
  background: transparent;
  cursor: pointer;
}
.group-toggle span {
  display: block;
  font-size: 21px;
  line-height: 1;
}
.expanded-group > .group-link-row .group-toggle span { transform: rotate(90deg); }
.group-link:hover,
.group-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.active-group > .group-link-row { background: rgba(255, 255, 255, 0.08); }
.group-link:focus-visible,
.group-toggle:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.group-link > span { grid-row: 1 / 3; color: var(--accent); font-size: 12px; font-weight: 800; }
.group-link strong { font-size: 15px; }
.group-link small { grid-column: 2; color: #849799; font-size: 10px; }
.nav-items { display: none; padding: 4px 6px 8px; }
.expanded-group .nav-items,
.group-navigation.searching .nav-items { display: block; }
.nav-items button {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 5px 9px;
  text-align: left;
  border: 0;
  border-radius: 9px;
  color: #b8c6c7;
  background: transparent;
  cursor: pointer;
}
.nav-items button:hover,
.nav-items button.active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav-items button.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav-items button.dimmed { opacity: 0.25; }
.nav-items button > span:first-child { color: #819294; font-size: 10px; }
.nav-items button strong,
.nav-items button small { display: block; }
.nav-items button strong { font-size: 14px; }
.nav-items button small { max-width: 175px; margin-top: 2px; overflow: hidden; color: #829497; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.future-groups { display: grid; gap: 6px; margin-top: 3px; }
.future-groups > div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 2px 8px;
  padding: 9px 12px;
  border-radius: 11px;
  color: #728487;
  background: rgba(255, 255, 255, 0.025);
}
.future-groups span { grid-row: 1 / 3; font-size: 10px; }
.future-groups strong { font-size: 12px; }
.future-groups small { grid-column: 2; font-size: 9px; }

main {
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 0 clamp(28px, 4.6vw, 78px) 60px;
}

@media (min-width: 901px) {
  .app-shell.sidebar-collapsed .sidebar { display: none; }
  .app-shell.sidebar-collapsed main { margin-left: 0; }
  .app-shell.sidebar-collapsed .sidebar-toggle-open { display: grid; }
}

.section-heading span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.rules-panel {
  margin: 0 0 64px;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.rules-heading {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 22px;
}
.rules-heading h3 { margin: 0; font-size: 16px; font-weight: 700; }

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.rules-grid > div {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  min-height: 120px;
  padding: 20px;
  background: #fff;
}
.rules-grid > div > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--accent-dark);
  background: var(--red-pale);
  font-size: 12px;
  font-weight: 800;
}
.rules-grid p { margin: 1px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.rules-grid strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 14px; }

.quick-strip {
  margin-bottom: 32px;
  padding-top: 58px;
  scroll-margin-top: 20px;
}
.guide-group + .guide-group {
  margin-top: 100px;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.section-heading h2 { margin: 7px 0 0; font-size: 32px; letter-spacing: -0.03em; }
.section-heading p { max-width: 520px; margin: 0 0 3px; color: var(--muted); font-size: 14px; }
.section-meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.section-meta em {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-pale);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.quick-grid button {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.quick-grid button:hover { transform: translateY(-3px); border-color: #c3bbb0; box-shadow: 0 13px 30px rgba(30, 43, 46, 0.09); }
.quick-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--gray-pale); }
.quick-grid button > span { display: block; padding: 11px 12px 12px; }
.quick-grid strong,
.quick-grid small { display: block; }
.quick-grid strong { font-size: 14px; }
.quick-grid small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.cards { display: grid; gap: 34px; }

.shot-card {
  scroll-margin-top: 26px;
  padding: clamp(26px, 3.4vw, 46px);
  border-radius: 21px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.shot-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.shot-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 36px;
  border-radius: 18px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.shot-header > div { min-width: 0; }
.title-line { display: flex; align-items: baseline; gap: clamp(12px, 1.8vw, 28px); min-width: 0; }
.shot-header h2 { flex: 0 0 auto; margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.03em; }
.english-title {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.variant-badge {
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--accent-dark);
  background: var(--red-pale);
  font-size: 11px;
  font-weight: 700;
}
.abbr-badge {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 15px;
  color: var(--teal);
  background: var(--teal-pale);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.group-progress {
  display: flex;
  align-items: baseline;
  justify-self: end;
  gap: 8px;
  margin: 0;
  color: var(--accent);
  font-size: clamp(14px, 1.35vw, 19px);
  font-weight: 700;
  white-space: nowrap;
}
.group-progress strong { font-size: 1.05em; font-weight: 850; }

.definition {
  margin: 27px 0 30px;
  padding: 18px 22px;
  border-radius: 13px;
  color: #fff;
  background: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.7;
}

.shot-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(470px, 1.28fr);
  grid-template-rows: auto auto;
  column-gap: clamp(24px, 3.2vw, 48px);
  row-gap: 10px;
  align-items: center;
}

.shot-copy dl { display: grid; gap: 9px; margin: 0; }
.info-item {
  padding: 14px 16px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
}
.info-item dt {
  margin-bottom: 7px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 750;
}
.info-item dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.72;
}
.split-info { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.info-good { background: var(--teal-pale); border-color: transparent; }
.info-bad { background: var(--red-pale); border-color: transparent; }
.info-bad dt { color: var(--accent-dark); }

.shot-visuals { min-width: 0; }
.image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: zoom-in;
}
.image-button::after {
  content: "＋";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: rgba(21, 33, 38, 0.78);
  opacity: 0;
  transition: opacity 150ms ease;
}
.image-button:hover::after { opacity: 1; }
.image-button img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 220ms ease; }
.image-button:hover img { transform: scale(1.015); }
.image-label {
  position: absolute;
  left: 9px;
  bottom: 9px;
  max-width: calc(100% - 18px);
  padding: 6px 8px;
  border-radius: 7px;
  color: #fff;
  background: rgba(21, 33, 38, 0.82);
  font-size: 12px;
  line-height: 1.3;
  backdrop-filter: blur(7px);
}
.hero-image {
  border-width: 2px;
  border-color: rgba(213, 83, 60, 0.34);
  box-shadow: 0 14px 34px rgba(27, 39, 42, 0.1);
}
.hero-image .image-label {
  padding: 8px 10px;
  background: rgba(169, 54, 40, 0.94);
  font-size: 13px;
  font-weight: 750;
}
.motion-video {
  position: relative;
  overflow: hidden;
  border-style: solid;
  border-radius: 13px;
  background: var(--ink);
}
.motion-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--paper);
}
.motion-video video:fullscreen,
.motion-video video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  aspect-ratio: auto;
  object-fit: contain;
  background: #000;
}
.motion-video video:fullscreen + .motion-video-label,
.motion-video video:-webkit-full-screen + .motion-video-label { display: none; }
.motion-video-label {
  position: absolute;
  left: 11px;
  top: 11px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 7px;
  color: #fff;
  background: rgba(169, 54, 40, 0.94);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  pointer-events: none;
}
.card-verdicts {
  grid-column: 1 / -1;
  gap: 10px;
}
.card-verdicts .info-item { padding: 14px 16px; }

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 40px;
  text-align: center;
  border: 1px dashed #c8c1b8;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
}
.empty-state span { font-size: 25px; font-weight: 700; }
.empty-state p { margin: 8px 0 20px; color: var(--muted); font-size: 15px; }
.empty-state button { padding: 10px 14px; border: 0; border-radius: 9px; color: #fff; background: var(--ink); cursor: pointer; }

.source-note {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 2.3fr);
  gap: clamp(24px, 4vw, 64px);
  margin-top: 54px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
}
.source-note span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
.source-note h2 { margin: 8px 0 0; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.15; }
.source-copy { display: grid; gap: 13px; }
.source-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.source-copy strong { color: var(--ink); }
.source-copy .source-pipe { color: var(--accent); font-size: 1em; letter-spacing: 0; }

.quick-return {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  transform: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(21, 33, 38, 0.18);
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}
.quick-return span { font-size: 21px; line-height: 1; }
.quick-return:hover { transform: translateY(-2px); background: var(--accent-dark); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(8, 13, 15, 0.9); cursor: zoom-out; }
.lightbox figure { position: relative; z-index: 1; width: min(1100px, 92vw); margin: 0; }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4); }
.lightbox figcaption { margin-top: 11px; color: #d9e1e1; font-size: 14px; }
.lightbox figure > button { position: absolute; right: 0; top: -42px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 270px; }
  main { padding-inline: 34px; }
  .shot-grid { grid-template-columns: 1fr; align-items: stretch; }
  .title-line { flex-wrap: wrap; row-gap: 6px; }
  .english-title { white-space: normal; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 0px; }
  .sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    padding: 19px 22px 15px;
    overflow: visible;
  }
  .sidebar-toggle { display: none; }
  .brand { margin: 0 0 15px; }
  .search-box { margin-bottom: 14px; }
  .shot-nav { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .shot-nav > p { display: none; }
  .shot-nav button { flex: 0 0 134px; margin: 0; }
  .group-navigation { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .about-link { position: static; width: auto; margin-top: 12px; }
  .nav-group { flex: 0 0 175px; }
  .group-link { min-height: 50px; }
  .nav-items, .future-groups { display: none; }
  .expanded-group .nav-items, .group-navigation.searching .nav-items { display: block; }
  main { margin-left: 0; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  main { padding-inline: 17px; }
  .quick-strip { padding-top: 38px; }
  .rules-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .section-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .shot-card { padding: 22px 17px; border-radius: 16px; }
  .shot-header { grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
  .title-line { flex-wrap: wrap; column-gap: 10px; row-gap: 3px; }
  .english-title { font-size: 16px; white-space: normal; }
  .shot-number { width: 40px; height: 32px; }
  .group-progress { grid-column: 2; justify-self: start; margin-top: 5px; font-size: 13px; }
  .definition { margin-top: 20px; }
  .split-info { grid-template-columns: 1fr; }
  .quick-return {
    top: auto;
    right: 8px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    transform: none;
    border-radius: 999px;
  }
  .quick-return:hover { transform: translateY(-2px); }
  .source-note { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 680px) {
  body.mobile-directory-open { overflow: hidden; }

  .app-shell.mobile-directory-open .sidebar { z-index: 90; }

  .mobile-directory-fab {
    position: fixed;
    right: 8px;
    bottom: 68px;
    z-index: 40;
    width: 56px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent);
    background: var(--panel);
    box-shadow: 0 9px 24px rgba(23, 31, 47, 0.16);
    font-size: 13px;
    font-weight: 760;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    cursor: pointer;
  }

  .mobile-directory-open .mobile-directory-fab {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-directory-backdrop {
    position: fixed;
    inset: 0;
    z-index: 88;
    display: block;
    padding: 0;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(9, 12, 18, 0.46);
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .mobile-directory-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 89;
    display: flex;
    flex-direction: column;
    max-height: min(78vh, 700px);
    padding: 0 14px calc(14px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    color: var(--ink);
    background: var(--panel);
    box-shadow: 0 -20px 60px rgba(9, 12, 18, 0.18);
    transform: translateY(calc(100% + 24px));
    visibility: hidden;
    pointer-events: none;
    transition: transform 220ms ease, visibility 220ms ease;
  }

  .mobile-directory-open .mobile-directory-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-directory-open .mobile-directory-sheet {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-directory-sheet-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    padding: 12px 2px 10px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-directory-sheet-header small {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .mobile-directory-sheet-header h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
  }

  .mobile-directory-sheet-header button {
    min-width: 52px;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: var(--ink);
    background: var(--gray-pale);
    cursor: pointer;
  }

  .mobile-directory-sheet .group-navigation {
    display: grid;
    gap: 7px;
    min-height: 0;
    padding: 12px 0 2px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .mobile-directory-sheet .nav-group {
    flex: none;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Match the course site's editorial visual system. */
:root {
  --ink: #202a2a;
  --muted: #71807d;
  --paper: #f4f1e9;
  --panel: #fffdf8;
  --line: #dedbd1;
  --accent: #236b5c;
  --accent-dark: #195447;
  --teal: #236b5c;
  --teal-pale: #ece9e1;
  --red-pale: #f3e7df;
  --gray-pale: #ece9e1;
  --shadow: 0 18px 50px rgba(38, 50, 46, 0.08);
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline-color: rgba(35, 107, 92, 0.38);
}

.app-shell,
main,
.quick-strip,
.guide-group,
.shot-card,
.shot-grid,
.shot-copy,
.shot-visuals {
  min-width: 0;
  max-width: 100%;
}

.sidebar {
  inset: 0 auto 0 0;
  padding: 16px 14px 76px;
  color: var(--ink);
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.sidebar-toggle-close {
  top: 15px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.brand {
  margin: 0 40px 12px 3px;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.35;
}

.sidebar-toggle {
  color: var(--muted);
  background: var(--panel);
  border-color: var(--line);
}

.sidebar-toggle-close:hover,
.group-link:hover,
.group-toggle:hover {
  color: var(--ink);
  background: var(--gray-pale);
}

.sidebar-toggle-open {
  color: var(--panel);
  background: var(--accent);
  box-shadow: 0 9px 24px rgba(35, 107, 92, 0.2);
}

.sidebar-toggle-open:hover {
  background: var(--accent-dark);
}

.brand small,
.shot-nav > p,
.shot-nav button > span:first-child,
.shot-nav button small,
.group-toggle,
.group-link small,
.nav-items button > span:first-child,
.nav-items button small,
.future-groups > div {
  color: var(--muted);
}

.search-box {
  min-height: 36px;
  margin-bottom: 12px;
  padding-inline: 11px 8px;
  background: var(--panel);
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 17, 20, 0.03);
}

.search-box input {
  height: 34px;
  color: var(--ink);
  font-size: 13px;
}

.group-navigation {
  gap: 6px;
}

.nav-group {
  border-radius: 10px;
}

.group-link {
  min-height: 46px;
  padding-block: 5px;
}

.group-link strong {
  font-size: 14px;
}

.group-link small {
  margin-top: 0;
  font-size: 9px;
}

.nav-items {
  padding: 2px 5px 5px;
}

.nav-items button {
  min-height: 36px;
  margin: 0;
  padding-block: 3px;
}

.nav-items button strong {
  font-size: 13px;
  line-height: 1.25;
}

.nav-items button small {
  margin-top: 0;
  font-size: 9px;
  line-height: 1.2;
}

.about-link {
  left: 14px;
  bottom: 14px;
  width: calc(var(--sidebar-width) - 28px);
  padding: 8px 10px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box input::-webkit-search-cancel-button {
  filter: none;
}

.shot-nav button,
.group-link,
.nav-items button {
  color: var(--muted);
}

.shot-nav button:hover,
.nav-items button:hover {
  color: var(--ink);
  background: var(--gray-pale);
}

.shot-nav button.active,
.nav-items button.active,
.active-group > .group-link-row {
  color: var(--accent);
  background: var(--teal-pale);
}

.shot-nav button.active::before,
.nav-items button.active::before {
  background: var(--accent);
}

.about-link {
  right: auto;
  width: calc(var(--sidebar-width) - 40px);
  color: var(--muted);
  background: rgba(244, 241, 233, 0.96);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.about-link span {
  color: var(--accent);
  background: var(--teal-pale);
}

.about-link:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.nav-group {
  background: var(--panel);
  border-color: var(--line);
}

.group-link > span {
  color: var(--accent);
}

.future-groups > div {
  background: var(--gray-pale);
}

main {
  width: calc(100% - var(--sidebar-width));
  overflow: hidden;
}

.app-shell.sidebar-collapsed main {
  width: 100%;
}

.title-line {
  flex-wrap: wrap;
  row-gap: 5px;
}

.english-title {
  white-space: normal;
}

.rules-panel,
.source-note {
  background: var(--paper);
}

.rules-grid > div,
.quick-grid button,
.info-item,
.image-button {
  background: var(--panel);
}

.rules-grid > div > span,
.variant-badge {
  color: var(--muted);
  background: var(--gray-pale);
}

.section-meta em,
.abbr-badge,
.info-good {
  color: var(--accent);
  background: var(--teal-pale);
}

.quick-grid button:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.shot-card {
  background: var(--paper);
}

.definition {
  color: var(--ink);
  background: var(--teal-pale);
  border: 1px solid var(--line);
}

.info-item dt,
.info-bad dt {
  color: var(--accent);
}

.info-bad {
  background: var(--gray-pale);
  border-color: transparent;
}

.hero-image {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.hero-image .image-label,
.motion-video-label {
  background: rgba(35, 107, 92, 0.94);
}

.motion-video {
  background: #101114;
}

.empty-state {
  border-color: var(--line);
  background: var(--paper);
}

.empty-state button,
.quick-return {
  background: var(--accent);
}

.quick-return:hover {
  background: var(--accent-dark);
}

@media (max-width: 900px) {
  main {
    width: 100%;
  }

  .sidebar {
    inset: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .about-link {
    width: auto;
    background: var(--panel);
  }
}

html[data-theme="light"] { color-scheme: light; }

/* 看懂镜头 dark appearance */
html[data-theme="dark"] {
  --ink: #f2eee6;
  --muted: #bdbab2;
  --paper: #202124;
  --panel: #292a2e;
  --line: #4a4b50;
  --accent: #9bc4b2;
  --accent-dark: #b3d2c4;
  --teal: #9bc4b2;
  --teal-pale: #34363a;
  --red-pale: #3d332f;
  --gray-pale: #303136;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  color-scheme: dark;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  color: var(--ink);
  background: var(--paper);
}

html[data-theme="dark"] .sidebar {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

html[data-theme="dark"] .sidebar-toggle,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .nav-group,
html[data-theme="dark"] .rules-grid > div,
html[data-theme="dark"] .quick-grid button,
html[data-theme="dark"] .info-item,
html[data-theme="dark"] .image-button {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
}

html[data-theme="dark"] .search-box input { color: var(--ink); }
html[data-theme="dark"] .search-box input::placeholder { color: var(--muted); }
html[data-theme="dark"] .search-box input::-webkit-search-cancel-button { filter: invert(1); }

html[data-theme="dark"] .shot-nav button,
html[data-theme="dark"] .group-link,
html[data-theme="dark"] .nav-items button,
  html[data-theme="dark"] .about-link { color: var(--muted); }

html[data-theme="dark"] .shot-nav button:hover,
html[data-theme="dark"] .nav-items button:hover,
html[data-theme="dark"] .sidebar-toggle-close:hover,
html[data-theme="dark"] .group-link:hover,
html[data-theme="dark"] .group-toggle:hover {
  color: var(--ink);
  background: var(--gray-pale);
}

html[data-theme="dark"] .shot-nav button.active,
html[data-theme="dark"] .nav-items button.active,
html[data-theme="dark"] .active-group > .group-link-row {
  color: var(--accent);
  background: var(--teal-pale);
}

html[data-theme="dark"] .about-link {
  background: rgba(41, 42, 46, 0.96);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .rules-panel,
html[data-theme="dark"] .source-note,
html[data-theme="dark"] .shot-card,
html[data-theme="dark"] .empty-state {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

html[data-theme="dark"] .definition,
html[data-theme="dark"] .section-meta em,
html[data-theme="dark"] .abbr-badge,
html[data-theme="dark"] .info-good {
  color: var(--accent);
  background: var(--teal-pale);
  border-color: var(--line);
}

html[data-theme="dark"] .rules-grid > div > span,
html[data-theme="dark"] .variant-badge,
html[data-theme="dark"] .info-bad,
html[data-theme="dark"] .future-groups > div {
  color: var(--muted);
  background: var(--gray-pale);
}

html[data-theme="dark"] .info-item dt,
html[data-theme="dark"] .info-bad dt,
html[data-theme="dark"] .source-copy strong,
html[data-theme="dark"] .rules-grid strong,
html[data-theme="dark"] .definition { color: var(--ink); }

@media (max-width: 680px) {
  .sidebar { padding-bottom: 16px; }
  .brand { margin-bottom: 0; }
  .search-box,
  .about-link { display: none; }
}
