/*
Theme Name: Lume
Description: 動画紹介サイト向けの軽量レスポンシブテーマ。外部フレームワークや Web フォントを読み込まず、CSS 1 枚と小さな JS だけで動きます。旧テーマ (STORK / AFFINGER) のウィジェットエリア ID を引き継ぎます。
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: lume
*/

:root {
	--accent: #e0245e;
	--accent-2: #7c3aed;
	--bg: #0f1115;
	--surface: #171a21;
	--surface-2: #1f232c;
	--line: #2a2f3a;
	--text: #e9e9ee;
	--muted: #9aa0ad;
	--radius: 10px;
	--wrap: 1240px;
	--side: 300px;
	--gap: 16px;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.75 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
	overflow-wrap: anywhere;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.content a { color: #7cc4ff; text-decoration: underline; text-underline-offset: 2px; }
.content a:hover { color: var(--accent); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; padding: 8px 12px; background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(100% - 24px, var(--wrap)); margin-inline: auto; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-bar { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.site-title { margin: 0 auto 0 0; min-width: 0; font-size: inherit; line-height: 1.2; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { max-height: 40px; width: auto; }
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { margin: 0; padding: 4px 0 6px; color: var(--muted); font-size: .75rem; line-height: 1.4; }

.header-search { display: none; }
.header-search form, .search-form { display: flex; }
.search-form input[type=search] {
	flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-right: 0;
	border-radius: 999px 0 0 999px; background: var(--surface); color: var(--text); font: inherit;
}
.search-form button {
	padding: 0 14px; border: 1px solid var(--accent); border-radius: 0 999px 999px 0;
	background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}

.nav-toggle {
	display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line);
	border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

.global-nav { display: none; border-top: 1px solid var(--line); padding: 8px 0 14px; }
.nav-open .global-nav { display: block; }
.global-nav ul { list-style: none; margin: 0; padding: 0; }
.global-nav a { display: block; padding: 10px 4px; font-weight: 600; border-bottom: 1px solid var(--line); }
.global-nav .sub-menu a { padding-left: 18px; font-weight: 400; color: var(--muted); }
.global-nav .drawer-search { margin: 10px 0; }

@media (min-width: 960px) {
	.nav-toggle { display: none; }
	.header-search { display: block; width: 280px; }
	.global-nav { display: block; border-top: 1px solid var(--line); padding: 0; }
	.global-nav .drawer-search { display: none; }
	.global-nav > .wrap > ul { display: flex; flex-wrap: wrap; gap: 4px 2px; }
	.global-nav > .wrap > ul > li { position: relative; }
	.global-nav a { border: 0; padding: 10px 12px; border-radius: 8px; font-size: .92rem; }
	.global-nav > .wrap > ul > li > a:hover { background: var(--surface-2); color: var(--text); }
	.global-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
	.global-nav li:hover > .sub-menu, .global-nav li:focus-within > .sub-menu { display: block; }
	.global-nav .sub-menu a { padding: 8px 10px; color: var(--text); }
}

/* Layout */
.site-main { padding: 18px 0 40px; }
.layout { display: grid; gap: 24px; }
@media (min-width: 1024px) { .layout { grid-template-columns: minmax(0, 1fr) var(--side); align-items: start; } }
.primary { min-width: 0; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 12px; padding: 0; list-style: none; color: var(--muted); font-size: .8rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: var(--line); }

.section-title { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 1.15rem; line-height: 1.4; }
.section-title::before { content: ""; width: 6px; height: 1.2em; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); }
.archive-desc { margin: -6px 0 16px; color: var(--muted); font-size: .88rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); } }
@media (min-width: 1280px) { .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.card-thumb { aspect-ratio: 3 / 2; background: var(--surface-2); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: right top; display: block; transition: transform .3s; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; flex: 1; }
.card-title { margin: 0; font-size: .84rem; line-height: 1.5; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: .72rem; }
.chip { position: relative; z-index: 1; display: inline-block; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: #ffd1de; font-size: .7rem; font-weight: 600; }
.chip:hover { background: var(--accent); color: #fff; }

/* Ranking */
.ranking { margin: 4px 0 26px; }
.rank { position: absolute; top: 6px; left: 6px; z-index: 2; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px;
	background: rgba(0,0,0,.72); color: #fff; font-weight: 800; font-size: .85rem; box-shadow: 0 2px 8px rgba(0,0,0,.5); pointer-events: none; }
.rank-1 { background: linear-gradient(135deg, #ffd86b, #e3a81c); color: #3a2600; }
.rank-2 { background: linear-gradient(135deg, #eef1f5, #a9b1bd); color: #1d2430; }
.rank-3 { background: linear-gradient(135deg, #f3b98a, #b8692f); color: #2e1500; }
@media (max-width: 639px) {
	.rank-list { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 44%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
	.rank-list > .card { scroll-snap-align: start; }
}
@media (min-width: 1024px) { .rank-list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Single */
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px 24px; }
@media (min-width: 768px) { .entry { padding: 26px 30px 34px; } }
.entry-title { margin: 6px 0 10px; font-size: 1.35rem; line-height: 1.5; }
@media (min-width: 768px) { .entry-title { font-size: 1.6rem; } }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 16px; color: var(--muted); font-size: .8rem; }
.content > * { margin-block: 0 1.1em; }
.content h2 { margin-top: 1.8em; padding: 10px 14px; border-left: 5px solid var(--accent); background: var(--surface-2); border-radius: 6px; font-size: 1.2rem; line-height: 1.5; }
.content h3 { margin-top: 1.6em; padding-bottom: 6px; border-bottom: 2px solid var(--line); font-size: 1.08rem; }
.content figure { margin-inline: 0; }
.content figcaption, .content .wp-element-caption { color: var(--muted); font-size: .8rem; text-align: center; margin-top: 6px; }
.content table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.content th, .content td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.content th { background: var(--surface-2); white-space: nowrap; }
.content .wp-block-table { overflow-x: auto; }
.content blockquote { margin-inline: 0; padding: 10px 16px; border-left: 4px solid var(--accent-2); background: var(--surface-2); border-radius: 6px; color: #cfd3dc; }
.content .wp-block-button__link, .content .btn-lg a, .content a.wp-block-button__link {
	display: inline-block; width: 100%; padding: 14px 18px; border-radius: 999px; text-align: center; text-decoration: none; font-weight: 800; font-size: 1.02rem;
	background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.content .wp-block-button__link:hover { filter: brightness(1.08); color: #fff; }
.content .wp-block-video video { width: 100%; border-radius: 8px; background: #000; }
.content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.content .aligncenter { margin-inline: auto; text-align: center; }
.content .wp-block-image img { border-radius: 6px; }
.entry-terms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.post-nav { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: block; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: .85rem; }
.post-nav small { display: block; color: var(--muted); }
.related { margin-top: 28px; }

/* Widgets */
.widget-area { display: grid; gap: 16px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow: hidden; }
.widget-title, .widget .wp-block-heading { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); font-size: .98rem; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.widget li:last-child { border-bottom: 0; }
.widget img { display: inline-block; }
.widget .tagcloud, .widget .wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.widget .tagcloud a, .widget .wp-block-tag-cloud a { font-size: .78rem !important; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.widget .tagcloud a:hover { border-color: var(--accent); }
.ad-slot { margin: 14px 0; text-align: center; overflow: hidden; }
.ad-slot .widget { background: transparent; border: 0; padding: 0; }
.ad-slot .widget-title { border: 0; text-align: center; color: var(--muted); font-size: .78rem; font-weight: 400; }
.sticky-area { position: sticky; top: 76px; }
@media (max-width: 767px) { .only-pc { display: none !important; } }
@media (min-width: 768px) { .only-sp { display: none !important; } }

/* Pagination */
.pagination .nav-links, .page-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0 6px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .page-numbers.dots { border: 0; background: none; }

/* Footer */
.site-footer { margin-top: 30px; padding: 30px 0 90px; background: #0a0b0e; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-widgets { display: grid; gap: 16px; }
@media (min-width: 768px) { .footer-widgets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.site-footer .widget { background: transparent; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 22px 0 10px; padding: 0; list-style: none; }
.copyright { text-align: center; font-size: .78rem; margin: 10px 0 0; }
.to-top { position: fixed; right: 14px; bottom: 16px; z-index: 40; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { color: #fff; }

.not-found { text-align: center; padding: 40px 10px; }
.notice-empty { padding: 30px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); }

/* Age Gate Lite (nh-sample) styled like Easy Age Verify on roomm: black screen, white text, green yes / red no. */
#agl_wrapper { background: #000 !important; }
#agl_wrapper .agl_main { background: #000 !important; color: #fff !important; box-shadow: none !important; border: 0 !important; text-align: center; }
#agl_wrapper .agl_main h2 { color: #fff !important; font-size: 1.2rem; font-weight: 700; }
#agl_wrapper .agl_main p, #agl_wrapper .agl_form { color: #fff !important; font-size: .8rem; }
#agl_wrapper .agl_buttons_wrp { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 16px 0; }
#agl_wrapper .agl_buttons { display: block !important; width: 290px; max-width: 100%; margin: 0 !important; padding: 15px 0 !important; border: 0 !important; border-radius: 10px !important; color: #fff !important; font-size: 16px !important; font-weight: 400; text-align: center; text-decoration: none !important; }
#agl_wrapper .agl_yes_button { background: #2dc937 !important; }
#agl_wrapper .agl_no_button { background: #cc3232 !important; }
#agl_wrapper .agl_buttons:hover { filter: brightness(1.1); color: #fff !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
