/* ============================================================
   けいさんカード — 静的ページ(about / guide / privacy)用
   アプリ本体(style.css)とデザイントークンを共有しつつ、
   スクロール・テキスト選択ができる「読むページ」として組む
   ============================================================ */

:root {
  --paper: #fff6e9;
  --ink: #453a2f;
  --grid: rgba(69, 58, 47, 0.08);
  --white: #fffdf8;
  --add: #ff8a5c;
  --add-soft: #ffe3d6;
  --sub: #62b6e8;
  --sub-soft: #ddf0fc;
  --sun: #ffd34e;
  --sun-soft: #fff3c4;
  --sun-deep: #c99a2e;
  --shadow: 0 5px 0 var(--ink);
  --font-ui: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  line-height: 1.9;
  -webkit-tap-highlight-color: transparent;
}

.doc {
  max-width: 720px;
  margin: 0 auto;
  /* ホーム画面から起動したときは画面の端まで表示領域になるため、
     上端の時計・下端のホームバーに文字が重ならないよう余白を足す */
  padding:
    calc(24px + env(safe-area-inset-top, 0px))
    20px
    calc(48px + env(safe-area-inset-bottom, 0px));
}

/* アプリアイコン(計算カード)を文字の横に置く。
   隣のテキストが名前を伝えているので alt は空にする */
.doc .doc-icon {
  width: 1.6em;
  height: 1.6em;
  vertical-align: -0.4em;
  border-radius: 6px;
  margin-right: 6px;
}

/* ボタン風のリンク(ブランド・CTA)は、下の「.doc a」の下線指定に
   負けないよう a.〜 で詳細度を上げる */
.doc a.doc-brand {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--ink);
  padding: 4px 14px;
  margin-bottom: 28px;
}

.doc h1 {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 8px;
}

.doc .doc-lead {
  margin-bottom: 28px;
}

.doc h2 {
  font-size: 1.2rem;
  font-weight: 900;
  margin: 36px 0 12px;
  padding-left: 12px;
  border-left: 8px solid var(--sun);
}

.doc h3 {
  font-size: 1.02rem;
  font-weight: 900;
  margin: 22px 0 6px;
}

.doc p,
.doc li {
  font-weight: 700;
}

.doc ul,
.doc ol {
  padding-left: 1.4em;
  margin: 8px 0 16px;
}

.doc li {
  margin-bottom: 4px;
}

.doc a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--sun-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* 白いカード(アプリの.stickerと同じ調子) */
.doc-card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin: 16px 0 24px;
}

.doc-card p:last-child,
.doc-card ul:last-child,
.doc-card dl:last-child {
  margin-bottom: 0;
}

/* モード紹介などの色チップ */
.doc-chip {
  display: inline-block;
  min-width: 5.5em;
  text-align: center;
  font-weight: 900;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 0 12px;
  margin-right: 8px;
}
.doc-chip.chip-add { background: var(--add-soft); }
.doc-chip.chip-sub { background: var(--sub-soft); }
.doc-chip.chip-clock { background: var(--sun-soft); }

/* 定義リスト(運営者情報など) */
.doc dl {
  margin: 8px 0 16px;
}
.doc dl div {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 2px dashed var(--grid);
}
.doc dt {
  flex: 0 0 8em;
  font-weight: 900;
}
.doc dd {
  flex: 1;
}

.doc-date {
  margin-top: 28px;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* アプリへ戻る大きなボタン */
.doc a.doc-cta {
  display: block;
  width: fit-content;
  margin: 36px auto 0;
  font-size: 1.1rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--ink);
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 12px 32px;
}
.doc a.doc-cta:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink);
}

/* ページ下部の相互リンク */
.doc-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 3px solid var(--ink);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
