/* ===== 基本 ===== */
:root {
  --bg: #fffaf3;
  --card: #ffffff;
  --text: #3a2f28;
  --muted: #7a6c62;
  --accent: #e8833a;      /* 三毛猫のオレンジ */
  --accent-dark: #c96a24;
  --accent-soft: #fde9d6;
  --line: #efe3d6;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Meiryo", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }

a { color: var(--accent-dark); }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== ヘッダー ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 18px; }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav a:hover { color: var(--accent-dark); }

/* ===== ボタン・バッジ ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-small { padding: 6px 16px; font-size: 0.9rem; }

.badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ===== 本の紹介（ヒーロー） ===== */
.hero { padding: 56px 0 64px; }
.hero-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: center;
}

/* 表紙ができるまでの仮の表紙 */
.cover {
  aspect-ratio: 1 / 1.5;
  border-radius: 6px 14px 14px 6px;
  padding: 28px 22px;
  background:
    radial-gradient(circle at 85% 15%, #fff3 0 40px, transparent 41px),
    linear-gradient(160deg, #f4a259 0%, var(--accent) 55%, #b85d1c 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(122, 64, 20, 0.25), inset 6px 0 0 rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}
.cover-paw { font-size: 1.6rem; }
.cover-title {
  margin: 12px 0 10px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
}
.cover-sub { margin: 0; font-size: 0.8rem; line-height: 1.6; opacity: 0.95; }
.cover-author { margin: auto 0 0; font-size: 0.9rem; font-weight: 700; }

.hero-text h1 { margin: 0 0 8px; line-height: 1.35; }
.h1-main { display: block; font-size: 2.3rem; }
.h1-sub { display: block; font-size: 1.05rem; color: var(--muted); font-weight: 700; margin-top: 6px; }
.author-line { margin: 0 0 20px; color: var(--muted); font-size: 0.92rem; }
.lead { font-size: 1.08rem; margin: 0 0 16px; }
.points { margin: 0 0 28px; padding: 0; list-style: none; }
.points li { padding-left: 1.6em; position: relative; margin: 4px 0; }
.points li::before { content: "🐾"; position: absolute; left: 0; font-size: 0.9em; }

/* ===== セクション共通 ===== */
.section { padding: 56px 0; }
.section-title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  text-align: center;
}
.section-lead {
  margin: 0 auto 32px;
  max-width: 640px;
  text-align: center;
  color: var(--muted);
}

/* ===== 登場人物 ===== */
.characters-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.characters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chara {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}
.chara h3 { margin: 0; font-size: 1.15rem; }
.chara p { margin: 0; font-size: 0.92rem; }
.chara-role { color: var(--muted); font-size: 0.82rem !important; margin-bottom: 6px !important; }

/* 白黒の絵を、キャラごとの色の「紙」にのせる。
   multiply で重ねると、絵の白い部分だけが紙の色になり、線はそのまま残る */
.chara-face {
  --tint: #fde9d6;
  flex: none;
  width: 168px;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: var(--tint);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--line), 0 8px 18px rgba(120, 80, 40, 0.10);
}
.chara-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}
.chara-usha { --tint: #fbe3cb; }
.chara-eto  { --tint: #e6eefa; }
.chara-ai   { --tint: #ece8e3; }

/* ===== 設定シート（もっと見る） ===== */
.sheet-link {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 640px;
  margin: 28px auto 0;
  padding: 14px 18px 14px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 2px dashed var(--accent-soft);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.sheet-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.sheet-thumb {
  flex: none;
  width: 150px;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  background: #fbf3e8;
  border: 1px solid var(--line);
}
.sheet-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}
.sheet-label { display: flex; flex-direction: column; text-align: left; }
.sheet-title { font-weight: 700; color: var(--accent-dark); }
.sheet-title::after { content: " →"; }
.sheet-note { font-size: 0.85rem; color: var(--muted); }

/* 大きく見る画面 */
.sheet-dialog {
  width: min(1200px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: #fbf3e8;
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.sheet-dialog[open] { display: flex; flex-direction: column; }
.sheet-dialog::backdrop { background: rgba(58, 47, 40, 0.7); }
.sheet-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.sheet-dialog-bar p { margin: 0; font-weight: 700; }
.sheet-close {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.sheet-close:hover { background: var(--accent); color: #fff; }
.sheet-dialog-body { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.sheet-dialog-body img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}
.sheet-dialog-foot {
  margin: 0;
  padding: 8px 18px 12px;
  font-size: 0.85rem;
  text-align: right;
}

/* ===== アプリ一覧 ===== */
.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(120, 80, 40, 0.06);
}
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.app-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
}
.app-no { margin: 0; font-size: 0.78rem; color: var(--accent-dark); font-weight: 700; }
.app-name { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.app-catch { margin: 0 0 6px; font-weight: 700; }
.app-desc { margin: 0 0 12px; font-size: 0.92rem; color: var(--muted); }

.app-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.app-tags li {
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.app-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.status {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}
.status-live .status { background: #dff3e4; color: #23794a; }
.status-soon .status { background: #fff1c9; color: #8a6400; }
.status-self .status { background: #e3eefc; color: #2f5d9b; }
.app-url { font-size: 0.82rem; color: var(--muted); word-break: break-all; }

/* ===== 著者 ===== */
.author-section { background: #fff; border-top: 1px solid var(--line); }
.author-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}
.author-card h3 { margin: 0 0 16px; font-size: 1.3rem; }
.other-books-label { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); }
.other-books { margin: 0; padding: 0; list-style: none; }
.other-books li { margin: 4px 0; }

/* ===== フッター ===== */
.site-footer {
  padding: 28px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }

/* ===== スマホ・タブレット ===== */
@media (max-width: 820px) {
  .hero { padding: 36px 0 44px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .cover { width: 200px; margin: 0 auto; }
  .cover-title { font-size: 1.55rem; }
  .points { display: inline-block; text-align: left; }
  /* スマホ・タブレットでは、絵を左・文を右に並べて縦に積む */
  .characters { grid-template-columns: 1fr; gap: 14px; }
  .chara { flex-direction: row; align-items: center; text-align: left; padding: 16px; }
  .chara-face { width: 104px; border-radius: 20px; }
}

@media (max-width: 600px) {
  /* 設定シート：小さい画面では、横長のシートを横にスクロールして見る */
  .sheet-dialog-body img { width: 900px; max-width: none; }
}

@media (max-width: 480px) {
  .nav { gap: 12px; }
  .nav a { font-size: 0.82rem; }
  .h1-main { font-size: 1.75rem; }
  .h1-sub { font-size: 0.95rem; }
  .lead br { display: none; }
  .section { padding: 44px 0; }
  .section-title { font-size: 1.35rem; }
  .app-list { grid-template-columns: 1fr; }
  .chara-face { width: 88px; }
  .sheet-link { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .sheet-thumb { width: 100%; }
  .sheet-label { text-align: center; }
}
