:root { color-scheme: dark; --bg: #12171e; --panel: #202936; --ink: #f2f5f8; --muted: #becbd5; --accent: #95e8cb; --line: #465464; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: 5rem; background: var(--bg); color: var(--ink); font: 1rem/1.6 system-ui, sans-serif; }
header, main, footer { width: min(70rem, calc(100% - 2rem)); margin: auto; }
header, header nav, .guide-links, #categories { display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: center; }
header { justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid var(--line); }
header strong { font-size: 1.15rem; }
header nav { font-size: .9rem; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero { padding: 1.3rem 0 .3rem; }
h1, h2, h3 { line-height: 1.3; }
h1 { margin: .15rem 0; font-size: clamp(1.85rem, 6vw, 3.3rem); }
p { color: var(--muted); }
.notice, .tag { color: var(--accent); font-size: .8rem; }
label { display: block; margin-bottom: .25rem; }
input, button { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); min-height: 44px; }
input { width: min(100%, 36rem); border-radius: .55rem; padding: .55rem .8rem; }
#categories { gap: .4rem; margin-top: .65rem; }
button { border-radius: 2rem; padding: .35rem .7rem; cursor: pointer; }
button[aria-pressed=true] { background: var(--accent); color: var(--bg); }
#results { margin: .4rem 0; font-size: .875rem; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.card { position: relative; margin: 0; min-width: 0; border-radius: .7rem; background: var(--panel); border: 1px solid var(--line); }
.card a { display: block; color: inherit; text-decoration: none; border-radius: inherit; }
.card a:hover h3 { text-decoration: underline; }
.cover { display: grid; place-items: end start; padding: .65rem; aspect-ratio: 4/3; border-radius: .65rem .65rem 0 0; font-size: clamp(1rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: .06em; overflow-wrap: anywhere; }
.video { background: linear-gradient(145deg, #203d4a, #34576c); }
.vr { background: linear-gradient(145deg, #38345d, #604d78); }
.anime { background: linear-gradient(145deg, #513753, #784657); }
.sample { background: linear-gradient(145deg, #26483d, #3f6758); }
.card-body { padding: .55rem .7rem; }
.card h3, .card p { margin: .2rem 0; font-size: .9rem; }
.favorite { position: absolute; top: .3rem; right: .3rem; width: 44px; padding: 0; font-size: 1.25rem; background: #12171e; }
main > article, .policy, footer { margin-top: 1.6rem; padding: .8rem 0; border-top: 1px solid var(--line); }
main > article:target { border-color: var(--accent); }
.dock { position: fixed; z-index: 1; inset: auto 0 0; display: flex; justify-content: center; background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.dock a { display: grid; place-items: center; min-height: 48px; padding: .3rem .7rem; font-size: .9rem; text-decoration: none; }
.dock a[aria-current=true] { font-weight: 700; background: var(--panel); }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
:root { --bg: #191725; --panel: #252238; --ink: #f8f2ff; --muted: #d3c7df; --accent: #ffd886; --line: #5b506b; }
.open-work { display: block; width: 100%; padding: 0; border: 0; border-radius: inherit; text-align: left; }
.open-work:hover strong { text-decoration: underline; }
.cover { aspect-ratio: 2 / 3; align-items: end; padding: .85rem; background-color: #392a55; background-image: radial-gradient(ellipse at 25% 24%, #ffffff35, transparent 40%), linear-gradient(35deg, #201636, transparent); }
.cover.vr { background-color: #254f68; }
.cover.anime { background-color: #713d59; }
.cover.sample { background-color: #2e645a; }
.card-body, .card-body strong, .format { display: block; }
.format { font-size: .8rem; color: var(--muted); }
dialog { width: min(30rem, calc(100% - 2rem)); padding: 1.3rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: #100d18b8; }
dialog form { display: flex; justify-content: end; }
dialog dl { padding: .75rem; background: var(--bg); border-radius: .5rem; }
dialog dd { margin: 0; font-weight: 650; }
:root { color-scheme: light; --bg: #f8f4ec; --panel: #fffdf8; --ink: #17233a; --muted: #555461; --accent: #90334b; --line: #ddd3c8; }
body { background: var(--bg); }
header { width: 100%; padding: .65rem max(1rem, calc((100% - 70rem) / 2)); background: #17233a; color: #fffaf1; border: 0; justify-content: flex-start; }
header a { color: inherit; }
header nav { margin-left: auto; }
.age { font-size: .68rem; color: #f4d9ae; }
#catalog-controls { margin: .85rem 0 .75rem; }
#catalog-controls label { font-size: .85rem; font-weight: 700; }
#catalog-controls input { width: 100%; }
#categories button { min-height: 36px; font-size: .82rem; }
#categories button[aria-pressed=true] { color: #fff; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem; padding-top: .3rem; border-top: 1px solid var(--line); }
.section-heading h1 { font-size: 1.35rem; }
.section-heading span { font-size: .72rem; color: var(--muted); }
.grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
.cover { position: relative; overflow: hidden; display: block; padding: 0; aspect-ratio: 4 / 5; background-color: #23334e; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover > span { position: absolute; bottom: 0; left: 0; width: 100%; padding: .55rem .35rem .25rem; color: white; background: linear-gradient(transparent, #121824d9); font: 700 clamp(.56rem,1.5vw,.86rem)/1.15 Georgia,serif; }
.card-body { padding: .25rem .35rem .4rem; }
.card-body strong { font-size: clamp(.72rem,2.65vw,.96rem); line-height: 1.35; }
.card-body .tag, .card-body .format { display: none; }
.favorite { background: #17233aeb; color: #fff; width: 34px; min-height: 34px; top: .18rem; right: .18rem; font-size: 1rem; border: 1px solid #ffffff50; }
.favorite[aria-pressed=true] { color: #fff; }
.dock { background: #fffdf8; }
.dock a[aria-current=true] { background: #f2e1e5; }
@media (max-width: 760px) {
  main, footer { width: calc(100% - 1.15rem); }
  header nav { display: none; }
  .grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: .38rem; }
}
.cover img { position: absolute; width: 500%; height: 300%; max-width: none; object-fit: fill; }
#work-detail { max-height: calc(100dvh - 2rem); overflow-y: auto; }
#work-poster { width: min(10rem, 42%); margin: .25rem auto .8rem; border-radius: .6rem; overflow: hidden; }
#work-poster .cover { border-radius: 0; }
#work-save { display: block; margin-bottom: .8rem; }
#work-save[aria-pressed=true] { color: #fff; }
.official-cover { background: linear-gradient(140deg, #17233a, #8c374b); }
.official-cover > span { top: 0; bottom: auto; height: 100%; display: grid; place-items: center; background: none; font: 700 .7rem system-ui,sans-serif; }
.card-body small { display: block; color: var(--muted); font-size: .63rem; }
.card-body strong { overflow-wrap: anywhere; }
.official-link { display: block; margin: .75rem 0; padding: .65rem; background: var(--accent); color: white; border-radius: .5rem; text-align: center; }
.cover.jacket { display: grid; place-items: center; background: #24314a; color: #fff; }
.cover.jacket img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #24314a; }
.fanza-guides { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.application-card { display: grid; gap: .3rem; background: var(--panel); color: var(--ink); padding: 1rem; border: 1px solid var(--line); border-top: .25rem solid var(--accent); border-radius: .5rem; }
.application-card span { color: var(--muted); font-size: .9rem; }
#goods { margin: 1.6rem 0; padding: .85rem 0; border-top: 1px solid var(--line); }
.goods-buy { display: inline-block; padding: .65rem .9rem; margin-bottom: .85rem; border-radius: .5rem; background: var(--accent); color: #fff; }
#catalog { padding: 1.35rem 0 .7rem; }
#catalog h1 { font-size: clamp(1.45rem, 5vw, 2.4rem); }
.departments { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin-top: .8rem; }
.departments a { padding: .65rem .3rem; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: .55rem; font-weight: 700; text-decoration: none; }
.shelf { padding: 1rem 0; scroll-margin-top: 1rem; }
.shelf-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem; margin-bottom: .65rem; }
.shelf-header h2 { margin: 0; font-size: clamp(1.2rem,4vw,1.65rem); }
.shelf-header a { font-size: .85rem; }
.feature { border-radius: .85rem; padding: clamp(1rem, 5vw, 2.2rem); background: linear-gradient(125deg,#17233a 18%,#63314b 80%,#90334b); color: #fffdf8; }
.feature h3 { font-size: clamp(1.25rem,5vw,2rem); margin: .3rem 0; }
.feature p { color: #f0e5e9; }
.feature .goods-buy { background: #fffdf8; color: #67213a; margin: 0; font-weight: 700; }
.product-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
.product-list a { display: flex; flex-direction: column; gap: .4rem; padding: .75rem .5rem; min-height: 7rem; background: var(--panel); border: 1px solid var(--line); border-top: .25rem solid var(--accent); border-radius: .55rem; text-decoration: none; overflow-wrap: anywhere; }
.product-list span, .product-list small { font-size: .72rem; }
.product-list strong { color: var(--ink); margin: auto 0; }
.shop-notes { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; }
.departments a { display: grid; gap: .18rem; text-align: left; padding: .8rem; color: white; }
.departments a span { font-size: .75rem; font-weight: 400; }
.departments .department-video { background: #263654; }
.departments .department-goods { background: #81364e; }
.compare-note { font-size: .87rem; }
.product { min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: .6rem; }
.product-label { min-height: 5rem; display: grid; align-content: end; gap: .12rem; padding: .65rem; color: white; }
.product-label strong { overflow-wrap: anywhere; font-size: clamp(.86rem, 4vw, 1.3rem); line-height: 1.1; }
.boxy { background: #2a4561; }
.brush { background: #71374c; }
.wavy { background: #315451; }
.product-copy { display: grid; gap: .3rem; padding: .55rem; font-size: .82rem; }
.product-copy h4, .product-copy p { margin: 0; }
.product-list .product-copy a { display: grid; place-items: center; padding: .3rem .15rem; min-height: 44px; border: 0; background: #f5e9e9; text-align: center; line-height: 1.25; }
@media (max-width: 355px) { .product-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.video-selection { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.video-card { display: block; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: .65rem; background: var(--panel); text-decoration: none; }
.video-poster { display: grid; position: relative; place-items: center; aspect-ratio: 4 / 3; background: linear-gradient(145deg,#182339,#66425c); color: #fff; text-align: center; }
.video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #182339; }
.video-info { display: grid; gap: .2rem; padding: .6rem; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.video-info strong { font-size: .95rem; color: var(--ink); }
.view-link { color: var(--accent); font-weight: 700; }
.genre-section { margin-top: 1.25rem; }
.genre-section h2 { margin: 0 0 .55rem; font-size: 1.15rem; }
.genre-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.genre-card { display: grid; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: .65rem; text-decoration: none; }
.genre-art { display: grid; place-items: center; position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg,#17233a,#634259); color: #fff; text-align: center; }
.genre-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background-color: #17233a; }
.genre-name { display: flex; gap: .35rem; justify-content: space-between; align-items: center; min-height: 44px; padding: .35rem .65rem; font-weight: 700; }
.genre-target { scroll-margin-top: 1rem; }
.genre-target:target .video-card { outline: 2px solid var(--accent); outline-offset: 2px; }
#search-tools { padding: .75rem; background: var(--panel); border: 1px solid var(--line); border-radius: .6rem; margin-bottom: .8rem; }
#work-search { display: block; width: 100%; }
#tag-list { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0; }
#tag-list button, #reset { font-size: .78rem; min-height: 44px; }
#tag-list button[aria-pressed=true] { color: #fff; }
#match-count { margin: .35rem 0 0; font-size: .8rem; }
@media (min-width: 760px) { .genre-grid,.video-selection { grid-template-columns: repeat(4,minmax(0,1fr)); } }
.genre-index { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; }
.genre-index a { display:grid; align-content:center; min-height:52px; padding:.55rem; border-radius:.6rem; background:#263654; color:#fff; font-weight:700; font-size:.9rem; text-decoration:none; }
.genre-index a:nth-child(3n+2) { background:#81364e; }
.genre-index a:last-child { background:#81364e; }
.all-tags-title { margin-top:1rem!important; }
.all-tags { display:grid; gap:.4rem; }
.all-tags details { background:var(--panel); border:1px solid var(--line); border-radius:.5rem; padding:.55rem .75rem; scroll-margin-top:1rem; }
.all-tags summary { min-height:32px; cursor:pointer; font-weight:700; }
.genre-tags,.goods-types { display:flex; flex-wrap:wrap; gap:.4rem; }
.genre-tags a,.goods-types a { min-height:44px; display:grid; place-items:center; border-radius:1rem; padding:.3rem .65rem; background:#f4e9e7; font-size:.82rem; }
@media(max-width:560px) { .genre-index { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.top-genres { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.65rem; }
.top-genre { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; overflow:hidden; background:var(--panel); border:1px solid var(--line); border-radius:.7rem; text-decoration:none; }
.top-genre-image { grid-column:1 / -1; aspect-ratio:1; background:#263654 url('posters/sheet.png') var(--x) var(--y) / 400% 300% no-repeat; }
.top-genre strong,.top-genre > span:last-child { padding:.55rem; }
.top-genre strong { color:var(--ink); }
.top-genre:hover strong { text-decoration:underline; }
.genre-image-note { font-size:.78rem; margin:.4rem 0; }
@media(max-width:560px) { .top-genres { grid-template-columns:repeat(2,minmax(0,1fr)); } }
