/* ui.css — 下層ページ共通の部品。base.css の次に読む。
   区画・ページ見出し・本文・カード・並び・表・タブ。数値はページ側の CSS で上書きしない。 */

/* ---------- 区画 ---------- */
.sec { position: relative; padding: 48px 0 56px; }
.sec-pale { background: var(--sky-pale); }
.sec-white { background: var(--white); }
.sec-cream { background: var(--cream); }
.sec-mist { background: var(--sky-mist); }
.page-top { padding: 44px 0 40px; }
@media (max-width: 767px) {
  .sec { padding: 34px 0 40px; }
  .page-top { padding: 30px 0 28px; }
}

/* ---------- ページ見出し（.sec-head と組み合わせる。h1.en + .ja、件数は .count） ---------- */
.page-head { align-items: center; gap: 14px; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .en { font-size: 46px; line-height: 1; }
/* LIVE2D の見出しだけ、I と V の枠が接して V が I に寄って見えるので V の左を少し空ける */
.page-head .en .k-v { margin-left: .07em; }
.page-head .count { font-family: var(--f-en); font-weight: 600; font-size: 15px; letter-spacing: .06em; color: var(--ink-soft); align-self: flex-end; padding-bottom: 4px; }
.page-head.no-mb { margin-bottom: 0; }
@media (max-width: 767px) {
  .page-head { gap: 10px; margin-bottom: 16px; }
  .page-head .en { font-size: 34px; }
}

/* ---------- 文章 ---------- */
.lead { max-width: 680px; font-size: 15px; line-height: 1.95; color: var(--ink-soft); }
/* CONTACT のタイトル下の文だけ幅を広げ、PC で「す。」だけ次の行に残らないようにする */
#c-lead { max-width: 800px; text-wrap: pretty; }
.txt { font-size: 15px; line-height: 1.95; color: var(--ink); }
.txt a, .note a { color: var(--sky-deep); text-decoration: underline; text-underline-offset: 3px; }
.note { font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.en-sub { font-family: var(--f-en); font-weight: 600; font-size: 13px; letter-spacing: .08em; color: var(--sky-deep); }
.h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--brown); }
.h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.h2 .mo-i { flex: none; }
@media (max-width: 767px) {
  .lead, .txt { font-size: 14px; }
  .h2 { font-size: 18px; }
}

/* ---------- カード ---------- */
.card {
  position: relative; padding: 22px 24px; border-radius: 22px;
  background: var(--white); border: 1.5px solid var(--line-soft); box-shadow: var(--sh-card);
}
.card-soft { background: var(--sky-mist); border-color: transparent; box-shadow: none; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .2s var(--ease-pop), box-shadow .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--sh-float); }
@media (max-width: 767px) { .card { padding: 18px 16px; border-radius: 18px; } }

/* ---------- 並べる ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sec-cta { margin-top: 36px; text-align: center; }
@media (max-width: 1023px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) {
  .grid { gap: 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 項目名と値（担当: ○○ の行） ---------- */
.kv { display: grid; grid-template-columns: 7em 1fr; gap: 6px 14px; margin: 0; font-size: 14px; line-height: 1.8; }
.kv dt { font-weight: 700; color: var(--ink-soft); }
.kv dd { margin: 0; color: var(--ink); }

/* ---------- 一覧 ---------- */
.list { margin: 0; padding-left: 1.3em; }
.list li { margin: 4px 0; font-size: 15px; line-height: 1.85; color: var(--ink); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { font-size: 15px; line-height: 1.85; color: var(--ink); }
@media (max-width: 767px) { .list li, .list-plain li { font-size: 14px; } }

/* ---------- 表 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.tbl th { font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

/* ---------- 値段 ---------- */
.price-num { font-family: var(--f-en); font-weight: 600; font-size: 24px; letter-spacing: .02em; color: var(--brown); }

/* ---------- チップをボタンにするとき・タブ ---------- */
button.chip { border: 0; font-family: inherit; cursor: pointer; }
.chip-sm { min-height: 26px; padding: 0 10px; font-size: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs .chip[aria-selected="true"] { background: var(--sky); color: var(--ink); box-shadow: none; }
.tabpanel[hidden] { display: none; }

/* ---------- 丸いアイコン ---------- */
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--sky-pale); box-shadow: 0 0 0 3px var(--white), 0 0 0 4.5px var(--sky-soft); }
.avatar-lg { width: 96px; height: 96px; }
.avatar-xl { width: 128px; height: 128px; }

/* ---------- 空のとき・読み込み前 ---------- */
.empty { padding: 28px 0; text-align: center; font-size: 14px; color: var(--ink-soft); }

/* ---------- 料金表の補足（見出しを押すと開く。pages.js・contact.js が details.acc で出す） ---------- */
.card.acc { padding: 0; }
.acc-t {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none;
  font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--brown);
}
.acc-t::-webkit-details-marker { display: none; }
.acc-t::after {
  content: ""; flex: none; margin-left: auto; width: 9px; height: 9px; margin-top: -5px;
  border-right: 2px solid var(--sky-deep); border-bottom: 2px solid var(--sky-deep);
  transform: rotate(45deg); transition: transform .2s, margin-top .2s;
}
.acc[open] .acc-t::after { transform: rotate(225deg); margin-top: 5px; }
.acc-t:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: -2px; border-radius: inherit; }
.acc-h { margin: 0; font: inherit; color: inherit; }
.acc-b { margin: 0; padding: 0 18px 16px; }
@media (max-width: 767px) {
  .acc-t { padding: 12px 14px; font-size: 15px; }
  .acc-b { padding: 0 14px 14px; }
}

/* ---------- YouTube（CH.yt）。押すまで iframe を読み込まない。WORKS・PRICE・GALLERY・Live2D で共用 ---------- */
.yt-box { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--sky-pale); }
/* .pg-media img / .m-extra img（height: auto）より強くするため .yt-box .yt-thumb で書く */
.yt-box .yt-thumb, .yt-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* サムネは 4:3 で上下に黒帯があるため、中央を切り出して 16:9 に収める */
.yt-box .yt-thumb { object-fit: cover; }
.yt-box, .vd-box { container-type: inline-size; }
/* 丸の直径を font-size に持たせ、::before/::after は em で連動させる。タイルが小さいときは幅に合わせて縮める */
.yt-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; font-size: 64px; }
.yt-play::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 1em; height: 1em; margin: -.5em 0 0 -.5em;
  border-radius: 50%; background: var(--cta-bg); box-shadow: var(--cta-sh); transition: transform .2s var(--ease-pop);
}
.yt-play::after {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -.19em 0 0 -.09em;
  border-style: solid; border-width: .19em 0 .19em .31em; border-color: transparent transparent transparent var(--cta-fg);
}
.yt-play:hover::before { transform: scale(1.08); }
.yt-play:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: -3px; }
@media (max-width: 767px) {
  .yt-play { font-size: 54px; }
}
@supports (width: 1cqw) {
  .yt-play { font-size: clamp(36px, 18cqw, 64px); }
  /* 2 枚以上並ぶ列では、タイルごとの幅でなく列の幅÷枚数（--n・JS が付ける）に合わせ、同じ項目のボタンを同じ大きさにする */
  .pg-tiles.is-multi { container-type: inline-size; }
  .pg-tiles.is-multi .yt-box, .pg-tiles.is-multi .vd-box { container-type: normal; }
  .pg-tiles.is-multi .yt-play { font-size: clamp(36px, calc(18cqw / var(--n, 2)), 64px); }
  @media (max-width: 767px) {
    .yt-play { font-size: clamp(36px, 18cqw, 54px); }
    .pg-tiles.is-multi .yt-play { font-size: clamp(36px, calc(18cqw / var(--n, 2)), 54px); }
  }
}

.vd-box { position: relative; border-radius: inherit; overflow: hidden; background: var(--sky-pale); }

/* ---------- 動画・画像の小窓（vl = 動画・画像の小窓） ---------- */
.vl { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.vl[hidden] { display: none; }
body.vl-open { overflow: hidden; }
.vl-bg { position: absolute; inset: 0; background: rgba(74, 68, 61, .72); animation: vlFade .3s ease; }
.vl-box {
  position: relative; z-index: 1; width: min(100%, 1200px, calc((100vh - 96px) * var(--ar, 1.7778))); aspect-ratio: var(--ar, 16 / 9);
  background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--sh-float); animation: vlPop .45s var(--ease-pop);
}
.vl-box iframe, .vl-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.vl-cap { position: relative; z-index: 1; margin: 0; color: #fff; font-size: 14px; font-weight: 700; text-align: center; max-width: 1200px; }
.vl-close {
  position: fixed; z-index: 2; right: 24px; top: 20px; width: 54px; height: 54px; border-radius: 50%; background: var(--white); color: var(--brown);
  box-shadow: 0 14px 30px -18px rgba(74, 68, 61, .6), inset 0 0 0 2px var(--sky-soft);
  font-family: var(--f-en); font-weight: 600; font-size: 28px; line-height: 1; display: grid; place-items: center; padding: 0 0 4px; border: 0; cursor: pointer;
  transition: transform .25s var(--ease-pop);
}
.vl-close:hover { transform: rotate(90deg); }
.vl-close:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 2px; }
/* 画像の小窓。透過のある絵の裏が黒くならないよう、タイルの地と同じ色にする */
.vl-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.vl-box.is-img { background: var(--sky-pale); }
/* 画像を押したら拡大する包み */
.zoom-btn { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: inherit; border-radius: inherit; cursor: zoom-in; }
.zoom-btn:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 2px; }
.pg-frame .zoom-btn { position: absolute; inset: 0; height: 100%; }
@keyframes vlFade { from { opacity: 0; } }
@keyframes vlPop { from { opacity: 0; transform: scale(.96); } }
@media (max-width: 767px) {
  .vl { padding: 8px; }
  .vl-box { width: min(100%, 1200px, calc((100vh - 80px) * var(--ar, 1.7778))); }
  .vl-close { width: 44px; height: 44px; right: 10px; top: 10px; font-size: 24px; }
}
