/* SafePost — スケッチブック風（アプリ Home の手描きの絵に合わせる） */
:root {
  color-scheme: light;
  --desk: #ECE6D9;          /* 紙を置く机 */
  --paper: #FFFDF7;         /* 紙 */
  --grid: rgba(60, 70, 90, 0.07);
  --ink: #2C2B28;           /* 鉛筆 */
  --ink-soft: #55534D;
  --ink-faint: #8A877F;
  --accent: #4E7A5E;        /* アプリのアクセント */
  --accent-soft: rgba(78, 122, 94, 0.14);
  --alert: #C8443A;
  --blue: #1E6BFF;          /* アイコンの青 */
  --marker: rgba(255, 214, 92, 0.75);
  --sticky: #FFF3BF;
  --tape: rgba(214, 200, 160, 0.55);

  --hand: 'Klee One', 'Zen Maru Gothic', sans-serif;
  --body: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  --latin-hand: 'Caveat', 'Klee One', cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-family: var(--hand); font-weight: 600; margin: 0; line-height: 1.45; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
img { max-width: 100%; display: block; }

/* ===== 紙 ===== */
.sheet {
  position: relative;
  max-width: 1040px;
  margin: 28px auto 40px;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle, var(--grid) 1.1px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 18px 40px -18px rgba(60, 50, 30, 0.35);
}
/* マスキングテープ */
.sheet::before, .sheet::after {
  content: '';
  position: absolute; top: -12px;
  width: 110px; height: 26px;
  background: var(--tape);
  border-left: 1px dashed rgba(255,255,255,0.5);
  border-right: 1px dashed rgba(255,255,255,0.5);
}
.sheet::before { left: 38px; transform: rotate(-4deg); }
.sheet::after { right: 38px; transform: rotate(3deg); }

/* ノートの余白線（広い画面のみ） */
@media (min-width: 760px) {
  .sheet { background-image:
      linear-gradient(to right, transparent 63px, rgba(200, 68, 58, 0.28) 63px, rgba(200, 68, 58, 0.28) 64px, transparent 64px),
      radial-gradient(circle, var(--grid) 1.1px, transparent 1.3px);
    background-size: auto, 22px 22px;
    background-position: 0 0, 11px 11px;
  }
}

.inner { padding: 0 20px; }
@media (min-width: 760px) { .inner { padding: 0 56px 0 96px; } }

/* ===== 手描きの重ね絵 ===== */
[data-rough] { position: relative; }
.rough-overlay { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
html:not(.js) [data-rough="box"] { border: 1.5px dashed var(--ink-soft); }

svg[data-sketch] { display: block; width: 100%; height: auto; overflow: visible; }
.sk { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sk.ink { stroke: var(--ink); stroke-opacity: 0.82; }
.sk.accent { stroke: var(--accent); }
.sk.alert { stroke: var(--alert); stroke-opacity: 0.9; }
.sk.marker { stroke: var(--marker); stroke-width: 7; stroke-opacity: 1; }
.sk.thin { stroke-width: 1.2; }
.sk.faded { stroke-opacity: 0.7; }
.sk-paper { fill: var(--ink); fill-opacity: 0.035; }
.sk-paper-solid { fill: var(--paper); fill-opacity: 0.85; }
.sk-cell { fill: var(--ink); }
.sk-fill { fill-opacity: 0.85; }
.sk-fill.c-ink { fill: var(--ink); }
.sk-fill.c-alert { fill: var(--alert); }
.sk-fill.c-blue { fill: var(--blue); }
.sk-knob { fill: var(--paper); }
.sk-swatch.c-ink { fill: var(--ink); }
.sk-swatch.c-accent { fill: var(--accent); }
.sk-swatch.c-alert { fill: var(--alert); }
.sk-swatch.c-blue { fill: var(--blue); }
.sk-swatch.c-white { fill: #fff; }
.sk-tile { font-family: var(--latin-hand); font-weight: 700; font-size: 12px; fill: var(--accent); fill-opacity: 0.28; }
.sk-text { dominant-baseline: middle; text-anchor: middle; }
.sk-text.label { font-family: var(--body); font-size: 12px; fill: var(--ink); fill-opacity: 0.85; }
.sk-text.small { font-size: 10px; }
.sk-text.hand { font-family: var(--latin-hand); font-weight: 700; font-size: 16px; fill: var(--accent); }
.sk-text.hand.big { font-size: 22px; }
.sk-text.hand-jp { font-family: var(--hand); font-weight: 600; font-size: 11px; }
.sk-text.accent-text { fill: var(--accent); }
.sk-text.alert-text { fill: var(--alert); }

/* 線を描いていく */
html.js .sk { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.js .sk-text { opacity: 0; }
html.js .drawn .sk {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.7s ease calc(var(--i, 0) * 45ms);
}
html.js .drawn .sk-text { opacity: 1; transition: opacity 0.6s ease calc(var(--i, 0) * 45ms); }
@media (prefers-reduced-motion: reduce) {
  html.js .sk { stroke-dashoffset: 0; }
  html.js .sk-text { opacity: 1; }
  html.js .drawn .sk, html.js .drawn .sk-text { transition: none; }
}

/* ===== ヘッダー ===== */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 30px; padding-bottom: 8px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--hand); font-weight: 600; font-size: 21px;
  color: var(--ink); text-decoration: none;
}
.wordmark img { width: 34px; height: 34px; transform: rotate(-4deg); filter: drop-shadow(0 2px 3px rgba(0,0,0,0.18)); }
.header-link { font-size: 13.5px; color: var(--ink-soft); }

/* ===== 共通の部品 ===== */
.mark {
  background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
  padding: 0 2px;
}
.hand-note {
  font-family: var(--hand); font-weight: 600;
  color: var(--accent);
  display: inline-block; transform: rotate(-2deg);
}
.section { padding-top: 72px; }
.section-title {
  font-size: clamp(24px, 4.2vw, 32px);
  display: inline-block;
}
.section-lead { margin-top: 14px; color: var(--ink-soft); }

.store-link {
  display: inline-block;
  font-family: var(--hand); font-weight: 600; font-size: 17px;
  color: var(--ink);
  padding: 10px 22px;
  margin: 14px 18px;
  text-decoration: none;
  transition: transform .15s ease;
}
.store-link:hover { transform: rotate(-1.5deg) scale(1.03); }
.store-link small { display: block; font-family: var(--body); font-weight: 500; font-size: 12px; color: var(--ink-faint); line-height: 1.4; }

/* ===== フッター ===== */
.site-footer {
  margin-top: 88px;
  padding-top: 28px; padding-bottom: 36px;
  border-top: 1.5px dashed rgba(44, 43, 40, 0.22);
  font-size: 13px; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer a { color: var(--ink-soft); }

@media (max-width: 759px) {
  .sheet { margin: 18px 10px 24px; }
  .sheet::before { left: 18px; width: 84px; }
  .sheet::after { right: 18px; width: 84px; }
}
