:root {
  color-scheme: light;
  --bg: #e8f3ec;
  --bg-accent: #d7ede2;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --line: rgba(19, 48, 32, 0.08);
  --text: #183728;
  --muted: #678171;
  --green: #07c160;
  --green-deep: #049f4d;
  --green-soft: rgba(7, 193, 96, 0.12);
  --gold: #f5b83d;
  --shadow: 0 18px 42px rgba(30, 88, 52, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 980px;
  --header-height: 78px;
  --font-body: "MiSans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --font-title: "MiSans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
}

body.night-mode {
  color-scheme: dark;
  --bg: #0e1813;
  --bg-accent: #13221a;
  --panel: rgba(20, 30, 24, 0.92);
  --panel-strong: #17241d;
  --line: rgba(255, 255, 255, 0.07);
  --text: #ebfff2;
  --muted: #9bb4a3;
  --green: #2be786;
  --green-deep: #1dbd6a;
  --green-soft: rgba(43, 231, 134, 0.14);
  --gold: #ffd26d;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.52), transparent 22%),
    linear-gradient(180deg, var(--bg), var(--bg-accent));
  color: var(--text);
  overflow-x: hidden;
}

.global-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.backdrop-orb {
  position: absolute;
  border-radius: 999px;
  will-change: transform;
  opacity: 0.95;
}

.backdrop-orb-left,
.backdrop-orb-right,
.backdrop-orb-bottom {
  animation: backdrop-drift 16s ease-in-out infinite;
}

.backdrop-orb-left {
  width: 360px;
  height: 360px;
  left: -212px;
  top: -38px;
  background:
    radial-gradient(circle at 78% 38%, rgba(96, 220, 155, 0.24), rgba(96, 220, 155, 0.11) 32%, rgba(214, 246, 228, 0.14) 56%, transparent 76%);
  box-shadow:
    inset -18px -22px 44px rgba(76, 168, 115, 0.09),
    0 0 28px rgba(96, 220, 155, 0.04);
}

.backdrop-orb-right {
  width: 360px;
  height: 360px;
  right: -200px;
  top: 150px;
  background:
    radial-gradient(circle at 30% 34%, rgba(176, 236, 210, 0.22), rgba(176, 236, 210, 0.09) 34%, rgba(228, 248, 239, 0.12) 58%, transparent 76%);
  box-shadow:
    inset 16px -18px 42px rgba(86, 158, 121, 0.07),
    0 0 24px rgba(176, 236, 210, 0.04);
  animation-delay: -5s;
}

.backdrop-orb-bottom {
  width: 540px;
  height: 540px;
  left: 20%;
  bottom: -350px;
  background:
    radial-gradient(circle at 50% 22%, rgba(108, 225, 163, 0.18), rgba(108, 225, 163, 0.07) 36%, rgba(226, 247, 237, 0.12) 58%, transparent 78%);
  box-shadow:
    inset 0 -24px 56px rgba(84, 154, 118, 0.07),
    0 0 30px rgba(108, 225, 163, 0.04);
  animation-delay: -9s;
}

.backdrop-orb-left::after,
.backdrop-orb-right::after,
.backdrop-orb-bottom::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.backdrop-orb-left::after {
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.12) 16%, transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%, rgba(70, 140, 103, 0.04) 100%);
}

.backdrop-orb-right::after {
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.09) 16%, transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%);
}

.backdrop-orb-bottom::after {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08) 18%, transparent 40%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.06));
}

body.night-mode .backdrop-orb-left {
  background:
    radial-gradient(circle at 78% 38%, rgba(43, 231, 134, 0.2), rgba(43, 231, 134, 0.08) 30%, rgba(19, 82, 52, 0.38) 54%, rgba(10, 28, 19, 0.22) 66%, transparent 78%);
  box-shadow: inset -26px -30px 62px rgba(3, 15, 9, 0.34);
}

body.night-mode .backdrop-orb-left::after {
  background:
    radial-gradient(circle at 74% 24%, rgba(130, 255, 186, 0.11), rgba(130, 255, 186, 0.03) 14%, transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 34%, rgba(0, 0, 0, 0.18) 100%);
}

body.night-mode .backdrop-orb-right {
  background:
    radial-gradient(circle at 30% 34%, rgba(84, 196, 255, 0.14), rgba(84, 196, 255, 0.045) 34%, rgba(17, 52, 68, 0.16) 56%, transparent 74%);
  box-shadow: inset 20px -22px 52px rgba(3, 16, 24, 0.2);
}

body.night-mode .backdrop-orb-bottom {
  background:
    radial-gradient(circle at 50% 22%, rgba(43, 231, 134, 0.12), rgba(43, 231, 134, 0.04) 36%, rgba(13, 54, 34, 0.16) 58%, transparent 76%);
  box-shadow: inset 0 -30px 64px rgba(5, 18, 11, 0.22);
}

@keyframes backdrop-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(12px, 16px, 0) scale(1.03);
  }
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  width: 100%;
}

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

.app-shell {
  min-height: 100vh;
  padding: 14px 10px 32px;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.site-footer {
  width: min(var(--content-width), calc(100% - 20px));
  margin: 10px auto 0;
  padding: 14px 6px 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.site-footer-copy {
  flex: 1;
  min-width: 0;
}

.site-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.site-footer-links a {
  color: var(--muted);
}

.site-footer-links a:hover {
  color: var(--green-deep);
}

.site-footer-sep {
  opacity: 0.5;
}

.page-frame {
  width: min(var(--content-width), 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.topbar,
.site-footer,
.theme-flash {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-bottom: 14px;
}

.topbar-inner {
  width: min(var(--content-width), 100%);
  min-height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

body.night-mode .topbar-inner {
  background: rgba(16, 25, 20, 0.82);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  padding: 7px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--green), #48da8d);
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.14);
}

.brand-logo svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.main-nav a,
.nav-link-button {
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.nav-link-button:hover {
  color: var(--text);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search {
  position: relative;
  width: 222px;
}

.header-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
}

.header-search input:focus,
.hero-search-box input:focus,
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
  border-color: rgba(7, 193, 96, 0.32);
  box-shadow: 0 0 0 4px rgba(7, 193, 96, 0.13);
}

.input-icon,
.hero-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
}

.input-icon svg,
.hero-search-icon svg,
.icon-tool svg,
.theme-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-tool {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.icon-tool:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.theme-toggle {
  position: relative;
  overflow: hidden;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.theme-toggle .theme-sun,
.theme-toggle .theme-moon {
  position: absolute;
  width: 18px;
  height: 18px;
  inset: 0;
  margin: auto;
  opacity: 1;
  transform-origin: center;
  transform: scale(1) rotate(0deg);
}

.theme-toggle .theme-moon {
  opacity: 0;
  transform: scale(0.72) rotate(-10deg);
}

body.night-mode .theme-toggle .theme-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

body.night-mode .theme-toggle .theme-sun {
  opacity: 0;
  transform: scale(0.72) rotate(10deg);
}

.theme-toggle svg {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.theme-toggle.is-burst::after {
  content: "";
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  border: 2px solid rgba(7, 193, 96, 0.28);
  animation: toggle-burst 0.62s ease;
}

.hero-card,
.board-card,
.detail-card,
.modal-card,
.popover-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::before,
.detail-card::before,
.board-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at right top, rgba(7, 193, 96, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 300px;
  gap: 14px;
  padding: 16px;
}

.hero-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.pill-tag,
.hero-mark,
.board-kicker,
.side-tag,
.section-mini-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  vertical-align: top;
}

.pill-tag-icon {
  width: 12px;
  height: 12px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 12px;
  color: currentColor;
}

.pill-tag-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-main h1,
.board-head h2,
.board-head h1,
.detail-summary h1,
.modal-card h3,
.popover-card h3,
.hero-side h2 {
  margin: 0;
  font-family: var(--font-title);
  letter-spacing: -0.03em;
}

.hero-main h1,
.board-head h1,
.detail-summary h1 {
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.04;
}

.hero-main p,
.detail-summary p,
.board-meta,
.modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.hero-main p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-side-note {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.hero-side-note-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--green-deep);
}

.hero-side-note-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-side-note-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-tip-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.hero-tip-note-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--green-deep);
}

.hero-tip-note-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-tip-note-text {
  min-width: 0;
}

.hero-search-box {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-search-box input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 14px 0 48px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  outline: none;
}

.hero-search-box button,
.solid-button,
.result-action-primary,
.result-action-secondary,
.mini-rank-item,
.filter-chip,
.keyword-button,
.poster-action,
.poster-action-secondary {
  border: 0;
}

.hero-search-box button,
.solid-button,
.result-action-primary,
.poster-action {
  min-width: 118px;
  height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green), #2bd67c);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(7, 193, 96, 0.22);
}

.hero-search-box button:hover,
.solid-button:hover,
.result-action-primary:hover,
.poster-action:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.keyword-wrap {
  display: grid;
  gap: 8px;
}

.keyword-list,
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-head-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.keyword-list {
  width: 100%;
  gap: 6px;
  align-items: flex-start;
  align-content: flex-start;
}

.keyword-button,
.filter-chip,
.poster-action-secondary,
.result-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.filter-chip {
  padding: 6px 10px;
  border-radius: 10px;
}

.keyword-button {
  gap: 3px;
  padding: 5px 10px;
  border-radius: 10px;
  color: #4d6858;
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
}

.keyword-button[hidden] {
  display: none;
}

.keyword-button:hover,
.filter-chip:hover,
.poster-action-secondary:hover,
.result-action-secondary:hover {
  background: var(--green-soft);
  color: var(--green-deep);
  transform: translateY(-1px);
}

.filter-chip.is-active {
  background: linear-gradient(135deg, rgba(7, 193, 96, 0.18), rgba(7, 193, 96, 0.1));
  color: var(--green-deep);
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.24);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-tile {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

.stat-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-tile span {
  color: #526d5d;
  font-size: 11px;
}

.stat-tile-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(7, 193, 96, 0.16), rgba(7, 193, 96, 0.06));
  color: var(--green-deep);
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.14);
}

.stat-tile-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-tile strong {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-tile-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.hero-side {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(7, 193, 96, 0.08), transparent),
    var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-side-head,
.board-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.board-head {
  margin-bottom: 14px;
}

.board-head-column {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}

.board-head-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.board-head-title-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--green-deep);
}

.board-head-title-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.board-head-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 18px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.board-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-self: flex-start;
}

.search-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.search-board-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.search-board-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 18px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.search-board-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.search-board-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 280px;
}

.search-board-filters.filter-chip-row,
.search-board-filters .filter-chip-row {
  justify-content: flex-end;
}

.board-sync-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
}

.board-sync-note strong {
  color: var(--text);
  font-weight: 400;
}

.hero-side-head a,
.board-link {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 700;
}

.mini-rank-list {
  display: grid;
  gap: 8px;
}

.mini-rank-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.night-mode .mini-rank-item {
  background: rgba(255, 255, 255, 0.03);
}

.mini-rank-item:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.22);
}

.mini-rank-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 184, 61, 0.18);
  color: #bc7b00;
  font-size: 11px;
  font-weight: 800;
}

.mini-rank-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-rank-copy strong,
.poster-copy h3,
.search-item-copy h3 {
  font-size: 13px;
  line-height: 1.35;
}

.mini-rank-copy span {
  color: var(--muted);
  font-size: 11px;
}

.board-card,
.search-card,
.detail-card {
  padding: 16px;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.poster-card {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 0;
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  cursor: pointer;
}

.poster-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.24), 0 14px 24px rgba(18, 66, 38, 0.09);
}

.poster-card:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.3), 0 0 0 4px rgba(7, 193, 96, 0.12);
}

.poster-thumb {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(135deg, rgba(7, 193, 96, 0.16), rgba(56, 194, 255, 0.14));
}

.poster-thumb img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  background:
    radial-gradient(circle at 74% 20%, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(135deg, rgba(7, 193, 96, 0.92), rgba(71, 194, 255, 0.9));
  color: rgba(255, 255, 255, 0.96);
}

.poster-fallback span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(18, 66, 38, 0.12);
}

.poster-badge,
.poster-score {
  position: absolute;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.poster-badge {
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green-deep);
}

.poster-score {
  right: 8px;
  top: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #244437;
}

.poster-copy {
  display: grid;
  gap: 6px;
  padding: 10px 10px 12px;
}

.poster-copy h3,
.search-item-copy h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-copy p,
.search-item-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  word-break: break-all;
  max-height: calc(1.45em * 2);
}

.poster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poster-meta span,
.detail-meta span,
.detail-tags span,
.search-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 10px;
}

.poster-actions {
  display: grid;
  gap: 6px;
}

.poster-action,
.poster-action-secondary {
  width: 100%;
  min-height: 34px;
}

.poster-card-ranking .poster-meta,
.poster-card-ranking .poster-actions {
  display: none;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.search-item {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

.search-item .poster-thumb {
  width: 104px;
}

.search-item-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.search-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-item-actions {
  display: grid;
  gap: 8px;
  width: 106px;
}

.result-state {
  display: inline-flex;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(245, 184, 61, 0.14);
  color: #b37b00;
  font-size: 11px;
  font-weight: 700;
}

.result-action-primary,
.result-action-secondary {
  width: 100%;
  min-height: 38px;
}

.toolbar-stack {
  display: grid;
  gap: 12px;
}

.toolbar-group {
  display: grid;
  gap: 8px;
}

.toolbar-group strong {
  font-size: 12px;
}

.detail-card {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 16px;
}

.detail-poster .poster-thumb {
  border-radius: 24px;
}

.detail-summary {
  display: grid;
  gap: 12px;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-actions a,
.detail-actions button {
  min-width: 128px;
}

.empty-card,
.loading-card {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 180px;
  padding: 24px;
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  text-align: center;
}

.loading-card strong {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--muted);
}

.loading-card-wide {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 320px;
  align-self: stretch;
}

.loading-orbit {
  position: relative;
  width: 72px;
  height: 72px;
  display: inline-grid;
  place-items: center;
}

.loading-orbit-core,
.loading-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.loading-orbit-core {
  inset: 23px;
  background: radial-gradient(circle, rgba(7, 193, 96, 0.22), rgba(7, 193, 96, 0.06));
  box-shadow: 0 0 18px rgba(7, 193, 96, 0.18);
}

.loading-orbit-ring-a {
  border: 4px solid rgba(7, 193, 96, 0.16);
  border-top-color: rgba(7, 193, 96, 0.95);
  border-right-color: rgba(56, 194, 255, 0.5);
  animation: spin 1s linear infinite;
}

.loading-orbit-ring-b {
  inset: 10px;
  border: 3px solid rgba(7, 193, 96, 0.1);
  border-bottom-color: rgba(7, 193, 96, 0.85);
  border-left-color: rgba(255, 255, 255, 0.85);
  animation: spin-reverse 1.35s linear infinite;
}

.modal-mask,
.popover-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(12, 26, 18, 0.54);
  backdrop-filter: blur(10px);
}

.modal-mask.is-open,
.popover-mask.is-open {
  display: flex;
}

.modal-card,
.popover-card {
  width: min(560px, 100%);
  padding: 18px;
}

.popover-card {
  width: min(920px, 100%);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(19, 48, 32, 0.08);
  color: var(--muted);
  font-size: 22px;
}

.modal-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.modal-form label {
  display: grid;
  gap: 7px;
}

.modal-form span {
  font-size: 12px;
  font-weight: 700;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
  resize: vertical;
}

.quick-search-form {
  margin: 12px 0 10px;
}

.search-grid-popover {
  margin-top: 10px;
}

.search-meta-inline {
  margin-top: 8px;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  display: grid;
  gap: 8px;
}

.toast-item {
  min-width: 180px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 28, 22, 0.9);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.26);
  animation: toast-in 0.3s ease;
}

.theme-flash {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
}

.theme-flash.is-active {
  background: radial-gradient(circle at var(--flash-x, 50%) var(--flash-y, 50%), rgba(7, 193, 96, 0.22), transparent 35%);
  animation: theme-flash 0.62s ease;
}

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

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

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes theme-flash {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes toggle-burst {
  from {
    opacity: 0.8;
    transform: scale(0.5);
  }
  to {
    opacity: 0;
    transform: scale(1.15);
  }
}

@media (max-width: 1024px) {
  .topbar-inner,
  .page-frame {
    width: min(calc(100vw - 20px), var(--content-width));
  }

  .topbar-inner {
    grid-template-columns: 1fr;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .topbar-tools {
    justify-content: space-between;
  }

  .header-search {
    width: min(100%, 520px);
    flex: 1;
  }

  .hero-card,
  .detail-card {
    grid-template-columns: 1fr;
  }

  .backdrop-orb-left,
  .backdrop-orb-right,
  .backdrop-orb-bottom {
    opacity: 0.82;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px 6px 24px;
  }

  .backdrop-orb-left {
    width: 220px;
    height: 220px;
    left: -128px;
    top: -12px;
  }

  .backdrop-orb-right {
    width: 220px;
    height: 220px;
    right: -130px;
    top: 140px;
  }

  .backdrop-orb-bottom {
    width: 340px;
    height: 340px;
    left: 12%;
    bottom: -220px;
  }

  .backdrop-orb-left,
  .backdrop-orb-right,
  .backdrop-orb-bottom {
    opacity: 0.72;
  }

  .topbar-inner {
    padding: 12px;
    border-radius: 22px;
  }

  .search-board-head {
    flex-direction: column;
    align-items: stretch;
  }

  .search-board-filters {
    min-width: 0;
    justify-content: flex-start;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small {
    font-size: 10px;
  }

  .header-search {
    width: 100%;
  }

  .hero-card,
  .board-card,
  .detail-card {
    padding: 12px;
    border-radius: 24px;
  }

  .hero-search-box {
    grid-template-columns: 1fr;
  }

  .hero-search-box button,
  .solid-button {
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .search-grid {
    grid-template-columns: 1fr;
  }

  .search-item {
    grid-template-columns: 84px 1fr;
  }

  .search-item .poster-thumb {
    width: 84px;
  }

  .search-item-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .result-state,
  .result-action-primary,
  .result-action-secondary {
    min-height: 34px;
  }

  .site-footer {
    width: min(calc(100vw - 20px), var(--content-width));
    padding: 12px 2px 4px;
    flex-direction: column;
    gap: 8px;
  }

  .site-footer-links {
    justify-content: flex-start;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .poster-card {
    padding: 8px;
    border-radius: 16px;
  }

  .poster-copy h3,
  .search-item-copy h3 {
    font-size: 12px;
  }

  .poster-copy p,
  .search-item-copy p,
  .board-meta {
    font-size: 10px;
  }

  .hero-main h1,
  .board-head h1,
  .detail-summary h1 {
    font-size: 22px;
  }
}
