/*
Theme Name: NTR Theme
Description: 寝取られの森の専用テーマ。小説・体験談の表示は NTR Core プラグインが行い、このテーマはヘッダー・メニュー・フッターと、ニュース記事など WordPress 標準ページの表示だけを受け持つ軽量テーマ。
Version: 1.1.1
Requires PHP: 7.4
Author: 寝取られの森
Text Domain: ntr-theme
*/

:root {
  --bg: #121214;
  --bg-2: #1a1a1e;
  --ink: #ececec;
  --sub: rgba(236, 236, 236, .62);
  --line: rgba(255, 255, 255, .1);
  --rose: #e8466f;
  --rose-2: #f08aa5;
  --violet: #6d44c4;
  --maxw: 1160px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: var(--rose-2); }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

.nt-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- ヘッダー ---------- */
.nt-header { position: sticky; top: 0; z-index: 100; background: rgba(18, 18, 20, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nt-header-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.nt-logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink) !important; white-space: nowrap; }
.nt-logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; background: var(--rose); color: #fff; font-weight: 900; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; align-self: center; }
.nt-logo-name { font-size: 20px; font-weight: 800; letter-spacing: .06em; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; }
.nt-logo-tag { font-size: 11px; color: var(--sub); }
.nt-nav { margin-left: auto; }
.nt-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nt-nav a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink) !important; text-decoration: none; font-size: 14px; font-weight: bold; }
.nt-nav a:hover, .nt-nav .current-menu-item > a { background: rgba(255, 255, 255, .06); }
.nt-post-link { padding: 8px 14px; border-radius: 6px; background: var(--rose); color: #fff !important; text-decoration: none; font-size: 13px; font-weight: 800; white-space: nowrap; }
.nt-menu-toggle { display: none; }

/* ---------- 本文 ---------- */
.nt-main { padding: 24px 0 48px; min-height: 60vh; }
.nt-page-title { margin: 8px 0 18px; font-size: clamp(22px, 3.4vw, 28px); line-height: 1.4; font-weight: 800; letter-spacing: .03em; }
.nt-page-sub { margin: -10px 0 18px; color: var(--sub); font-size: 13px; }
.entry-content { overflow-wrap: anywhere; }
.entry-content h2 { font-size: 22px; border-bottom: 2px solid var(--rose); padding-bottom: 6px; margin: 2em 0 .8em; }
.entry-content h3 { font-size: 18px; margin: 1.6em 0 .6em; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content input[type="text"], .entry-content input[type="search"], .entry-content input[type="email"], .entry-content input[type="password"], .entry-content input[type="datetime-local"],
.entry-content select, .entry-content textarea {
  max-width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); background: var(--bg-2); color: var(--ink); font: inherit;
}
.entry-content button, .entry-content input[type="submit"] { font: inherit; cursor: pointer; }
.entry-content button:not([class]), .entry-content input[type="submit"] { padding: 8px 18px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: var(--ink); }

/* パンくず */
.nt-crumbs { font-size: 12px; color: var(--sub); margin: 0 0 6px; }
.nt-crumbs a { color: var(--sub); text-decoration: none; }
.nt-crumbs a:hover { color: var(--ink); }
.nt-crumbs span[aria-hidden] { margin: 0 6px; opacity: .6; }

/* 記事一覧（ニュースなど） */
.nt-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.nt-post-card { display: block; padding: 16px; border-radius: var(--radius); background: rgba(255, 255, 255, .035); border: 1px solid var(--line); color: inherit !important; text-decoration: none; }
.nt-post-card:hover { border-color: var(--rose); }
.nt-post-date { font-size: 12px; color: var(--sub); }
.nt-post-title { display: block; font-weight: 800; margin-top: 4px; }
.nt-pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.nt-pagination a, .nt-pagination span { padding: 4px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.nt-pagination .current { background: var(--rose); border-color: var(--rose); color: #fff; }

/* Cocoon で作られた既存記事のブロック（ラベル付きの囲み）を最低限整える */
.label-box { position: relative; border: 2px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 18px 14px 10px; margin: 1.5em 0; }
.label-box-label { position: absolute; top: -12px; left: 12px; padding: 0 8px; background: var(--bg); font-weight: bold; font-size: 14px; }
.has-background { padding: .6em 1em; border-radius: 6px; color: #222; }

/* ---------- フッター ---------- */
.nt-footer { border-top: 1px solid var(--line); background: #0d0d0f; padding: 28px 0 90px; font-size: 13px; color: var(--sub); }
.nt-footer-in { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.nt-footer ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.nt-footer a { color: var(--sub) !important; text-decoration: none; }
.nt-footer a:hover { color: var(--ink) !important; }
.nt-footer-note { flex-basis: 100%; font-size: 12px; }

/* スマホ下部の固定メニュー */
.nt-tabbar { display: none; }

@media screen and (max-width: 900px) {
  .nt-logo-tag { display: none; }
  .nt-menu-toggle { display: inline-flex; margin-left: auto; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--ink); font-size: 13px; cursor: pointer; }
  .nt-nav { position: absolute; top: 60px; left: 0; right: 0; display: none; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0; }
  .nt-nav.is-open { display: block; }
  .nt-nav ul { flex-direction: column; padding: 8px 16px 14px; }
  .nt-post-link { display: none; }
  .nt-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: rgba(13, 13, 15, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .nt-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 10px; color: var(--sub) !important; text-decoration: none; }
  .nt-tabbar a b { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px; background: rgba(255, 255, 255, .1); color: var(--ink); font-size: 14px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; }
  .nt-tabbar a.is-post b { background: var(--rose); color: #fff; }
}

/* ---------- TOP のメインビジュアル（ロゴ画像） ---------- */
.tc-hero {
  position: relative; min-height: 300px; padding: 40px 32px !important; border: 0 !important; border-radius: 12px; overflow: hidden;
  flex-direction: column; align-items: flex-start !important; justify-content: center !important;
  background: linear-gradient(90deg, #1b1a1e 0%, #1b1a1e 52%, rgba(27, 26, 30, .55) 66%, rgba(27, 26, 30, 0) 80%), url(assets/hero.jpg) right center / auto 100% no-repeat, #1b1a1e;
}
.tc-hero > div { max-width: 560px; }
.tc-hero-title { font-size: clamp(22px, 3.6vw, 32px) !important; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
@media (max-width: 700px) {
  .tc-hero { min-height: 0; padding: 150px 18px 20px !important;
    background: linear-gradient(180deg, rgba(18, 18, 20, .05) 0%, rgba(18, 18, 20, .6) 45%, rgba(18, 18, 20, .96) 72%), url(assets/hero.jpg) 82% 18% / 190% auto no-repeat, #1b1a1e; }
}
