html, body {
  margin: 0;
  padding: 0;
  background: #0a121a;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}
#wrap {
  width: 800px;
  margin: 24px auto;
  border: 1px solid #193044;
  box-shadow: 0 0 18px rgba(0,0,0,0.5);
}
#gameCanvas {
  display: block;
  background: #081018;
  /* 初期は main.js が visibility を制御（フォント/アセット待ち） */
  visibility: hidden;
}
/* === Cookie Overlay === */
.cookie-footer-btn{
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 9998;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(20,24,32,.7);
  color: #eaf6ff;
  font: 600 12px system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.cookie-footer-btn:hover{ background: rgba(24,28,38,.8); }

.cookie-overlay{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.cookie-overlay[hidden] { display: none !important; }

.cookie-card{
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(14,18,28,.95);
  color: #eaf6ff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  font: 14px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}
.cookie-title{ font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.cookie-desc{ margin: 0 0 12px; opacity: .9; }

.cookie-actions{
  display: flex; gap: 10px; flex-wrap: wrap;
  margin: 12px 0 14px;
}
.cookie-btn{
  appearance: none; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #eaf6ff; padding: 10px 14px; border-radius: 10px;
  cursor: pointer; font-weight: 700;
}
.cookie-btn.primary{ background: #1d9bf0; border-color: #1d9bf0; }
.cookie-btn.ghost{ background: transparent; }

.cookie-state{
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 16px; padding: 10px; border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}

.cookie-inventory h3{ margin: 8px 0; font-size: 16px; }
.cookie-table{
  width: 100%; border-collapse: collapse; margin-bottom: 8px;
}
.cookie-table th, .cookie-table td{
  border-bottom: 1px dashed rgba(255,255,255,.08);
  padding: 8px 6px; text-align: left; vertical-align: top;
}
.cookie-table th:nth-child(3), .cookie-table td:nth-child(3){ white-space: nowrap; }
.cookie-note{ font-size: 12px; opacity: .75; }

/* === Game Share Button（既存） === */
.share-x-btn{
  position: fixed; right: 12px; top: 12px; z-index: 10;
  appearance: none; border: none;
  background: #1d9bf0; color: #fff; font-weight: 700; border-radius: 10px;
  padding: 8px 12px; cursor: pointer;
}

/* ==== モバイル非対応オーバーレイ ==== */
.unsupported-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;            /* consent より上 */
  display: none;              /* JSで制御 */
  place-items: center;
  background: rgba(0,0,0,0.85);
  color: #eaf6ff;
  text-align: center;
  padding: 24px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.unsupported-card {
  width: min(680px, 92vw);
  background: #12181f;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.unsupported-card h2 { margin: 0 0 10px; font-size: 20px; }
.unsupported-card p  { line-height: 1.7; opacity: .95; margin: 8px 0; }
.unsupported-actions { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.unsupported-btn {
  appearance: none; border: 1px solid rgba(255,255,255,.2);
  background: #2a2d33; color: #fff; padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 700;
}
.unsupported-btn.primary { background: #0ea5e9; border-color: #0ea5e9; color: #001018; }


/* ==== Ads under canvas ==== */
/* キャンバス(800px)より少し長い 880px 幅で中央寄せ。PC想定なので固定でOK */
.ad-area{
  width: 880px;
  margin: 18px auto 48px;
}

.ad-row{
  display: flex;
  gap: 16px;
}

/* 2分割の同サイズ枠。高さは確保してCLSを避ける */
.ad-slot{
  flex: 1 1 0;
  min-height: 130px;          /* 728×90 / 300×250 などに合わせてゆとり確保 */
  background: #0f1d2a;        /* ゲームの配色に合わせたダーク背景 */
  border: 1px solid #1f3144;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* プレースホルダー（審査中のダミー表示） */
.ad-ph{
  font: 600 12px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #8fbad2;
  opacity: .9;
}

/* もし画面が狭い場合（デスクトップでもウィンドウを細くした時）は縦積み */
@media (max-width: 920px){
  .ad-area{ width: 96vw; }
  .ad-row{ flex-direction: column; }
  .ad-slot{ min-height: 120px; }
}
