/* 5fun のサイト共通の見た目。ゲーム本体には効かない（iframeの外だけ） */
:root {
  --bg: #fffaf2;
  --ink: #1d1a16;
  --sub: #6b6358;
  --line: #e7dfd2;
  --card: #ffffff;
  --accent: #ff5a36;
  --accent-ink: #ffffff;
  --sheet: #fffdf8;
  --bar-h: 44px;
  /* 画面の上下の、端末が使う部分（Android の操作ボタン、iPhone のホームバー）。viewport-fit=cover を付けていないので、多くの端末では 0 になる */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 8px 28px rgba(29, 26, 22, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2 { line-height: 1.3; }

/* ---------- ゲームページ ---------- */
.page-game { background: #111; }
.stage { width: 100%; margin: 0 auto; background: #000; position: relative; padding: var(--safe-t) 0 var(--safe-b); }
@media (min-width: 600px) and (min-aspect-ratio: 3/4) {
  /* PCでは9:16の列を中央に置く */
  .stage { width: calc((100vh - var(--bar-h)) * 9 / 16); width: calc((var(--app-h, 100dvh) - var(--bar-h)) * 9 / 16); }
}
.bar {
  height: var(--bar-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bar-logo {
  border: 0; background: transparent;
  height: 30px; padding: 0 4px; border-radius: 8px;
  display: inline-flex; align-items: center;
}
.bar-logo img { display: block; height: 26px; width: auto; }
.bar-title {
  margin: 0; font-size: 14px; font-weight: 700; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-acts { display: flex; align-items: center; gap: 6px; }
/* プレイ回数（plays_show_min 以上のときだけ出る） */
.bar-plays { font-size: 12px; color: var(--sub); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.bar-plays span { font-size: 9px; }
.bar-like {
  border: 1px solid var(--line); background: var(--card);
  height: 30px; padding: 0 10px; border-radius: 15px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
}
.bar-full {
  border: 1px solid var(--line); background: var(--card);
  width: 30px; height: 30px; padding: 0; border-radius: 15px; font-size: 16px; line-height: 1;
}
.bar-full[hidden] { display: none; }
/* 全画面のとき：帯とゲームだけを画面いっぱいに */
.stage:fullscreen { width: 100%; height: 100%; overflow: hidden; }
.stage:fullscreen .frame-wrap { height: calc(100% - var(--bar-h) - var(--safe-t) - var(--safe-b)); }
.bar-like .heart { color: var(--accent); font-size: 15px; line-height: 1; }
.bar-like[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bar-like[aria-pressed="true"] .heart { color: var(--accent-ink); }
.frame-wrap {
  position: relative;
  /* 端末が使う上下の部分を引く。引かないと、ゲームの下の操作ボタンが Android の操作ボタンの裏に隠れる */
  height: calc(100vh - var(--bar-h) - var(--safe-t) - var(--safe-b));
  /* --app-h：shell.js が測った、実際に見えている高さ（測れないときは 100dvh） */
  height: calc(var(--app-h, 100dvh) - var(--bar-h) - var(--safe-t) - var(--safe-b));
  overflow: hidden;
}
.frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.is-demo .bar { display: none; }
.is-demo .stage { padding: 0; }
.is-demo .frame-wrap { height: 100vh; height: var(--app-h, 100dvh); }
.is-demo .below { display: none; }

.below { background: var(--bg); padding: 20px 16px 8px; max-width: 760px; margin: 0 auto; }
.below h2 { font-size: 17px; margin: 18px 0 10px; }
.about p { margin: 6px 0; }
.meta { color: var(--sub); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tag { border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font-size: 12px; background: var(--card); }

/* ---------- 重ねて出す部品（shell.js が作る） ---------- */
.gf-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  min-height: 33%;
  background: var(--sheet);
  border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow);
  padding: 14px;
  transform: translateY(105%);
  transition: transform .28s ease;
  z-index: 20;
  color: var(--ink);
}
.gf-sheet.open { transform: translateY(0); }
.gf-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.gf-sheet-title {
  font-weight: 800; font-size: 16px; text-align: left; flex: 1; min-width: 0;
  border: 0; background: transparent; padding: 0;
}
.gf-sheet .gf-mini-retry { display: none; }
/* 畳んだ結果画面：下の細い帯。ゲームの枠はその分だけ縮める（ゲームの「次へ」などを隠さない） */
:root { --rbar-h: 60px; }
.gf-sheet.mini {
  min-height: 0; border-radius: 0; box-shadow: 0 -1px 0 var(--line);
  height: var(--rbar-h);
  padding: 8px 10px;
}
.gf-sheet.mini .gf-sheet-head { margin: 0; height: 100%; }
.gf-caret { display: none; }
.gf-sheet.mini .gf-sheet-title { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.gf-sheet.mini .gf-sheet-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gf-sheet.mini .gf-caret { display: inline; flex: none; color: var(--sub); font-size: 12px; }
.gf-sheet.mini .gf-sheet-body, .gf-sheet.mini .gf-shut { display: none; }
.gf-sheet.mini .gf-mini-retry { display: flex; min-height: 40px; padding: 6px 14px; flex: none; }
.frame-wrap.has-bar iframe { height: calc(100% - var(--rbar-h)); }
.gf-x { border: 0; background: transparent; font-size: 22px; line-height: 1; width: 36px; height: 36px; border-radius: 18px; color: var(--sub); }
.gf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gf-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); font-weight: 700; text-decoration: none;
}
.gf-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gf-btn.big { grid-column: 1 / -1; min-height: 52px; font-size: 17px; }
.gf-next-label { font-size: 12px; color: var(--sub); margin: 12px 0 6px; font-weight: 700; }
.gf-next { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gf-next.big .gf-nextcard { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.gf-nextcard {
  display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center;
  padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  text-decoration: none; min-height: 68px;
}
.gf-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #ddd; display: grid; place-items: center; font-weight: 800; color: var(--sub); }
.gf-nextcard b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gf-nextcard small { display: block; color: var(--sub); font-size: 11px; }
.gf-prompt { margin-top: 12px; padding: 10px; border-radius: 12px; background: #fff3e6; border: 1px solid #ffd9b8; font-size: 13px; }
.gf-prompt-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.gf-prompt .gf-btn { min-height: 36px; font-size: 13px; }

.gf-list {
  position: absolute; inset: 0; z-index: 30;
  background: var(--bg); color: var(--ink);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 12px 24px;
  display: none;
}
.gf-list.open { display: block; }
.gf-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gf-list-head b { font-size: 16px; }
.gf-list-items { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gf-list-item { text-decoration: none; display: block; position: relative; }
.gf-list-item .gf-thumb { width: 100%; height: auto; aspect-ratio: 9 / 16; max-height: 220px; }
.gf-list-item b { display: block; font-size: 13px; margin-top: 4px; }
.gf-played { position: absolute; top: 6px; left: 6px; background: rgba(29,26,22,.75); color: #fff; font-size: 11px; padding: 0 6px; border-radius: 8px; }
.gf-list-foot { margin-top: 16px; text-align: center; }
.gf-sub { margin: 6px 0 8px; font-size: 13px; font-weight: 700; color: #6b6358; }
.gf-cont { --lime: #B5FF00; display: grid; gap: 8px; margin-bottom: 14px; }
.gf-cont .ccard { text-decoration: none; color: inherit; }
.gf-cont .ccard { padding: 8px 12px 8px 8px; grid-template-columns: 56px 1fr auto; }
.gf-cont .ccard img, .gf-cont .ccard .noimg { width: 56px; height: 56px; }

/* 節目の通知：上の帯（タイトル・いいね）の上に重ねる。ゲームの画面にはかぶせない */
.gf-toast {
  position: absolute; left: 0; right: 0; top: 0; z-index: 15; height: var(--bar-h);
  display: flex; align-items: center; gap: 8px; padding: 0 8px;
  background: var(--sheet); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700;
  opacity: 0; transform: translateY(-100%); transition: opacity .2s, transform .2s; pointer-events: none;
}
.gf-toast.open { opacity: 1; transform: none; pointer-events: auto; }
.gf-toast-msg { flex: none; white-space: nowrap; }
.gf-toast .gf-nextcard {
  flex: 1; min-width: 0; min-height: 0; height: 36px; padding: 2px 8px 2px 2px; gap: 6px;
  display: flex; align-items: center;
}
.gf-toast .gf-nextcard > span:last-child { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.gf-toast .gf-thumb { width: 32px; height: 32px; flex: none; }
.gf-toast .gf-nextcard b { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gf-toast .gf-nextcard small { flex: none; }
.gf-toast .gf-nextcard::before { content: "次は"; flex: none; order: -1; color: var(--sub); font-size: 11px; padding-left: 4px; }

.gf-challenge {
  position: absolute; left: 50%; top: 14%; transform: translateX(-50%); z-index: 12;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 18px; border-radius: 14px; font-weight: 800; font-size: 18px; text-align: center;
  box-shadow: var(--shadow); pointer-events: none; max-width: 86%;
}
.gf-challenge small { display: block; font-size: 12px; font-weight: 600; opacity: .9; }

.gf-modal { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.gf-modal-box { background: var(--sheet); color: var(--ink); border-radius: 16px; padding: 16px; width: min(340px, 100%); box-shadow: var(--shadow); }
.gf-modal-box img { width: 100%; border-radius: 8px; margin: 8px 0; max-height: 40vh; object-fit: contain; background: #eee; }
.gf-modal-box .gf-actions { margin-top: 8px; }

/* ---------- トップ ---------- */
.top-head { padding: 18px 16px 6px; max-width: 960px; margin: 0 auto; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.logo { display: inline-block; line-height: 0; text-decoration: none; }
.logo img { display: block; height: 32px; width: auto; }
.tagline { margin: 0; color: var(--sub); font-weight: 700; }
.top-main { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.sec h2 { font-size: 18px; margin: 22px 0 10px; }
.row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.row > * { scroll-snap-align: start; flex: 0 0 150px; }
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.carousel > * { scroll-snap-align: start; flex: 0 0 min(84%, 360px); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { display: block; text-decoration: none; color: var(--ink); }
.card-media { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #e9e1d4; }
/* プレビューは 9:16 で録っているので、カードも同じ縦横比にして切らない（修正指示書 B2） */
.card-big .card-media { aspect-ratio: 9 / 16; }
.carousel > .card-big { flex-basis: min(64%, 300px); }
.card-media video, .card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-noimg { display: grid; place-items: center; width: 100%; height: 100%; font-size: 42px; font-weight: 900; color: #b7aa95; }
.card-time { position: absolute; left: 6px; bottom: 6px; background: rgba(29,26,22,.78); color: #fff; font-size: 11px; padding: 0 7px; border-radius: 9px; }
.card-title { display: block; font-weight: 700; font-size: 14px; margin-top: 6px; line-height: 1.35; }
.card-desc { display: block; color: var(--sub); font-size: 13px; }
.cont-card .card-media { aspect-ratio: 9 / 16; }
.cont-when { display: block; color: var(--sub); font-size: 11px; }
.empty { color: var(--sub); }

.foot { max-width: 960px; margin: 28px auto 0; padding: 16px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--sub); border-top: 1px solid var(--line); }

/* ---------- トップ（新デザイン：doc/新デザイン） ---------- */
.page-top {
  --ink: #171717; --lime: #B5FF00; --cream: #fffdf8;
  --display: "Hiragino Sans", "Hiragino Kaku Gothic StdN", "Noto Sans JP", "Yu Gothic", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
}
.page-top a { text-decoration: none; color: inherit; }
.page-top button { border: 0; background: none; padding: 0; }
.tw { max-width: 1240px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
@media (max-width: 640px) { .tw { padding-left: 16px; padding-right: 16px; } }
.th-sp { flex: 1; }

/* ヘッダー */
.th { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; padding-top: env(safe-area-inset-top, 0px); }
.th.scrolled { border-color: var(--line); }
.th-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.th-logo img { height: 28px; width: auto; display: block; }
.th-tag { font-weight: 700; font-size: 13px; color: var(--sub); }
.th-count { font-family: var(--mono); font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.th-count i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: tpulse 1.6s infinite; }
@keyframes tpulse { 50% { opacity: .3; } }
@media (max-width: 640px) { .th-tag { display: none; } }

/* ヒーロー（新作） */
.hero { margin: 12px 0 0; background: var(--ink); color: var(--cream); border-radius: 28px; overflow: hidden; position: relative; display: grid; grid-template-columns: 1.05fr 1fr; min-height: 520px; }
.hero-txt { padding: 52px 0 44px 52px; display: flex; flex-direction: column; position: relative; z-index: 2; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--lime); }
.eyebrow b { background: var(--lime); color: var(--ink); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-family: var(--display); letter-spacing: .04em; }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(36px, 5.6vw, 76px); line-height: 1.08; margin: 22px 0 18px; letter-spacing: .01em; text-wrap: balance; }
.hero-desc { font-size: 17px; line-height: 1.8; color: #d8d2c6; max-width: 30em; margin: 0; text-wrap: pretty; }
.hero-meta { display: flex; gap: 8px; margin: 22px 0 0; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; border: 1px solid #3a3733; color: #d8d2c6; }
.dots { display: flex; gap: 6px; margin-top: 20px; }
.page-top .dots button { height: 4px; width: 22px; border-radius: 2px; background: #3a3733; transition: all .3s; cursor: pointer; }
.page-top .dots button.on { background: var(--lime); width: 44px; }
.hero-cta { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 32px; }
.play { display: inline-flex; align-items: center; gap: 12px; background: var(--lime); color: var(--ink); font-weight: 900; font-size: 18px; padding: 16px 26px 16px 20px; border-radius: 99px; transition: transform .15s; }
.play:hover { transform: translateY(-2px); }
.tri { width: 0; height: 0; border-left: 12px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.hero-nav { display: flex; gap: 8px; margin-left: auto; padding-right: 8px; }
.page-top .hero-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #3a3733; color: var(--cream); font-size: 18px; transition: background .15s; }
.page-top .hero-nav button:hover { background: #2a2825; }
.hero-art { position: relative; overflow: hidden; }
.hero-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(181,255,0,.18), transparent 65%); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.stack { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ph { position: absolute; width: 230px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.5); border: 6px solid #262421; transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .4s; background: #222; opacity: 0; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.p0 { transform: none; z-index: 3; width: 270px; opacity: 1; }
.ph.p1 { transform: translateX(190px) rotate(8deg) scale(.86); z-index: 2; opacity: .75; }
.ph.p2 { transform: translateX(-190px) rotate(-8deg) scale(.86); z-index: 1; opacity: .75; }
.hero-note { position: absolute; right: 28px; bottom: 24px; z-index: 4; font-family: var(--mono); font-size: 12px; color: #8d867b; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { height: 420px; order: -1; }
  .hero-txt { padding: 28px 24px; }
  .ph { width: 170px; } .ph.p0 { width: 200px; }
  .ph.p1 { transform: translateX(130px) rotate(8deg) scale(.86); }
  .ph.p2 { transform: translateX(-130px) rotate(-8deg) scale(.86); }
  .hero-note { display: none; }
}
@media (max-width: 640px) {
  .hero { border-radius: 22px; }
  .hero-art { height: 340px; }
  .ph { width: 140px; } .ph.p0 { width: 168px; }
  .ph.p1 { transform: translateX(105px) rotate(8deg) scale(.86); }
  .ph.p2 { transform: translateX(-105px) rotate(-8deg) scale(.86); }
  .hero-desc { font-size: 15px; }
  .play { font-size: 16px; padding: 14px 22px 14px 18px; }
}

/* セクション */
.tsec { margin-top: 56px; }
.tsec[hidden] { display: none; }
.tsec-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.tsec-h h2 { font-family: var(--display); font-weight: 900; font-size: 26px; margin: 0; letter-spacing: .02em; }
.tsec-h small { color: var(--sub); font-size: 13px; }
.page-top .tsec-clear { font-size: 12px; color: var(--sub); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* つづきから */
.cont { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ccard { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px 10px 10px; transition: border-color .15s, transform .15s; }
.ccard:hover { border-color: var(--ink); transform: translateY(-2px); }
.ccard img, .ccard .noimg { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; object-position: top; background: #e9e2d6; }
.ccard b { display: block; font-size: 15px; line-height: 1.3; }
.ccard small { font-size: 12px; color: var(--sub); }
.resume { width: 40px; height: 40px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.resume .tri { border-left-width: 10px; border-top-width: 7px; border-bottom-width: 7px; margin-left: 3px; }

/* 絞り込み */
.filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.page-top .seg button { padding: 9px 18px; border-radius: 99px; font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; min-height: 40px; transition: background .15s; white-space: nowrap; }
.seg button span { font-family: var(--mono); font-size: 11px; color: var(--sub); }
.page-top .seg button.on { background: var(--ink); color: var(--cream); }
.seg button.on span { color: var(--lime); }
.genres { display: flex; gap: 6px; flex-wrap: wrap; }
.page-top .genres button { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; min-height: 36px; transition: all .15s; }
.page-top .genres button:hover { border-color: var(--ink); }
.page-top .genres button.on { background: var(--lime); border-color: var(--lime); font-weight: 700; }
@media (max-width: 640px) { .seg { width: 100%; overflow-x: auto; } .page-top .seg button { padding: 8px 12px; flex: none; } }

/* 一覧 */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px 18px; }
@media (max-width: 640px) { .tgrid { grid-template-columns: 1fr 1fr; gap: 20px 12px; } }
.tcard { display: block; position: relative; animation: tin .35s both; }
.tcard[hidden] { display: none; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.media { position: relative; display: block; aspect-ratio: 9 / 14; border-radius: 18px; overflow: hidden; background: #e9e2d6; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.tcard:hover .media img, .tcard:hover .media video { transform: scale(1.05); }
.media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(23,23,23,.08); pointer-events: none; }
.media .noimg { display: grid; place-items: center; width: 100%; height: 100%; font-size: 42px; font-weight: 900; color: #b7aa95; }
.tb { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 900; padding: 3px 9px; border-radius: 8px; z-index: 2; line-height: 1.5; }
.tb.m5 { background: var(--lime); color: var(--ink); }
.tb.m30 { background: var(--accent); color: #fff; }
.tb.long { background: var(--ink); color: var(--cream); }
.new { position: absolute; right: 10px; top: 10px; z-index: 2; font-family: var(--mono); font-size: 10px; font-weight: 700; background: var(--cream); color: var(--ink); padding: 3px 7px; border-radius: 6px; letter-spacing: .05em; }
.hov { position: absolute; left: 0; right: 0; bottom: 0; padding: 44px 14px 14px; background: linear-gradient(transparent, rgba(23,23,23,.92) 40%); color: var(--cream); font-size: 12.5px; line-height: 1.6; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); z-index: 2; }
.hov .go { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 900; font-size: 13px; color: var(--lime); }
.tcard:hover .hov, .tcard:focus-visible .hov { transform: none; }
@media (hover: none) { .hov { display: none; } }
.tcard h3 { margin: 12px 2px 2px; font-size: 15.5px; font-weight: 900; line-height: 1.35; }
.tg { margin: 0 2px; font-size: 12px; color: var(--sub); }
.tplays { white-space: nowrap; }
.tempty { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--sub); margin: 0; }
.tempty[hidden] { display: none; }

/* フッター */
.tfoot { margin-top: 96px; border-top: 1px solid var(--line); }
.tfoot-in { display: flex; align-items: center; gap: 18px; padding-top: 28px; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
.tfoot img { height: 22px; width: auto; display: block; }
.tfoot p { margin: 0; font-size: 13px; color: var(--sub); }
.tfoot-links { display: flex; gap: 16px; font-size: 13px; color: var(--sub); }
.tfoot-links a { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .tcard, .ph, .th-count i { animation: none; transition: none; } }

/* ---------- 文書ページ ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 8px 16px 24px; }
.doc h1 { font-size: 22px; }
.doc h2 { font-size: 17px; margin-top: 24px; }
.note { background: #fff3e6; border: 1px solid #ffd9b8; padding: 8px 10px; border-radius: 8px; font-size: 13px; }

/* ---------- 数字を見るページ ---------- */
.stats { max-width: 1200px; margin: 0 auto; padding: 8px 16px 32px; }
.stats table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 6px 0 18px; background: var(--card); }
.stats th, .stats td { border: 1px solid var(--line); padding: 4px 8px; text-align: right; white-space: nowrap; }
.stats th:first-child, .stats td:first-child { text-align: left; }
.stats th { background: #f6efe3; }
.stats .scroll { overflow-x: auto; }
.stats .kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.stats .kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 150px; }
.stats .kpi b { display: block; font-size: 22px; }
.stats .kpi span { color: var(--sub); font-size: 12px; }
.stats tr.few td { color: var(--muted, #8a8278); opacity: .6; }
.stats tr.few small { font-size: 11px; }
