:root{
  /* ✅ 明るいポータル配色 */
  --bg1:#fffaf2;
  --bg2:#f6f9ff;
  --panel:#ffffff;
  --panel2:#fbfcff;
  --text:#23263a;
  --muted:#5f677a;
  --line:rgba(20, 30, 60, .12);

  /* オレンジ + 青で“ゲームポータル感” */
  --accent:#ff8c00;
  --accent2:#2f7cff;

  --shadow: 0 12px 30px rgba(0,0,0,.10);
  --shadow2: 0 6px 16px rgba(0,0,0,.08);
  --radius:16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(255,140,0,.20), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(47,124,255,.16), transparent 55%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans JP", sans-serif;
  line-height:1.6;
}

.container{ width:min(1100px, 92vw); margin:0 auto; }

/* =========================
   Header
========================= */
.header{
  position:sticky; top:0;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  z-index:10;
}
.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 0;
}

.brand{ display:flex; gap:12px; align-items:center; }
.brand__logo{ font-size:30px; }

.brand__title{
  font-weight:900;
  letter-spacing:.02em;
  color: var(--accent);
}
.brand__sub{
  color:var(--muted);
  font-size:12px;
}

.nav{ display:flex; gap:10px; align-items:center; }
.nav__link{
  color:var(--text);
  text-decoration:none;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid transparent;
}
.nav__link:hover{
  border-color: var(--line);
  background: rgba(255,140,0,.08);
}

/* =========================
   Toolbar / Search
========================= */
.toolbar{
  margin:20px 0 8px;
  display:grid;
  grid-template-columns: 1fr 220px 220px;
  gap:10px;
}

.input, .select{
  width:100%;
  background: rgba(255,255,255,.92);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 12px;
  outline:none;
  box-shadow: var(--shadow2);
}

.input::placeholder{ color: rgba(95,103,122,.75); }

.input:focus, .select:focus{
  border-color: rgba(255,140,0,.55);
  box-shadow: 0 0 0 4px rgba(255,140,0,.14), var(--shadow2);
}

/* =========================
   Meta
========================= */
.meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:8px 0 16px;
  color:var(--muted);
  font-size:13px;
}
.meta__count{
  font-weight:900;
  color:var(--text);
}

/* =========================
   Grid / Cards
========================= */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  margin-bottom:14px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,252,255,.98));
  border:1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  min-height: 280px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0,0,0,.14);
  border-color: rgba(255,140,0,.28);
}

.thumb{
  width:100%;
  aspect-ratio: 16/9;
  background:
    linear-gradient(90deg, rgba(255,140,0,.14), rgba(47,124,255,.12));
  border-bottom:1px solid var(--line);
  object-fit:cover;
}

.card__body{
  padding:12px 12px 10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
}

.card__title{
  font-weight:900;
  font-size:16px;
  color: var(--text);
}

.card__sub{
  color: rgba(95,103,122,.9);
  font-size:12px;
}

.card__desc{
  color: rgba(95,103,122,.92);
  font-size:13px;
  flex:1;
}

.card__actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
   border-top: none !important;
  box-shadow: none;
}

/* =========================
   Buttons
========================= */
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  color:var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:900;
  box-shadow: var(--shadow2);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.btn:hover{
  border-color: rgba(255,140,0,.45);
  background: rgba(255,140,0,.10);
  transform: translateY(-1px);
}

.btn:active{ transform: translateY(0); }

.btn--primary{
  background: linear-gradient(90deg, rgba(255,140,0,.20), rgba(255,140,0,.12));
  border-color: rgba(255,140,0,.35);
}

.btn--ghost{
  background: rgba(255,255,255,.60);
}

/* =========================
   Tags
========================= */
.tags{ display:flex; flex-wrap:wrap; gap:6px; }

.tag{
  font-size:12px;
  padding:4px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,140,0,.22);
  color: rgba(150,90,10,.95);
  background: rgba(255,140,0,.10);
  font-weight: 700;
}

/* =========================
   Pager / Divider / Howto
========================= */
.pager{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  margin:16px 0 22px;
}
.pager__info{
  color:var(--muted);
  min-width: 160px;
  text-align:center;
}

.hr{
  border:0;
  border-top:1px solid var(--line);
  margin:24px 0;
}

.howto h2{ margin:0 0 10px; }
.howto{
  background: rgba(255,255,255,.80);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px;
  box-shadow: var(--shadow2);
}
.howto code{
  background: rgba(47,124,255,.10);
  padding:2px 6px;
  border-radius:8px;
  border:1px solid rgba(47,124,255,.18);
}
.howto__note{ color:var(--muted); }

/* =========================
   Footer
========================= */
.footer{
  border-top:1px solid var(--line);
  margin-top:26px;
  padding:16px 0;
  color:var(--muted);
  font-size:12px;
}
.footer__inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* =========================
   Play page
========================= */
/* =========================
   Play page
========================= */
.play{ padding:18px 0 26px; }
.play__title{ font-weight:900; color: var(--text); }

.play__top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}

.play__desc{
  color:var(--muted);
  max-width: 70ch;
}

/* Play page */
.frameWrap{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 86vh;
  margin: 0 auto;

  border:1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;   /* ← 超重要 */
  background: #000;
  box-shadow: var(--shadow);
}

.frame{
  position: absolute;
  inset: 0;
  width:100%;
  height:100%;
  border:0;
  display:block;
  background:#000;
  overflow: hidden;
}


/* ✅ スマホは “画面に収める” を優先（縦長で遊びやすい） */
@media (max-width: 560px){
  .frameWrap{
    /* 16:9のままでもいいが、スマホで上下の無駄が出やすい */
    aspect-ratio: 9 / 16;    /* スマホ見た目重視 */
    max-height: 86vh;
  }
}


.small{ color:var(--muted); font-size:12px; margin-top:10px; }


/* =========================
   Responsive
========================= */
@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .toolbar{ grid-template-columns: 1fr 1fr; }
  .toolbar .select:last-child{ grid-column: span 2; }
  .play__top{ flex-direction:column; }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
  .toolbar{ grid-template-columns: 1fr; }
}


/* ===== Mobile polish ===== */
@media (max-width: 560px){
  .container{ width: min(1100px, 94vw); }
  .header__inner{ padding: 10px 0; }
  .brand__sub{ display:none; } /* サブタイトルはスマホでは消してスッキリ */
  .nav__link{ padding:6px 8px; }

  .toolbar{ gap:8px; margin-top:14px; }
  .input,.select{ padding:11px 12px; border-radius:12px; }

  .grid{ gap:12px; }
  .card{ min-height: unset; }
  .card__body{ padding:12px; }
  .card__title{ font-size:15px; }
  .card__desc{ font-size:13px; }

  /* ボタンが押しやすい */
  .btn{ padding:12px 14px; border-radius:12px; }
}

/* =========================
   Mobile Play Overlay
========================= */
.mobilePlay{
  display:none;              /* PCでは出さない */
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:5;
}

.mobilePlay__card{
  width:min(520px, 92vw);
  background: rgba(255,255,255,.92);
  border:1px solid rgba(20,30,60,.14);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  text-align:center;
}

.mobilePlay__title{
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 10px;
}

.mobilePlay__desc{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.mobilePlay__btn{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,140,0,.45);
  background: rgba(255,140,0,.14);
  color: var(--text);
  font-weight: 900;
  cursor:pointer;
}

.mobilePlay__note{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* frameWrap を相対配置にしてオーバーレイを載せる */
.frameWrap{ position: relative; }

/* スマホだけ表示（縦でも横でもOK。好みで portrait 限定にもできる） */
@media (max-width: 900px){
  .mobilePlay{ display:flex; }
}
