:root {
  color-scheme: light;
  --background: #f5f2ff;
  --accent: #7860cb;
  --ink: #343044;
  --muted: #787187;
  --line: #e3dcf0;
  --pink: #eaa1ba;
  --mint: #a5d7cd;
  --card: #fffefd;
  --site-background: none;
  font-family: "Nunito", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; color: var(--ink); background: var(--background); line-height: 1.7; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; background-image: var(--site-background); background-size: cover; background-position: center; opacity: .15; pointer-events: none; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #5b43a6; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .45; }
a, button, summary, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b293ef; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.4; }
button { border: 0; }
.wrap { width: min(1180px, calc(100% - 56px)); margin-inline: auto; }
.sr-only { position: absolute; height: 1px; width: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 100; padding: 8px 16px; background: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 16px; font-weight: 800; text-decoration: none; letter-spacing: .05em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 42px; height: 38px; border-radius: 10px; color: white; background: var(--accent); font-size: 15px; font-weight: 900; transform: rotate(-7deg); box-shadow: 3px 3px 0 #dcd1f3; }
.brand-mark span { position: absolute; top: -10px; right: -8px; color: #d8729b; font-size: 20px; text-shadow: 1px 1px white; }
.site-header nav { display: flex; gap: 8px; }
.site-header nav a { padding: 7px 17px; border-radius: 9px; text-decoration: none; font-size: 13px; color: #6b647d; }
.site-header nav a:hover { background: #eae3fb; color: var(--accent); }
.hero { position: relative; padding-bottom: 48px; background-image: radial-gradient(#cec2e766 .8px, transparent .8px); background-size: 16px 16px; }
.hero::after { content: ""; position: absolute; left: calc(50% - 25px); bottom: -4px; height: 8px; width: 50px; border-radius: 10px; background: #d3c4ed; }
.ribbon-shell { width: min(1480px, 100%); margin: 0 auto; }
.ribbon { overflow-x: auto; scrollbar-width: none; padding: 24px 18px 20px; mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); }
.ribbon::-webkit-scrollbar { display: none; }
.ribbon-track { display: flex; align-items: center; gap: 22px; width: max-content; min-width: 100%; justify-content: center; }
.sticker { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 150px; height: 142px; padding: 13px 14px 24px; border: 2px solid white; border-radius: 12px; outline: 1px solid #e1d6ee; background: #fffdfc; text-decoration: none; box-shadow: 4px 6px 0 #ddd3ed60; transform: rotate(-5deg); transition: transform .2s; }
.sticker:nth-child(2n) { transform: rotate(5deg); background: #fff4f5; }
.sticker:nth-child(3n) { transform: rotate(-2deg); background: #eff9f5; }
.sticker:nth-child(4n) { transform: rotate(3deg); background: #fff9e7; }
.sticker:hover, .sticker:focus-visible { transform: translateY(-5px) rotate(0); }
.sticker::before { position: absolute; top: -8px; left: calc(50% - 20px); width: 40px; height: 16px; content: ""; background: #c1afe887; transform: rotate(-7deg); }
.sticker:nth-child(2n)::before { background: #f0b4c887; }
.sticker img { width: 100%; height: 100%; object-fit: contain; }
.sticker-label { position: absolute; bottom: 5px; left: 0; width: 100%; text-align: center; font-size: 10px; font-weight: 700; color: #6f667c; }
.dummy { font-size: 20px; color: #947ca8; letter-spacing: -.04em; padding-bottom: 13px; user-select: none; }
.dummy i { position: absolute; bottom: 5px; right: 9px; font-size: 9px; color: #ad9cbc; font-style: normal; }
.ribbon-toolbar { width: min(900px, calc(100% - 56px)); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 24px; color: var(--muted); font-size: 11px; }
.ribbon-toolbar > div { display: flex; gap: 3px; }
.text-button { padding: 4px 9px; background: transparent; color: #75698a; border-radius: 6px; font-size: 11px; }
.text-button:hover:enabled { background: #ebe3f6; }
.hero-center { position: relative; padding-top: 36px; text-align: center; }
.kicker { color: #9285aa; font-size: 10px; letter-spacing: .2em; font-weight: 750; }
.hero h1 { position: relative; display: inline-block; margin: 9px 0 9px; font-size: clamp(32px, 4.2vw, 54px); letter-spacing: .07em; font-weight: 900; color: #4b3d6c; text-shadow: 2px 3px 0 #fff, 3px 5px 0 #dfd4f0; }
.hero h1::after { content: ""; position: absolute; z-index: -1; height: 14px; left: 0; right: 0; bottom: 3px; background: #ebcbdc; transform: rotate(-2deg); }
.title-star { position: absolute; font-size: 32px; right: -40px; top: -8px; color: #d795af; text-shadow: none; transform: rotate(12deg); }
.hero-line { font-weight: 800; font-size: 18px; letter-spacing: .07em; }
.hero-note { color: var(--muted); margin: 5px 0 22px; font-size: 13px; }
.search-box { width: min(720px, 100%); margin: 0 auto; text-align: left; }
.search-modes { display: flex; gap: 4px; margin-left: 18px; }
.search-modes button { padding: 8px 25px; font-size: 13px; font-weight: 700; border-radius: 10px 10px 0 0; color: #8d829f; background: #eae3f4; transition: background .15s; }
.search-modes button[aria-pressed="true"] { background: var(--accent); color: white; }
.search-field { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 8px 9px 8px 23px; background: white; border: 2px solid #a38cd4; border-radius: 16px; box-shadow: 5px 6px 0 #ded3f06e; }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px #d6c8ef66, 5px 6px 0 #ded3f06e; }
.search-icon { position: relative; flex: 0 0 17px; height: 17px; border: 2px solid #b3a3cb; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: #b3a3cb; right: -5px; bottom: -3px; transform: rotate(45deg); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; font-size: 15px; color: var(--ink); background: transparent; padding: 7px; }
.search-field input::placeholder { color: #a79cae; }
.primary { padding: 13px 26px; color: white; background: var(--accent); border-radius: 10px; font-size: 14px; font-weight: 750; white-space: nowrap; }
.primary:hover { filter: brightness(.95); }
.primary span { margin-left: 8px; }
.search-hint { margin-top: 13px; color: #8c8298; font-size: 11px; }
#search-status { margin-top: 5px; color: #857490; font-size: 12px; min-height: 21px; }
.pill { display: inline-flex; align-items: center; justify-content: center; padding: 7px 16px; gap: 7px; border: 1px solid var(--line); border-radius: 20px; background: #fffafc; font-size: 12px; color: #76618f; }
.pill:hover { border-color: #bda6d8; background: #f7f0ff; }
#retry { margin-top: 10px; }
.results-section { padding-top: 36px; padding-bottom: 15px; }
.results-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.results-heading h2 { font-size: 23px; overflow-wrap: anywhere; }
.results-heading p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.character-matches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.expression-card { position: relative; min-width: 0; border-radius: 13px; padding: 8px 8px 0; background: white; border: 1px solid var(--line); box-shadow: 0 3px 0 #e7dfef80; }
.expression-card:hover, .expression-card:focus-within { z-index: 5; border-color: #b8a0d5; }
.crop-wrap { display: grid; place-items: center; height: 176px; border-radius: 8px; background: #f9f6fc; padding: 8px; }
.crop-wrap img { width: 100%; height: 100%; object-fit: contain; }
.expression-caption { display: grid; padding: 8px 4px 6px; gap: 3px; }
.name-button, .episode-button { background: transparent; text-align: left; padding: 0; }
.name-button { color: #51405e; font-size: 13px; font-weight: 750; }
.episode-button { font-size: 10px; color: #857a90; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-button:hover, .episode-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.source-toggle { display: block; width: 100%; background: transparent; color: #8b739e; font-size: 10px; text-align: right; padding: 3px 3px 7px; }
.source-peek { display: none; position: absolute; z-index: 10; left: calc(100% + 7px); top: -18px; width: 198px; padding: 9px; border: 1px solid #bda6d8; border-radius: 12px; background: #fffefc; box-shadow: 0 8px 30px #49336224; }
.source-peek::before { content: ""; position: absolute; left: -10px; top: 0; width: 10px; height: 100%; }
.source-peek img { display: block; width: 100%; max-height: 335px; object-fit: contain; }
.source-peek strong, .source-peek a, .source-peek p { display: block; font-size: 10px; margin-top: 6px; }
.source-peek a { font-weight: 600; }
.preview-open .source-peek { display: block; }
.preview-left .source-peek { left: auto; right: calc(100% + 7px); }
.preview-left .source-peek::before { left: auto; right: -10px; }
@media (hover: hover) and (min-width: 701px) {
  .expression-card:not(.preview-suppressed):hover .source-peek, .expression-card:not(.preview-suppressed):has(.crop-wrap:focus-visible) .source-peek { display: block; }
}
.image-missing { display: block; text-align: center; color: #8e7e9b; font-size: 11px; padding: 12px; }
.episodes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.episode-card { display: flex; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.episode-cover { display: grid; place-items: center; flex: 0 0 96px; height: 125px; padding: 8px; border-radius: 9px; background: #f5f0f9; }
.episode-cover img { width: 100%; height: 100%; object-fit: contain; }
.empty-cover { color: #c7b4df; font-size: 40px; }
.episode-card > div { min-width: 0; }
.episode-card h3 { margin-top: 6px; }
.episode-card h3 .name-button { font-size: 15px; }
.episode-card p { margin: 5px 0; color: var(--muted); font-size: 11px; }
.episode-card a { font-size: 10px; }
.episode-characters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.episode-characters button { font-size: 10px; padding: 2px 7px; border-radius: 5px; background: #f1eaf8; color: #867396; }
.empty-result { grid-column: 1 / -1; padding: 60px 15px; text-align: center; border-radius: 14px; background: #fcfaff; border: 1px dashed #d4c4e6; color: var(--muted); }
.empty-result > span { display: block; font-size: 25px; color: #b59acb; margin-bottom: 8px; }
.load-more { text-align: center; padding: 25px 0 8px; }
.load-more p { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.stats-section { padding-top: 54px; padding-bottom: 58px; }
.section-title { text-align: center; position: relative; }
.section-stamp { display: block; color: #c3a5dd; font-size: 28px; margin-bottom: 2px; }
.section-title h2 { font-size: 28px; letter-spacing: .06em; margin: 7px 0 9px; color: #50425f; }
.section-title > p:last-child { color: var(--muted); font-size: 12px; }
#release-date { white-space: nowrap; }
.totals { display: grid; grid-template-columns: repeat(4, 1fr); margin: 30px auto 28px; background: var(--card); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 4px 0 #e6ddee77; }
.totals article { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 23px 10px; }
.totals article + article::before { content: ""; position: absolute; width: 1px; top: 25px; bottom: 25px; left: 0; background: var(--line); }
.totals strong { font-size: 36px; font-weight: 850; line-height: 1.3; color: var(--accent); font-variant-numeric: tabular-nums; }
.totals article:nth-child(2) strong { color: #bd7497; }
.totals article:nth-child(3) strong { color: #568c85; }
.totals article:nth-child(4) strong { color: #ad8d57; }
.totals span { font-size: 12px; color: #82778f; }
.stat-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.paper-card { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 25px 27px; background: var(--card); box-shadow: 0 4px 0 #e6ddee66; }
.paper-card::before { content: ""; position: absolute; left: 25px; top: -1px; width: 42px; height: 3px; background: #b19ad7; border-radius: 4px; }
.paper-card:nth-child(2n)::before { background: #e7aec4; }
.card-heading { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.card-heading h3 { flex: 1; }
.card-heading .mini-star { color: #c594b7; font-size: 24px; }
.paper-card h3 { font-size: 17px; font-weight: 800; }
.card-note { font-size: 11px; color: #867b8f; margin-top: 7px; }
select { max-width: 180px; min-width: 0; color: #806899; background: #f5effa; border: 1px solid #e4d9ef; border-radius: 8px; padding: 6px 24px 6px 9px; font-size: 11px; }
.distribution { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 260px; padding: 24px 0 5px; }
.donut, .donut-empty { position: relative; width: 185px; flex: 0 0 185px; height: 185px; }
.donut svg { width: 100%; height: 100%; }
.donut circle { fill: none; stroke-width: 25; stroke: var(--chart-color); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; }
.donut-center strong { font-size: 26px; line-height: 1.35; color: #5c4774; }
.donut-center span { font-size: 10px; color: var(--muted); }
.donut-empty { border: 24px solid #efe8f5; border-radius: 50%; display: grid; place-items: center; background: #fcfaff; color: #baa6cc; font-size: 28px; }
.legend { flex: 1; min-width: 0; }
.legend-row { width: 100%; display: grid; grid-template-columns: 8px 1fr; align-items: center; gap: 1px 8px; padding: 6px 2px; background: transparent; text-align: left; font-size: 12px; }
button.legend-row:hover { background: #f6f0fb; border-radius: 6px; }
.legend-row small { grid-column: 2; color: #8c8297; font-size: 10px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--chart-color); }
.chart-color-0 { --chart-color: #9b82cf; } .chart-color-1 { --chart-color: #e5a1bb; } .chart-color-2 { --chart-color: #88bdb3; } .chart-color-3 { --chart-color: #dcc088; } .chart-color-4 { --chart-color: #94afd2; } .chart-color-5 { --chart-color: #ded5e6; }
.empty-copy { color: #93879e; font-size: 12px; text-align: center; padding: 30px 10px; line-height: 1.9; }
.rank-list { margin-top: 18px; }
.ranking-card .rank-list { max-height: 288px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #dfd2ed transparent; }
.rank-row { width: 100%; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 13px; align-items: center; gap: 9px; min-height: 44px; padding: 8px 4px; background: transparent; text-align: left; border-bottom: 1px dashed #eee6f3; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: #f8f1fc; border-radius: 6px; }
.rank-number { font-size: 11px; font-weight: 800; color: #b4a3c6; font-variant-numeric: tabular-nums; }
.rank-row:nth-child(-n+3) .rank-number { color: #a478af; }
.rank-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row strong { font-size: 11px; font-weight: 700; color: #9679a4; font-variant-numeric: tabular-nums; }
.rank-arrow { color: #b6a4c4; font-size: 12px; }
.fun-heading { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 35px 0 21px; }
.fun-heading h3 { font-size: 18px; letter-spacing: .05em; }
.fun-heading > span { color: #d1b6e3; font-size: 23px; }
.fun-panels .rank-list { min-height: 110px; }
.guestbook { padding: 36px 20px 42px; text-align: center; border-top: 1px dashed #d9cbe6; border-bottom: 1px dashed #d9cbe6; background: #faf7fc80; border-radius: 18px; }
.letter-mark { color: #ca8eb0; font-size: 30px; }
.guestbook h2 { font-size: 21px; margin: 4px 0 8px; }
.guestbook p { color: #897a95; font-size: 12px; }
.status-pill { display: inline-block; margin-top: 17px; padding: 5px 17px; color: #a2839f; background: #f1e6ef; border-radius: 20px; font-size: 11px; }
.site-footer { text-align: center; padding: 44px 0 30px; }
.footer-brand { text-decoration: none; font-size: 15px; font-weight: 800; color: #6c537f; }
.footer-brand span { color: #cba6d5; }
.site-footer p { font-size: 11px; color: #96889f; margin: 6px 0 16px; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; }
.site-footer nav a { font-size: 11px; text-decoration: none; color: #8e799b; }
.site-footer small { display: block; font-size: 10px; color: #a595ae; margin-top: 15px; }
.info-page { width: min(760px, calc(100% - 40px)); margin: 28px auto 25px; padding: 35px 44px; }
.info-page h1 { font-size: 30px; margin: 20px 0; text-align: center; }
.info-page h2 { font-size: 18px; margin: 28px 0 10px; }
.info-page p { font-size: 14px; color: #74667f; margin: 12px 0; line-height: 1.95; }
.info-page a { font-size: 12px; }
.info-page .notice { background: #f5eef9; border-left: 3px solid #c4a7dd; padding: 12px 16px; border-radius: 4px; }
@media (max-width: 1050px) {
  .distribution { flex-direction: column; gap: 16px; }
  .legend { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { height: 70px; gap: 10px; }
  .brand { font-size: 13px; gap: 9px; letter-spacing: 0; }
  .brand-mark { width: 32px; height: 31px; font-size: 12px; }
  .site-header nav { gap: 0; }
  .site-header nav a { padding: 6px 8px; font-size: 11px; }
  .site-header nav a:last-child { display: none; }
  .ribbon { padding-top: 20px; padding-bottom: 16px; }
  .ribbon-track { gap: 16px; }
  .sticker { flex-basis: 112px; height: 112px; padding: 11px 9px 22px; border-radius: 10px; }
  .dummy { font-size: 16px; }
  .ribbon-toolbar { width: calc(100% - 32px); flex-wrap: wrap; gap: 2px 12px; }
  .ribbon-toolbar, .text-button { font-size: 10px; }
  .hero-center { padding-top: 25px; }
  .hero h1 { font-size: 34px; letter-spacing: .025em; }
  .title-star { font-size: 21px; right: -22px; top: -7px; }
  .kicker { font-size: 8px; letter-spacing: .13em; }
  .hero-line { font-size: 15px; }
  .hero-note { font-size: 11px; margin-bottom: 20px; }
  .search-modes button { padding: 7px 23px; font-size: 12px; }
  .search-field { min-height: 59px; gap: 7px; padding-left: 13px; border-radius: 13px; }
  .search-field input { font-size: 12px; padding-inline: 3px; }
  .search-icon { flex-basis: 14px; height: 14px; }
  .primary { padding: 10px 15px; font-size: 12px; }
  .primary span { display: none; }
  .search-hint { font-size: 10px; }
  #search-status { font-size: 11px; }
  .hero { padding-bottom: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .crop-wrap { height: 150px; }
  .source-peek, .preview-left .source-peek { position: relative; inset: auto; width: 100%; margin-bottom: 8px; box-shadow: none; padding: 6px; }
  .source-peek img { max-height: 260px; }
  .source-peek::before { display: none; }
  .source-toggle { padding: 7px; font-size: 11px; }
  .episodes-grid { grid-template-columns: 1fr; }
  .results-heading h2 { font-size: 18px; }
  .stats-section { padding-top: 37px; padding-bottom: 36px; }
  .section-title h2 { font-size: 23px; }
  .section-title > p:last-child { font-size: 10px; }
  .totals { margin-top: 22px; margin-bottom: 22px; border-radius: 14px; }
  .totals article { padding: 18px 4px; }
  .totals strong { font-size: 25px; }
  .totals span { font-size: 10px; }
  .totals article + article::before { top: 20px; bottom: 20px; }
  .stat-panels { grid-template-columns: 1fr; gap: 20px; }
  .paper-card { padding: 20px; border-radius: 14px; }
  .paper-card h3 { font-size: 16px; }
  .distribution { flex-direction: row; gap: 14px; min-height: 190px; padding-top: 18px; }
  .donut, .donut-empty { width: 140px; flex-basis: 140px; height: 140px; }
  .donut-empty { border-width: 20px; }
  .donut-center strong { font-size: 21px; }
  .legend { display: block; }
  .legend-row { font-size: 11px; gap: 0 6px; }
  .legend-row small { font-size: 9px; }
  .fun-heading { margin: 27px 0 18px; }
  .fun-heading h3 { font-size: 17px; }
  .guestbook { padding: 25px 20px 29px; }
  .guestbook p { font-size: 11px; }
  .info-page { padding: 25px; }
  .info-page h1 { font-size: 26px; }
}
@media (max-width: 350px) {
  .hero h1 { font-size: 29px; }
  .search-icon { display: none; }
  .distribution { flex-direction: column; }
  .legend { display: grid; grid-template-columns: 1fr 1fr; }
  .card-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
