/* ちょりちゃん、HP  —  クリームの紙に、黒いペンの線 */
:root {
  --paper: #fbf0dc;      /* アイコンの背景と同じクリーム */
  --paper-2: #f6e6c8;
  --ink: #1f1a17;        /* ペンの黒 */
  --ink-soft: #4a423b;
  --pink: #f2b8c0;       /* 漫画の花の色 */
  --blue: #b9cde8;
  --yellow: #f5d98a;
  --line: 2.5px solid var(--ink);
  --hand: "Yomogi", "Zen Maru Gothic", sans-serif;
  --body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.9;
  overflow-x: hidden;
  word-break: auto-phrase;   /* 日本語を文節で折り返す */
  text-wrap: pretty;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { text-decoration-color: #d98a96; }

/* 上のバー */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(251, 240, 220, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1.5px solid rgba(31, 26, 23, .12);
}
.logo { font-family: var(--hand); font-size: 22px; text-decoration: none; white-space: nowrap; }
.bar nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 15px; }
.bar nav a { text-decoration: none; white-space: nowrap; }
.bar nav a:hover { text-decoration: underline; }

/* 最初の画面 */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex; align-items: center;
  padding: 48px calc(240px + 6vw) 48px clamp(20px, 8vw, 120px);
}
.hero-text { position: relative; z-index: 1; }
.hello { font-family: var(--hand); font-size: 20px; margin: 0 0 4px; color: var(--ink-soft); }
.hero h1 {
  font-family: var(--hand); font-weight: 400;
  font-size: clamp(44px, 8vw, 100px);
  line-height: 1.15; margin: 0 0 24px; letter-spacing: .02em; white-space: nowrap;
}
.catch { font-family: var(--hand); font-size: clamp(22px, 4.2vw, 34px); line-height: 1.6; margin: 0; }
.hero-chira {
  position: absolute; right: clamp(8px, 6vw, 96px); bottom: 0;
  height: min(70vh, 520px); width: auto;
  animation: peek 1.4s ease-out .3s both;
}
@keyframes peek {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* 区切り */
.block {
  max-width: 1080px; margin: 0 auto;
  padding: 72px clamp(20px, 5vw, 40px);
  border-top: 2px dashed rgba(31, 26, 23, .18);
}
.block h2 {
  font-family: var(--hand); font-weight: 400; font-size: clamp(30px, 5vw, 40px);
  margin: 0 0 8px; display: inline-block; position: relative;
}
.block h2::after { /* 色鉛筆でひいたような下線 */
  content: ""; position: absolute; left: -4px; right: -4px; bottom: 6px; height: 12px;
  background: var(--yellow); opacity: .6; z-index: -1; border-radius: 6px;
}
#about h2::after { background: var(--pink); }
#sns h2::after { background: var(--blue); }
.lead { margin: 0 0 32px; color: var(--ink-soft); }

/* まんが */
.comics {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.comic {
  all: unset; cursor: pointer; display: block; width: 100%;
  background: #fff; border: var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 5px 6px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.comic:hover, .comic:focus-visible { transform: translate(-2px, -3px); box-shadow: 7px 9px 0 var(--ink); }
.comic:focus-visible { outline: 3px solid #d98a96; outline-offset: 4px; }
.comic-title {
  display: block; padding: 10px 16px 12px; border-top: var(--line);
  font-family: var(--hand); font-size: 22px; background: var(--paper);
}
.comic-title::after { content: "  →"; color: var(--ink-soft); font-size: 18px; }
.more { margin: 32px 0 0; }

/* ちょりちゃん、って */
.about-body { display: flex; gap: clamp(24px, 5vw, 56px); align-items: center; }
.about-pic { width: clamp(130px, 22vw, 210px); flex-shrink: 0; }
.about-body p { margin: 0 0 18px; font-size: 18px; }
.voice { font-family: var(--hand); font-size: 26px !important; margin-top: 8px !important; }
.faces { list-style: none; margin: 40px 0 0; padding: 0; display: flex; gap: clamp(16px, 5vw, 48px); justify-content: center; }
.faces img { height: clamp(90px, 16vw, 150px); width: auto; }
.faces li:nth-child(1) { transform: rotate(-4deg); }
.faces li:nth-child(2) { transform: translateY(-10px); }
.faces li:nth-child(3) { transform: rotate(3deg); }

/* LINEスタンプ */
#line h2::after { background: #a8dcb4; }
.badge {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 12px 3px;
  font-family: var(--body); font-weight: 700; font-size: 15px; line-height: 1.5;
  background: #06c755; color: #fff; border-radius: 999px;
}
.stamps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stamps a {
  display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100%;
  padding: 24px 12px 16px; background: #fff; border: var(--line); border-radius: 14px;
  text-decoration: none; box-shadow: 4px 5px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.stamps a:hover { transform: translate(-2px, -3px); box-shadow: 6px 8px 0 var(--ink); }
.stamps img { height: clamp(90px, 16vw, 170px); width: auto; max-width: 100%; object-fit: contain; }
.stamps span { font-family: var(--hand); font-size: clamp(14px, 2.4vw, 22px); white-space: nowrap; }

/* SNS */
.sns { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sns a {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline;
  padding: 14px 18px; background: #fff; border: var(--line); border-radius: 12px;
  text-decoration: none; box-shadow: 3px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
  height: 100%;
}
.sns a:hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.sns-name { font-weight: 700; font-size: 18px; }
.sns-id { color: var(--ink-soft); font-size: 15px; overflow-wrap: anywhere; }
.sns-note { grid-column: 1 / -1; font-size: 14px; color: var(--ink-soft); }

.contact p { margin: 0; }

/* 下 */
.foot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 48px 20px 40px; border-top: 2px dashed rgba(31, 26, 23, .18);
  font-size: 14px; color: var(--ink-soft);
}
.foot img { border-radius: 50%; border: 2px solid var(--ink); }
.foot p { margin: 0; }

/* まんがを開いたとき */
#viewer {
  padding: 0; border: var(--line); border-radius: 14px; background: #fff;
  width: min(640px, 94vw); max-height: 92vh; overflow-y: auto;
}
#viewer::backdrop { background: rgba(31, 26, 23, .55); }
.viewer-bar {
  position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px 8px 18px; background: var(--paper); border-bottom: var(--line);
  font-family: var(--hand); font-size: 20px;
}
.viewer-bar button {
  font: inherit; font-size: 16px; cursor: pointer; padding: 4px 12px;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink);
}

/* スマホ */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar { flex-direction: column; gap: 2px; padding: 8px 16px; }
  .bar nav { font-size: 14px; }
  .hero { min-height: 78vh; align-items: flex-start; padding: 48px 20px 0; }
  .hero h1 { font-size: clamp(34px, 11vw, 56px); }
  .hero-chira { height: min(44vh, 340px); right: 4vw; }
  .about-body { flex-direction: column; text-align: center; }
  .about-body p { font-size: 16px; }
  .stamps { grid-template-columns: 1fr; gap: 14px; }
  .stamps a { flex-direction: row; gap: 20px; padding: 10px 20px; box-shadow: 3px 4px 0 var(--ink); }
  .stamps img { height: 84px; width: auto; max-width: none; flex-shrink: 0; }
  .stamps span { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-chira { animation: none; }
  html { scroll-behavior: auto; }
}
