/* チラシの型 — 生成りの紙に墨の文字。色は見本のチラシにまかせ、ページ自体は静かにする */
:root {
  --paper: #f4f2ec; --card: #ffffff; --ink: #1b1c1a; --sub: #5d5f5a; --line: #dedbd2;
  --accent: #9a3a26; --chip: #e9e6dd; --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(0 0 0 / .06);
  --display: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --body: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151615; --card: #1e201e; --ink: #ecebe6; --sub: #a7a8a2; --line: #333531;
    --accent: #e8a08c; --chip: #262825; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151615; --card: #1e201e; --ink: #ecebe6; --sub: #a7a8a2; --line: #333531;
  --accent: #e8a08c; --chip: #262825; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
/* 押せる物：長押しで文字を選ばせない・ダブルタップ待ちをなくす（本文の文字は選べるまま） */
button, a, [role="button"] { touch-action: manipulation; }
button { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* 詳しい画面を開いているあいだは、後ろの一覧を動かさない */
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.75;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gut) max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }

/* 見出し */
.top { padding-block: clamp(48px, 9vw, 112px) clamp(28px, 4vw, 48px); }
.mark { font-family: var(--mono); font-size: 13px; letter-spacing: .24em; color: var(--sub); margin: 0 0 18px; }
.top h1 { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 7.4vw, 92px); line-height: 1.08; letter-spacing: .02em; margin: 0; }
.top h1 .num { font-family: var(--mono); font-weight: 500; letter-spacing: -.02em; color: var(--accent); }
.intro { max-width: 38em; margin: 24px 0 0; color: var(--sub); font-size: clamp(15px, 1.6vw, 17px); text-wrap: pretty; }

/* しぼりこみ */
.filters { position: sticky; top: 0; padding-top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; padding-block: 12px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .12s ease; touch-action: manipulation; }
.chips button span { font-family: var(--mono); font-size: 12px; color: var(--sub); }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips button[aria-pressed="true"] span { color: inherit; opacity: .7; }
.chips button:active { transform: scale(.97); }

/* 一覧 */
main { padding-block: 28px 72px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; transition: transform .14s cubic-bezier(.2, .7, .2, 1); }
.card:has(button:active) { transform: scale(.985); }
.card[hidden] { display: none; }
.card button { all: unset; display: block; width: 100%; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.card button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 14px; }
.shot { position: relative; aspect-ratio: 1240 / 1754; background: var(--chip); overflow: hidden; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.shot img + img { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .card button:hover .shot img:first-child { transform: scale(1.02); }
  .card button:hover .shot img + img { opacity: 1; }
}
.meta { padding: 16px 18px 18px; display: grid; gap: 6px; }
.row { display: flex; align-items: baseline; gap: 10px; }
.no { font-family: var(--mono); font-size: 13px; color: var(--sub); min-width: 2ch; }
.name { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.lead { margin: 0; font-size: 14px; color: var(--sub); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dots { display: flex; gap: 5px; margin-top: 6px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.empty { color: var(--sub); }

/* この型について */
.about { padding-block: 56px; border-top: 1px solid var(--line); }
.about h2 { font-family: var(--display); font-size: 22px; margin: 0 0 16px; }
.about-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px 40px; }
.about p { margin: 0; color: var(--sub); font-size: 15px; text-wrap: pretty; }
.foot { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--sub); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }

/* くわしく（ダイアログ） */
dialog { padding: 0; border: 0; background: transparent; color: var(--ink); width: min(1180px, calc(100% - 32px)); max-height: calc(100dvh - 48px); }
dialog::backdrop { background: rgb(12 13 12 / .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog[open] { animation: rise .32s cubic-bezier(.2, .8, .2, 1); }
dialog[open]::backdrop { animation: fade .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }
.sheet-in { position: relative; background: var(--card); border-radius: 18px; overflow: auto; max-height: calc(100dvh - 48px);
  display: grid; grid-template-columns: auto minmax(300px, 1fr); grid-template-rows: auto 1fr; overscroll-behavior: contain; }
.stage { margin: 0; background: var(--chip); grid-column: 1; grid-row: 1; height: min(calc(100dvh - 190px), 1040px); aspect-ratio: 1240 / 1754; }
.stage img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { grid-column: 1; grid-row: 2; display: flex; gap: 10px; padding: 14px; align-content: start; }
.thumbs button { flex: 0 0 auto; width: 76px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--chip); }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs button { transition: transform .12s ease; }
.thumbs button:active, .swatches button:active, .ask button:active, .close:active { transform: scale(.96); }
.thumbs img { aspect-ratio: 1240 / 1754; object-fit: cover; width: 100%; }
.info { grid-column: 2; grid-row: 1 / span 2; padding: 28px 28px 32px; border-left: 1px solid var(--line); }
.d-no { font-family: var(--mono); font-size: 13px; color: var(--sub); margin: 0; }
.info h2 { font-family: var(--display); font-size: 26px; line-height: 1.35; margin: 4px 48px 12px 0; }
.d-lead { margin: 0 0 20px; font-size: 15px; text-wrap: pretty; }
.info h3 { font-size: 13px; letter-spacing: .08em; color: var(--sub); margin: 24px 0 10px; font-weight: 500; }
.spec { margin: 0; display: grid; gap: 12px; }
.spec div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; font-size: 14px; }
.spec dt { color: var(--sub); }
.spec dd { margin: 0; }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.swatches button { all: unset; box-sizing: border-box; touch-action: manipulation; user-select: none; -webkit-user-select: none; width: 100%; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; font-family: var(--mono); font-size: 12px; }
.swatches button:focus-visible { outline: 2px solid var(--accent); }
.swatches i { width: 28px; height: 28px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.ask { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--chip); border-radius: 10px; padding: 12px 14px; }
.ask p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.ask button, .close { cursor: pointer; border-radius: 999px; transition: transform .12s ease; }
.ask button { min-height: 36px; padding: 0 16px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-size: 13px; }
.close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: color-mix(in srgb, var(--card) 85%, transparent); box-shadow: var(--shadow); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); opacity: 0;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 20; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  dialog { width: 100%; max-width: 100%; max-height: 100dvh; margin: auto 0 0; }
  dialog[open] { animation: up .36s cubic-bezier(.2, .8, .2, 1); }
  @keyframes up { from { transform: translateY(40px); opacity: .4; } }
  .sheet-in { grid-template-columns: 1fr; grid-template-rows: none; border-radius: 18px 18px 0 0; max-height: 92dvh; }
  .stage, .thumbs, .info { grid-column: 1; grid-row: auto; }
  .stage { height: auto; width: 100%; }
  .thumbs { justify-content: center; }
  .info { border-left: 0; border-top: 1px solid var(--line); padding: 20px 18px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .info h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
