/* Mai_M Art Project Catalog: 白地・モノクロ・作品が主役。そよぎの色や部品は使わない */
:root {
  --ink: #1a1a1a; --muted: #6b6b6b; --line: #e3e3e3; --bg: #ffffff; --soft: #f6f6f6; --accent: #1a1a1a;
  --fs: 16px; --maxw: 1080px;
}
html[data-fs="mid"] { --fs: 18px; }
html[data-fs="big"] { --fs: 21px; }
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif; line-height: 1.8; overflow-x: hidden; }
a { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
main { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 48px; }
h1, h2, h3 { font-weight: 600; line-height: 1.4; }
h1 { font-size: 1.5rem; margin: 20px 0 12px; }
h2 { font-size: 1.2rem; margin: 32px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.05rem; margin: 20px 0 6px; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: 0.02em; }
.brand img { width: 40px; height: 40px; }
.site-nav { display: flex; gap: 4px 14px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.fs-group { display: flex; gap: 4px; }
.fs-group button { font: inherit; font-size: 0.8rem; padding: 2px 8px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; min-width: 32px; }
.fs-group button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav-toggle { display: none; font: inherit; font-size: 0.9rem; padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; margin-left: auto; }
@media (max-width: 768px) {
  html.js-nav .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  html.js-nav .site-nav { display: none; width: 100%; flex-direction: column; gap: 0; margin-left: 0; border-top: 1px solid var(--line); padding-top: 6px; }
  html.js-nav .site-nav.open { display: flex; }
  html.js-nav .site-nav a { padding: 10px 4px; border-bottom: 1px solid var(--line); }
  .fs-group { order: 5; }
}

/* フッター */
.site-footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 20px 16px 28px; font-size: 0.88rem; color: var(--muted); }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.site-footer a { color: var(--muted); }

/* トップ: 制作動画の帯(黒地・全幅・白文字を重ねる) */
.hero-video { position: relative; background: #000; color: #fff; overflow: hidden; }
.hero-video video { display: block; width: 100%; max-width: 1280px; height: auto; max-height: min(80vh, 720px); object-fit: contain; margin: 0 auto; background: #000; }
.hero-video .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 20px; text-align: center; background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.8) 100%); }
.hero-video .cap img { width: 56px; height: 56px; margin: 0 auto 6px; }
.hero-video h1 { color: #fff; margin: 4px 0; font-size: 1.7rem; letter-spacing: 0.03em; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.hero-video p { color: #f2f2f2; max-width: 640px; margin: 6px auto; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.hero-video p.small a, .hero-video .cap a:not(.btn) { color: #fff; }
.btn.light { background: #fff; color: #111; border-color: #fff; }
@media (max-width: 600px) {
  /* 縦長の画面では中央(絵と手元)を切り出して画面いっぱいに */
  .hero-video video { height: 70vh; max-height: none; object-fit: cover; }
  .hero-video .cap { padding: 24px 12px 14px; }
  .hero-video .cap img { width: 40px; height: 40px; }
  .hero-video h1 { font-size: 1.25rem; }
  .hero-video p { font-size: 0.9rem; margin: 4px auto; }
}
.hero { text-align: center; padding: 28px 0 8px; }
.hero img { width: 180px; height: 180px; margin: 0 auto 12px; }
.hero h1 { margin: 6px 0; font-size: 1.6rem; }
.hero p { max-width: 640px; margin: 8px auto; }
.intro { text-align: center; padding: 26px 0 6px; }
.intro p { max-width: 640px; margin: 6px auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-decoration: none; background: #fff; }
.tile:hover { background: var(--soft); }
.tile b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 0.9rem; }

/* ボタン */
.btn { display: inline-block; padding: 12px 22px; border: 1px solid var(--ink); border-radius: 8px; text-decoration: none; font-weight: 600; background: var(--ink); color: #fff; cursor: pointer; font: inherit; line-height: 1.4; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* 作品一覧 */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tabs a, .tabs button { font: inherit; font-size: 0.92rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; cursor: pointer; }
.tabs [aria-current="true"], .tabs [aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.search { display: flex; gap: 8px; margin: 10px 0 14px; }
.search input { flex: 1; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.card { text-decoration: none; }
.card .ph { aspect-ratio: 1; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.card img { width: 100%; height: 100%; object-fit: contain; }
.card .t { font-size: 0.9rem; margin: 6px 0 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .n { font-size: 0.78rem; color: var(--muted); }
.card .p { font-size: 0.85rem; }
.card.hide { display: none; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 18px 0; }
.pager button { font: inherit; font-size: 0.9rem; min-width: 38px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.pager button[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.count { font-size: 0.88rem; color: var(--muted); }

/* 作品ページ */
.work { display: grid; gap: 20px; }
@media (min-width: 820px) { .work { grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); align-items: start; } }
.work .pic { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.work .pic img { max-height: 78vh; width: auto; margin: 0 auto; }
.work h1 { margin-top: 0; }
.price { font-size: 1.15rem; font-weight: 600; margin: 6px 0; }
.desc { white-space: pre-wrap; }
.extra { color: var(--muted); font-size: 0.92rem; white-space: pre-wrap; }
.prevnext { display: flex; justify-content: space-between; gap: 10px; margin: 24px 0 0; flex-wrap: wrap; }
.prevnext a { text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }

/* 文章ページ */
.doc { max-width: 760px; }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; background: var(--soft); margin: 12px 0; }
table.tbl { border-collapse: collapse; width: 100%; margin: 10px 0; }
table.tbl th, table.tbl td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.tbl th { background: var(--soft); white-space: nowrap; width: 9em; }
code, .mono { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; word-break: break-all; }
.copy { font: inherit; font-size: 0.85rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }

/* フォーム */
form.f label { display: block; font-weight: 600; margin: 14px 0 4px; }
form.f .req { color: #a33; font-size: 0.8rem; font-weight: 400; margin-left: 6px; }
form.f .opt { color: var(--muted); font-size: 0.8rem; font-weight: 400; margin-left: 6px; }
form.f input, form.f select, form.f textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid #bbb; border-radius: 6px; background: #fff; }
form.f textarea { min-height: 140px; }
form.f .help { font-size: 0.85rem; color: var(--muted); margin: 2px 0 0; }
form.f .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 12px 0; padding: 10px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--soft); }
.msg.err { border-color: #c66; background: #fff4f4; }
.msg.ok { border-color: #6a6; background: #f3fbf3; }

/* BGMボタン(右下・訪問者が押すまで音は出ない)。仕組みはそよぎHPと同型・見た目はこのサイトのモノクロ */
.bgm-btn { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.bgm-row { display: flex; align-items: center; gap: 7px; }
.bgm-vol { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.97); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.bgm-vol .vol-icon { font-size: 0.8rem; }
.bgm-vol input[type="range"] { width: 140px; accent-color: var(--ink); cursor: pointer; }
.bgm-btn button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.97); color: var(--ink); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 0.85rem; box-shadow: 0 2px 10px rgba(0,0,0,0.08); cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease; }
.bgm-btn .bgm-skip { padding: 10px 12px; font-size: 0.72rem; letter-spacing: -0.08em; }
.bgm-btn button:hover { border-color: var(--ink); transform: translateY(-1px); }
.bgm-btn button[aria-pressed="true"] { border-color: var(--ink); background: var(--soft); }
.bgm-btn .bgm-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgm-btn .bgm-marq { display: inline-flex; gap: 28px; white-space: nowrap; }
.bgm-btn .bgm-marq.scroll { animation: bgm-marquee 10s linear infinite; }
@keyframes bgm-marquee { to { transform: translateX(calc(-50% - 14px)); } }
@media (prefers-reduced-motion: reduce) { .bgm-btn .bgm-marq.scroll { animation: none; } }
@media (max-width: 640px) {
  .bgm-btn { right: 10px; bottom: 10px; }
  .bgm-btn .bgm-title { max-width: 100px; }
  .bgm-vol input[type="range"] { width: 110px; }
}

/* 曲と歌詞 */
.song-list { padding-left: 22px; }
.song-en { display: block; font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.song .lyrics { white-space: pre-line; line-height: 2; margin: 12px 0; }
.song .play-song[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lyrics-ja summary { cursor: pointer; color: var(--muted); }
main { padding-bottom: 96px; }
