* { box-sizing: border-box; }
html, body { background: #000000; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, "Hiragino Sans", sans-serif; max-width: 640px; margin: 0 auto; padding: 0 12px calc(32px + env(safe-area-inset-bottom)); color: #ffffff; }
header { padding: calc(12px + env(safe-area-inset-top)) 0 0; }
h1 { font-size: 1.25rem; margin: 0 0 12px; }
h1 span { color: #ff8c00; }
.nav { display: flex; border-bottom: .5px solid #333333; margin-bottom: 12px; }
.nav a { flex: 1; text-align: center; padding: 14px 0; color: #999999; text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.nav a.on { color: #ff8c00; border-bottom-color: #ff8c00; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.tabs a { padding: 10px 16px; border: .5px solid #333333; background: #0a0a0a; color: #999999; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.tabs a.on { background: #ff8c00; border-color: #ff8c00; color: #000; font-weight: 600; }
.sub { color: #999999; font-size: .75rem; margin: 0 0 10px; }
form { display: flex; gap: 8px; margin-bottom: 8px; }
input { flex: 1; min-width: 0; min-height: 44px; padding: 10px; border: .5px solid #333333; border-radius: 0; font-size: 16px; background: #0a0a0a; color: #ffffff; }
input::placeholder { color: #999999; }
button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 0; background: #ff8c00; color: #000; font-weight: 600; font-size: 1rem; cursor: pointer; }
button.saved { background: #222222; color: #ff8c00; border: .5px solid #ff8c00; }
button:disabled { background: #222; color: #999999; cursor: default; }
#msg { min-height: 1.2em; color: #d7263d; font-size: .85rem; margin-bottom: 4px; }
.empty { color: #999999; }
.card { background: #0a0a0a; border: .5px solid #333333; margin: 0 0 10px; padding: 0; overflow: hidden; }
.bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: .5px solid #333333; }
.badge { background: #222; color: #999999; font-weight: 700; padding: 3px 10px; font-size: .85rem; }
.badge.top { background: #d7263d; color: #ffffff; }
.xbtn { width: 44px; height: 44px; background: #000; border: .5px solid #333333; display: flex; align-items: center; justify-content: center; }
video { width: 100%; max-height: 70vh; max-height: 70svh; background: #000; display: block; }
.fallback { padding: 48px 16px; text-align: center; }
.fallback a { color: #ff8c00; }
.foot { display: flex; justify-content: flex-end; padding: 8px 10px; border-top: .5px solid #333333; }
.ad { border: 1px dashed #333333; background: #0a0a0a; color: #666666; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: .8rem; }
.ad small { font-size: .7rem; margin-top: 4px; }
.ad-feed { min-height: 250px; margin: 0 0 10px; }
.ad-side { display: none; position: fixed; top: 96px; width: 160px; height: min(600px, calc(100vh - 120px)); }
.ad-side.left { right: calc(50% + 336px); }
.ad-side.right { left: calc(50% + 336px); }
@media (min-width: 1000px) { .ad-side { display: flex; } }
.count { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { body { padding-left: 8px; padding-right: 8px; } h1 { font-size: 1.1rem; } }

/* 全画面の広告枠 */
.promoOverlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; padding: 72px 16px 24px; }
.promoOverlay .promoBox { width: min(92vw, 420px); height: min(68vh, 560px); font-size: 1rem; }
.promoOverlay .promoTag { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 16px; color: #999999; font-size: .8rem; border: .5px solid #555555; padding: 2px 8px; }
.promoOverlay .promoClose { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; min-width: 96px; min-height: 48px; background: #222222; color: #ffffff; border: .5px solid #777777; font-size: 1rem; }

/* スマホ用: 画面下部に固定のアンカー広告枠 */
.ad-anchor { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border: 0; border-top: 1px dashed #333333; flex-direction: row; gap: 8px; }
.ad-anchor small { margin-top: 0; }
.anchorClose { position: absolute; top: -28px; right: 6px; min-height: 28px; width: 28px; padding: 0; background: #222222; color: #ffffff; border: .5px solid #555555; font-size: .9rem; }
@media (max-width: 999px) {
  .ad-anchor { display: flex; }
  body.has-anchor { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* 規約などの文書ページ */
.doc { line-height: 1.8; font-size: .9rem; color: #dddddd; }
.doc h2 { font-size: 1.15rem; color: #ffffff; margin: 8px 0 12px; }
.doc h3 { font-size: 1rem; color: #ff8c00; margin: 24px 0 6px; }
.doc ul, .doc ol { padding-left: 1.4em; margin: 6px 0; }
.doc a { color: #ff8c00; }
.doc .date { color: #999999; margin-top: 28px; font-size: .8rem; }
.doc .mail { font-size: 1.05rem; color: #ffffff; padding: 10px 12px; border: .5px solid #333333; background: #0a0a0a; word-break: break-all; }
/* フッター */
.foot-links { margin-top: 32px; padding: 16px 0 8px; border-top: .5px solid #333333; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; }
.foot-links a { color: #999999; text-decoration: none; }
.foot-links a:hover { color: #ff8c00; }
.foot-links p { width: 100%; margin: 8px 0 0; color: #666666; font-size: .72rem; line-height: 1.6; }
/* 管理画面 */
.adminRow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; }
.adminRow a { color: #ff8c00; word-break: break-all; }
.adminRow small { display: block; color: #999999; margin-top: 2px; }
button.danger { background: #d7263d; color: #ffffff; }
