/* おうちルール 案内ページ共通スタイル（アプリの「藍と朱」・通帳とハンコのデザインに準拠） */
:root {
  --bg: #fff6e9;
  --paper: #ffffff;
  --line: #efe6d2;
  --rule: #e6dcc6;
  --ink: #23307a;
  --ink-deep: #141d52;
  --sub: #5d6390;
  --muted: #8a8fb0;
  --stamp: #e8492a;
  --stamp-text: #c93a1e;
  --gold: #ffc23a;
  --soft: #e9ebf5;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --num: "Dela Gothic One", "Zen Maru Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--round);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: 0.02em;
}

a { color: var(--ink); text-decoration-color: rgba(35, 48, 122, 0.35); text-underline-offset: 3px; }
a:hover { color: var(--stamp-text); }
strong { font-weight: 900; }

/* ---------- 通帳の表紙のヘッダー ---------- */
.cover {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 40px;
  color: #fff;
  /* 青海波（通帳の表紙の地紋）。上に薄い影を重ねて奥行きを出す */
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Cg stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.3' fill='none'%3E%3Ccircle cx='0' cy='0' r='20' fill='%2323307a'/%3E%3Ccircle cx='0' cy='0' r='20'/%3E%3Ccircle cx='0' cy='0' r='15'/%3E%3Ccircle cx='0' cy='0' r='10'/%3E%3Ccircle cx='0' cy='0' r='5'/%3E%3Ccircle cx='40' cy='0' r='20' fill='%2323307a'/%3E%3Ccircle cx='40' cy='0' r='20'/%3E%3Ccircle cx='40' cy='0' r='15'/%3E%3Ccircle cx='40' cy='0' r='10'/%3E%3Ccircle cx='40' cy='0' r='5'/%3E%3Ccircle cx='20' cy='10' r='20' fill='%2323307a'/%3E%3Ccircle cx='20' cy='10' r='20'/%3E%3Ccircle cx='20' cy='10' r='15'/%3E%3Ccircle cx='20' cy='10' r='10'/%3E%3Ccircle cx='20' cy='10' r='5'/%3E%3Ccircle cx='0' cy='20' r='20' fill='%2323307a'/%3E%3Ccircle cx='0' cy='20' r='20'/%3E%3Ccircle cx='0' cy='20' r='15'/%3E%3Ccircle cx='0' cy='20' r='10'/%3E%3Ccircle cx='0' cy='20' r='5'/%3E%3Ccircle cx='40' cy='20' r='20' fill='%2323307a'/%3E%3Ccircle cx='40' cy='20' r='20'/%3E%3Ccircle cx='40' cy='20' r='15'/%3E%3Ccircle cx='40' cy='20' r='10'/%3E%3Ccircle cx='40' cy='20' r='5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 40px 20px;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(60, 80, 170, 0.35) 0%, rgba(35, 48, 122, 0) 45%, rgba(10, 16, 60, 0.55) 100%);
  pointer-events: none;
}
.cover::after {
  /* 表紙の下の、通帳の綴じ目のような二重線 */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: var(--bg);
  border-top: 4px double var(--rule);
}
.cover-inner { position: relative; max-width: 720px; margin: 0 auto; }

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.home-link:hover { color: #fff; }
.home-link svg { width: 18px; height: 18px; }

.hero { position: relative; padding: 18px 0 8px; max-width: 520px; }
.app {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.08em;
}
.app img { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.kicker { margin: 22px 0 4px; color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: 0.3em; }
.hero h1 { margin: 0; font-size: clamp(30px, 7vw, 40px); line-height: 1.3; font-weight: 900; text-wrap: balance; }
.lead { margin: 12px 0 0; color: rgba(255, 255, 255, 0.86); font-size: 14px; line-height: 1.85; }

/* 表紙の右上に押されたハンコ */
.hanko {
  position: absolute;
  top: 6px;
  right: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--stamp);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-12deg);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  animation: stamp 0.7s cubic-bezier(0.3, 1.3, 0.5, 1) both 0.3s;
}
.hanko span {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.2;
}
@keyframes stamp {
  0% { opacity: 0; transform: scale(2.2) rotate(-30deg); }
  60% { opacity: 1; transform: scale(0.9) rotate(-10deg); }
  100% { opacity: 1; transform: scale(1) rotate(-12deg); }
}
@media (max-width: 520px) {
  .hanko { top: 4px; width: 74px; height: 74px; }
  .hanko span { width: 62px; height: 62px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .hanko { animation: none; } }

/* ---------- 本文 ---------- */
main { max-width: 720px; margin: 0 auto; padding: 24px 20px 56px; }

.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 18px; color: var(--sub); font-size: 12px; font-weight: 700; }
.meta span { font-variant-numeric: tabular-nums; }

main > p { margin: 0 0 8px; }

section { margin-top: 30px; }
h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 4px double var(--rule);
  font-size: 19px;
  line-height: 1.45;
  font-weight: 900;
  text-wrap: balance;
}
/* 見出しの番号は、小さな朱色のハンコ */
.num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--stamp);
  color: #fff;
  font-family: var(--num);
  font-weight: 400;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 0 3px var(--stamp), inset 0 0 0 4.5px rgba(255, 255, 255, 0.8);
}
h3 { margin: 18px 0 6px; font-size: 16px; font-weight: 900; }

ul, ol { margin: 8px 0; padding-left: 1.4em; }
li { margin: 6px 0; }
li::marker { color: var(--stamp); }

.card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}

.table-wrap { overflow-x: auto; margin: 12px 0; border-radius: 18px; border: 2px solid var(--line); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.8; min-width: 520px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 2px dotted var(--line); }
tr:last-child td { border-bottom: none; }
th { background: var(--soft); font-weight: 900; font-size: 12px; letter-spacing: 0.1em; }
td:first-child { width: 30%; font-weight: 900; }
@media (max-width: 600px) {
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  thead { display: none; }
  tr { display: block; padding: 12px 16px; border-bottom: 2px dotted var(--line); }
  tr:last-child { border-bottom: none; }
  td { display: block; width: auto; padding: 0; border: none; }
  td:first-child { width: auto; margin-bottom: 4px; color: var(--stamp-text); font-size: 13px; letter-spacing: 0.05em; }
}

/* 期間の一覧（保管期間） */
.ledger { margin: 12px 0; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 4px 16px; }
.ledger div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 2px dotted var(--line); }
.ledger div:last-child { border-bottom: none; }
.ledger dt { font-weight: 900; }
.ledger dd { margin: 0; color: var(--sub); text-align: right; font-weight: 700; }
.ledger dd b { color: var(--ink); font-family: var(--num); font-weight: 400; }

.note { margin: 12px 0; padding: 12px 16px; border-radius: 16px; background: #fff1cf; color: #6b4700; font-size: 14px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 8px;
  padding: 0 22px;
  border-radius: 26px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ink-deep);
}
.button:hover { color: #fff; transform: translateY(1px); box-shadow: 0 3px 0 var(--ink-deep); }
.button svg { width: 20px; height: 20px; }

/* よくある質問 */
details { background: var(--paper); border: 2px solid var(--line); border-radius: 16px; margin: 10px 0; }
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
  font-weight: 900;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "Q";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--num);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2.5px solid var(--sub); border-bottom: 2.5px solid var(--sub); transform: rotate(45deg); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(-135deg); }
details > div { padding: 0 16px 14px 56px; color: var(--ink); }
details > div p { margin: 0 0 6px; }

.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.links a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--paper);
  border: 2px solid var(--line);
  font-weight: 900;
  text-decoration: none;
}
.links a span { color: var(--sub); font-size: 12px; font-weight: 700; }
.links a:hover { border-color: var(--ink); color: var(--ink); }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 20px 40px;
  border-top: 4px double var(--rule);
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
}
.seal {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--stamp);
  color: var(--stamp);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  transform: rotate(-10deg);
}
