/* マッチングアプリ 続けた期間の総額くらべ ― 世界観は「恋の家計簿」：机の上の感熱紙のレシート、点々の字、蛍光ペンの線。
   共通の base.css は読まない（site.json look: own）
   字体：DotGothic16（レシートの字・金額）＋ M PLUS 1（見出し・本文）
   動きの型：「刷る・引く」― 明細は 1 行ずつ刷られ、いちばん安い行に蛍光ペンが引かれる */
:root {
  --desk: #f1e4dc; --desk-2: #e9d6cb; --paper: #fffdf9; --ink: #1f1b1d; --ink-2: #6f6468; --ink-3: #75696e;
  --coral: #bd2a40; --coral-2: #ff8f9d; --marker: rgba(255, 143, 157, .42); --rule: #e6dcd6;
  --dot: "DotGothic16", ui-monospace, "Osaka-Mono", monospace;
  --sans: "M PLUS 1", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --zig: 9px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.85; letter-spacing: .02em;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(232, 69, 90, .14), transparent 60%),
    radial-gradient(80% 50% at 0% 30%, rgba(255, 200, 150, .25), transparent 60%),
    var(--desk);
}
a { color: var(--coral); text-underline-offset: 3px; }
:focus-visible { outline: 2px dashed var(--coral); outline-offset: 3px; }
strong { font-weight: 800; }
p { margin: 0 0 1em; }
input, button { font: inherit; }

/* ── 頭 ── */
.site-header { padding: 14px 20px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; border-bottom: 1px dashed rgba(31, 27, 29, .25); }
.site-name { font-family: var(--dot); color: var(--ink); text-decoration: none; font-size: .88rem; letter-spacing: .02em; }
.site-name::before { content: "♥ "; color: var(--coral); }
.pr-notice { margin: 0; font-size: 0.8rem; color: var(--ink-2); }

/* ── 本文の柱 ── */
.site-main { max-width: 680px; margin: 0 auto; padding: 0 18px 24px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; line-height: 1.4; letter-spacing: .02em; }
h2 { font-size: 1.25rem; margin: 52px 0 14px; }
.site-main > h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); margin: 40px 0 14px; }
.lead { color: var(--ink-2); font-size: .94rem; }
.hint { font-size: 0.94rem; color: var(--ink-2); }
.source, caption.source { font-size: 0.8rem; color: var(--ink-3); overflow-wrap: anywhere; caption-side: bottom; text-align: left; padding-top: 8px; }
.num { font-family: var(--dot); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

/* ── 冒頭 ── */
.hero { padding: 42px 0 6px; }
.hero-kicker { display: inline-block; font-family: var(--dot); font-size: .82rem; color: var(--paper); background: var(--ink); padding: 2px 10px; margin: 0 0 16px; letter-spacing: .14em; }
.hero h1 { margin: 0 0 18px; }
.h1-a { display: block; font-size: 1.02rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.h1-b { display: block; font-size: clamp(2.1rem, 10vw, 3.3rem); line-height: 1.18; letter-spacing: -.01em; }
.hero .lead strong { background: linear-gradient(transparent 58%, var(--marker) 58%); color: var(--ink); }

/* ── レシート（計算機） ── */
.receipt {
  position: relative; background: var(--paper); padding: 34px 22px 40px; margin: 26px 0 10px;
  filter: drop-shadow(0 18px 22px rgba(80, 40, 30, .18)) drop-shadow(0 2px 2px rgba(80, 40, 30, .08));
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--zig) * 2) var(--zig) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--zig) * 2) var(--zig) repeat-x,
    linear-gradient(#000, #000) center / 100% calc(100% - var(--zig) * 2) no-repeat;
          mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--zig) * 2) var(--zig) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--zig) * 2) var(--zig) repeat-x,
    linear-gradient(#000, #000) center / 100% calc(100% - var(--zig) * 2) no-repeat;
}
.receipt::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .025), transparent 6%, transparent 94%, rgba(0, 0, 0, .025)); }
.rc-head { display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--dot); text-align: center; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--ink-3); }
.rc-head span:first-child { font-size: 1rem; letter-spacing: .1em; }
.rc-head span:last-child { font-size: 0.94rem; color: var(--ink-2); }
.receipt h2 { margin: 0 0 4px; font-family: var(--dot); font-weight: 400; font-size: .95rem; letter-spacing: .08em; color: var(--ink-2); }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.months-out { font-family: var(--dot); font-size: 3.6rem; line-height: 1; margin: 6px 0 8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.months-out small { font-family: var(--sans); font-size: 1rem; font-weight: 800; margin-left: 8px; }

/* 月の目盛りのスライダー */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 14px; background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px calc((100% - 1.5px) / 11)) 0 100% / 100% 100% no-repeat, linear-gradient(var(--rule), var(--rule)) 0 100% / 100% 2px no-repeat; }
input[type="range"]::-moz-range-track { height: 14px; background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px calc((100% - 1.5px) / 11)) 0 100% / 100% 100% no-repeat, linear-gradient(var(--rule), var(--rule)) 0 100% / 100% 2px no-repeat; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--coral); border: 4px solid var(--paper); box-shadow: 0 0 0 1.5px var(--coral), 0 6px 12px rgba(232, 69, 90, .4); transition: transform .15s; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--coral); border: 4px solid var(--paper); box-shadow: 0 0 0 1.5px var(--coral); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }
.ticks { display: flex; justify-content: space-between; font-family: var(--dot); font-size: 0.8rem; color: var(--ink-2); margin: 0 2px; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
legend { font-weight: 800; padding: 0; margin-bottom: 8px; font-size: .9rem; }

/* レジのキー */
.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pills label { margin: 0; position: relative; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  background: #f6efe9; color: var(--ink); font-weight: 800; font-size: .92rem; box-shadow: 0 3px 0 #d9cbc1, 0 0 0 1px #e2d5cc inset;
  transition: transform .08s, box-shadow .08s, background .2s, color .2s;
}
.pills span:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9cbc1, 0 0 0 1px #e2d5cc inset; }
.pills input:checked + span { background: var(--ink); color: var(--paper); box-shadow: 0 3px 0 #000, 0 0 0 1px var(--ink) inset; }
.pills input:focus-visible + span { outline: 2px dashed var(--coral); outline-offset: 3px; }

/* 明細の行 */
.receipt h3 { display: flex; align-items: center; gap: 10px; font-family: var(--dot); font-weight: 400; font-size: 0.94rem; margin: 26px 0 6px; color: var(--ink-2); }
.receipt h3::before, .receipt h3::after { content: ""; flex: 1; border-top: 1px dashed var(--ink-3); }
.results { list-style: none; padding: 0; margin: 0; font-family: var(--dot); }
.results li { position: relative; display: grid; grid-template-columns: 1.7em minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; padding: 11px 0 9px; border-bottom: 1px dotted var(--ink-3); }
.results .rank { color: var(--ink-3); font-size: .9rem; }
.results .name { font-family: var(--sans); font-weight: 800; font-size: .98rem; min-width: 0; overflow-wrap: anywhere; display: flex; align-items: baseline; gap: 6px; }
.results .name::after { content: ""; flex: 1; min-width: 12px; border-bottom: 2px dotted var(--ink-3); translate: 0 -4px; }
.results .total { font-size: 1.25rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.results .how { grid-column: 2 / -1; font-family: var(--sans); font-size: 0.94rem; color: var(--ink-2); line-height: 1.6; margin-top: 2px; }
.results li:first-child { padding-top: 30px; }
.results li:first-child .rank { color: var(--coral); }
.results li:first-child .total { font-size: 1.7rem; color: var(--coral); }
.results li:first-child .name { text-decoration: underline 9px var(--marker); text-underline-offset: -5px; text-decoration-skip-ink: none; }
.results li:first-child::before { content: "最安"; position: absolute; right: 0; top: 2px; font-family: var(--sans); font-weight: 800; font-size: 0.8rem; color: var(--paper); background: var(--coral); padding: 1px 8px; border-radius: 3px; rotate: 4deg; }
.missing { font-size: 0.94rem; color: var(--ink-2); margin-top: 10px; }
.rc-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 24px 0 0; padding-top: 16px; border-top: 1px dashed var(--ink-3); font-family: var(--dot); font-size: 0.94rem; color: var(--ink-2); }
.barcode { width: 190px; height: 38px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 16px); }

/* ── 下の段：付箋のような箇条書き ── */
.site-main > ul { list-style: none; padding: 0; }
.site-main > ul li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px dashed rgba(31, 27, 29, .18); font-size: 0.94rem; }
.site-main > ul li::before { content: "♥"; position: absolute; left: 2px; top: 10px; color: var(--coral); font-size: .8rem; }
.card { background: var(--paper); padding: 20px; border-radius: 4px; box-shadow: 0 14px 24px -18px rgba(80, 40, 30, .45); }
.summary { background: var(--paper); padding: 16px 18px; border-left: 4px solid var(--coral); border-radius: 0 4px 4px 0; font-size: 0.94rem; }

/* 表：レシートの明細 */
.table-wrap { overflow-x: auto; background: var(--paper); padding: 6px 14px 10px; border-radius: 4px; box-shadow: 0 14px 24px -18px rgba(80, 40, 30, .45); }
table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px dotted var(--ink-3); }
th { font-family: var(--dot); font-weight: 400; color: var(--ink-2); font-size: 0.8rem; border-bottom: 1px dashed var(--ink); }
tbody tr:first-child td { color: var(--coral); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

/* 割引率の分布 */
.dist { list-style: none; padding: 0; margin: 10px 0; }
.dist li { display: grid; grid-template-columns: 5.5em 1fr 2.6em; gap: 6px 10px; align-items: center; margin: 10px 0; font-family: var(--dot); font-size: 0.94rem; }
.dist .bar { height: 16px; background: repeating-linear-gradient(90deg, rgba(31, 27, 29, .12) 0 2px, transparent 2px 6px); min-width: 2px; }
.dist .bar span { display: block; height: 100%; background: var(--coral); transform-origin: left; }
.dist .who { grid-column: 2 / -1; font-family: var(--sans); font-size: 0.8rem; color: var(--ink-2); margin-top: -4px; }

.apps { list-style: none; padding: 0; }
.apps > li { margin-bottom: 18px; }
.apps h3 { margin-top: 0; }
.apps dl { margin: 6px 0 0; font-size: 0.94rem; }
.apps dt { font-weight: 800; }
.apps dd { margin: 0 0 4px; overflow-wrap: anywhere; }
.ad-slot { margin: 24px 0; padding: 12px; border: 1px dashed var(--ink-3); }

/* ── 足 ── */
.site-footer { margin-top: 72px; background: var(--ink); color: #b9adb1; text-align: center; padding: 34px 20px 28px; font-size: 0.94rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; }
.site-footer a { color: #f4ece8; text-decoration: none; display: inline-block; padding: 8px 0; }
.copyright { margin: 10px 0 0; font-family: var(--dot); }

/* 積み上がる硬貨の絵：月を重ねるほど払う額が増える（金額は書かない）。スマホでは小さく、PC では左の空きを埋める（12/1 採点） */
.stack { margin: 18px 0 0; }
.coins { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 4px; height: 64px; }
.coins i { display: block; height: calc(var(--h) * 8.3%); border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(0deg, #d9a93b 0 4px, #f2cd6b 4px 6px); box-shadow: inset 0 0 0 1px rgba(120, 80, 10, .35); }
.coins i:nth-child(n+7) { background: repeating-linear-gradient(0deg, var(--coral) 0 4px, var(--coral-2) 4px 6px); }
.stack figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 0.8rem; color: var(--ink); }
.stack figcaption b { font-weight: 800; }
@media (min-width: 960px) { .coins { height: 150px; gap: 8px; } .stack { margin-top: 36px; } .stack figcaption { font-size: 0.9rem; } }

/* ── PC：レシートを机の右に、文を左に ── */
@media (min-width: 960px) {
  .site-main { max-width: 1160px; padding-inline: 40px; display: grid; grid-template-columns: minmax(0, 1fr) 460px; column-gap: 72px; align-items: start; }
  .site-main > * { grid-column: 1 / -1; }
  .site-main > .hero { grid-column: 1; grid-row: 1; position: sticky; top: 40px; padding-top: 72px; }
  .site-main > .receipt { grid-column: 2; grid-row: 1; margin-top: 56px; }
  .site-main > h2, .site-main > ul, .site-main > p, .site-main > .ad-slot { grid-column: 1; }
  .h1-b { font-size: 3.4rem; }
}

/* ── 動き：刷る・引く ── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .hero > * { animation: up .7s cubic-bezier(.2, .8, .2, 1) both; }
  .hero > :nth-child(2) { animation-delay: .08s; } .hero > :nth-child(3) { animation-delay: .16s; }
  @keyframes up { from { opacity: 0; transform: translateY(14px); } }
  .receipt { animation: feed 1s .2s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes feed { from { clip-path: inset(0 0 100% 0); transform: translateY(-30px); } to { clip-path: inset(0 0 -60px 0); transform: none; } }
  .results li { animation: print .32s cubic-bezier(.2, .8, .2, 1) both; }
  .results li:nth-child(2) { animation-delay: .04s; } .results li:nth-child(3) { animation-delay: .08s; } .results li:nth-child(4) { animation-delay: .12s; }
  .results li:nth-child(5) { animation-delay: .16s; } .results li:nth-child(6) { animation-delay: .2s; } .results li:nth-child(7) { animation-delay: .24s; } .results li:nth-child(n+8) { animation-delay: .28s; }
  @keyframes print { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
  .results li:first-child::before { animation: pop .4s .45s cubic-bezier(.2, 1.6, .4, 1) both; }
  @keyframes pop { from { opacity: 0; transform: scale(.4); } }
  .months-out { transition: color .2s; }
  .dist .bar span { animation: grow 1s .2s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes grow { from { transform: scaleX(0); } }
  ::view-transition-old(root) { animation: vt-out .25s ease both; }
  ::view-transition-new(root) { animation: vt-in .4s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
}

/* ── アプリごとの個別ページ：公式の文を「領収書の控え」に写す。言いかえ（太字）→ 公式の文（点々の字＋蛍光ペン）→ 出どころ ── */
.crumbs { margin: 22px 0 0; font-size: 0.88rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.site-main > h1 small { display: block; font-size: 0.95rem; font-weight: 600; color: var(--coral); margin-top: 6px; letter-spacing: .06em; }
.checked-line { font-size: 0.94rem; color: var(--ink-2); background: var(--paper); border-left: 4px solid var(--coral); padding: 10px 14px; border-radius: 0 4px 4px 0; }
.app-concept { font-size: 1rem; color: var(--ink); font-weight: 600; }
.app-concept .source, .app-facts .source { font-weight: 400; font-size: 0.88rem; color: #574d51; }
.app-facts { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px 14px; margin: 18px 0 0; background: var(--paper); padding: 16px 18px; border-radius: 4px; font-size: 0.94rem; box-shadow: 0 14px 24px -18px rgba(80, 40, 30, .45); }
.app-facts dt { font-family: var(--dot); color: var(--ink-2); }
.app-facts dd { margin: 0; overflow-wrap: anywhere; }
.price-box { margin-top: 36px; }
.price-box h2 { margin-top: 0; }
.price-box .table-wrap { box-shadow: none; padding: 0; }
.price-box small { color: var(--ink-2); font-size: 0.82rem; }
.fact-group h2 { display: flex; align-items: center; gap: 10px; }
.fact-group h2::after { content: ""; flex: 1; border-top: 2px dotted var(--ink-3); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts > li { position: relative; background: var(--paper); padding: 16px 18px 12px; border-radius: 4px; box-shadow: 0 14px 24px -18px rgba(80, 40, 30, .45); }
.facts > li > p:first-child { font-weight: 800; font-size: 1.02rem; margin-bottom: 8px; }
.quote { margin: 0 0 8px; font-family: var(--dot); font-size: 0.94rem; line-height: 1.75; color: var(--ink); background: linear-gradient(transparent 58%, var(--marker) 58%); display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.quote::before { content: "公式"; display: inline-block; margin-right: 8px; padding: 0 6px; font-size: 0.8rem; line-height: 1.6; color: var(--coral); border: 1.5px solid var(--coral); border-radius: 3px; transform: rotate(-4deg); }
.facts .source { margin: 10px 0 0; padding: 0; font-size: 0.82rem; color: #574d51; overflow-wrap: anywhere; }
.price-box .source { color: #574d51; }
.facts.fit > li { font-weight: 800; padding-left: 46px; }
.facts.fit > li::before { content: "♥"; position: absolute; left: 18px; top: 15px; color: var(--coral); }
.note { margin-top: 16px; font-size: 0.94rem; background: #fff3c4; padding: 12px 14px; border-radius: 4px; }
.applinks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.site-main > ul.applinks li { padding: 0; border: 0; font-size: inherit; }
.site-main > ul.applinks li::before { content: none; }
.price-box td:first-child { white-space: nowrap; }
.applinks a { display: block; height: 100%; background: var(--paper); padding: 14px 16px; border-radius: 4px; text-decoration: none; color: var(--ink); border-bottom: 3px solid transparent; box-shadow: 0 14px 24px -18px rgba(80, 40, 30, .45); transition: transform .2s, border-color .2s; }
.applinks a:hover, .applinks a:focus-visible { transform: translateY(-3px); border-bottom-color: var(--coral); }
.applinks a:active { transform: scale(.98); }
.applinks b { display: block; font-size: 1rem; }
.applinks b::after { content: " ›"; color: var(--coral); }
.applinks span { display: block; font-size: 0.88rem; color: var(--ink-2); line-height: 1.6; margin-top: 4px; }
.apps h3 .more { font-size: 0.88rem; font-weight: 600; margin-left: 8px; }
@media (min-width: 960px) {
  .site-main:has(.crumbs) { display: block; max-width: 820px; }
  .facts > li { padding: 18px 22px 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .facts > li { animation: print .6s cubic-bezier(.2, .8, .2, 1) both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes print { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
}
