/*
Theme Name: r18pink
Author: you
Version: 1.0
*/

:root{
  --bg:#fff7fb;
  --card:#ffffff;
  --text:#2b1b24;
  --muted:rgba(43,27,36,.70);
  --line:rgba(0,0,0,.08);
  --accent:#ff4fa3;         /* メイン薄ピンクの芯 */
  --accent2:#ffd1e6;        /* 淡いピンク */
  --shadow: 0 8px 24px rgba(0,0,0,.08);
  --radius:16px;
  --w:1100px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 600px at 20% 0%, var(--accent2), transparent 60%),
              radial-gradient(900px 500px at 90% 10%, #ffe8f3, transparent 55%),
              var(--bg);
  color:var(--text);
  font-family: system-ui,-apple-system,"Segoe UI","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
  line-height:1.65;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{ max-width:var(--w); margin:0 auto; padding:20px 16px; }

.siteHeader{
  position:sticky; top:0; z-index:10;
  background: rgba(255,247,251,.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.brandRow{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
}
.brandTitle{
  font-weight:800; letter-spacing:.06em;
  display:flex; align-items:baseline; gap:10px;
}
.brandTitle small{ color:var(--muted); font-weight:600; letter-spacing:0; }

.nav a{
  display:inline-block;
  padding:8px 10px;
  border-radius:12px;
}
.nav a:hover{ background: rgba(255,79,163,.10); text-decoration:none; }

.grid{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:16px;
  align-items:start;
}
@media (max-width: 960px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.cardPad{ padding:16px; }

.h1{ font-size:28px; margin:0 0 10px; }
.h2{ font-size:18px; margin:0 0 10px; }
.muted{ color:var(--muted); }

.btnRow{ display:flex; flex-wrap:wrap; gap:10px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:44px; padding:0 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-weight:700;
}
.btn.primary{
  background: linear-gradient(180deg, #ff6bb4, #ff3f9e);
  color:#fff;
  border-color: rgba(0,0,0,.04);
}
.btn.ghost{ background:#fff; }

.list{
  display:grid; gap:10px;
}
.item{
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.75);
}
.itemTitle{ font-weight:800; margin:0 0 4px; }
.meta{ font-size:12px; color:var(--muted); display:flex; gap:10px; flex-wrap:wrap; }

.webglWrap{
  width:100%;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#fff;
}
.webglWrap iframe{
  width:100%;
  height:640px;
  border:0;
  display:block;
}
@media (max-width: 960px){
  .webglWrap iframe{ height:520px; }
}

.footer{
  border-top:1px solid var(--line);
  color:var(--muted);
  margin-top:24px;
  padding:18px 0;
  font-size:12px;
}

/* 年齢確認ページ */
.ageBox{
  text-align:center;
}
.ageBox .big{
  font-size:22px;
  font-weight:900;
  letter-spacing:.04em;
}
/* ===== Unity WebGL embed (single-game) ===== */
#unity-container { position: relative; margin: 0 auto; max-width: 100%; }
#unity-container.unity-mobile { width: 100%; height: 100%; }
#unity-canvas { background: #231F20; display: block; }

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
}
#unity-logo { width: 154px; height: 130px; background: url('/gamedata/TemplateData/unity-logo-dark.png') no-repeat center; }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; background: url('/gamedata/TemplateData/progress-bar-empty-dark.png') no-repeat center; }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('/gamedata/TemplateData/progress-bar-full-dark.png') no-repeat center; }

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
}
/* ===== list item thumbnail (never break layout) ===== */
.itemInner{
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.itemThumb{
  flex: 0 0 128px;
  width:128px;
  aspect-ratio: 16 / 9;
  border-radius:12px;
  overflow:hidden;
  background: rgba(0,0,0,.04);
  border:1px solid var(--line);
}
.itemThumbImg{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover; /* 縦長/横長/巨大でも枠に収めてトリミング */
}
.itemThumbPh{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:var(--muted);
}
.itemBody{
  flex: 1 1 auto;
  min-width:0; /* 長いタイトルでも横はみ出し防止 */
}

/* スマホは縦積みにして安定させる */
@media (max-width: 560px){
  .itemInner{ flex-direction:column; }
  .itemThumb{ width:100%; flex-basis:auto; }
}
.r18p-voices audio{ max-width: 560px; }
ul,li{
 list-style-type:none;
}