/* AzArrow — 本編スタイル。世界は起動画面と同じ「星図の盤面」。
   全画面ノースクロール：画面は fixed で組み、内容は 375×812 に収める。 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  color: #eef4ff;
  background:
    radial-gradient(120% 90% at 50% 0%, #1d2b52 0%, #131c3a 55%, #0b1128 100%);
  background-color: #0b1128;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* ズーム封じ（ゲーム画面のみ）：iOS Safari は viewport の user-scalable=no を
     無視するため、ダブルタップ／ピンチのズームは touch-action で止める。
     内部スクローラ（.wall-card）は自分の pan-y で従来どおりスクロールできる。 */
  touch-action: none;
}
button { font-family: inherit; }

.wrap { position: fixed; inset: 0; }
.screen {
  position: absolute; inset: 0; display: none;
  flex-direction: column;
  padding: max(14px, env(safe-area-inset-top)) 18px max(12px, env(safe-area-inset-bottom));
}
.screen.active { display: flex; }

/* ---------- ステージ選択 ---------- */
.sel-head { text-align: center; position: relative; padding-top: 42px; }
.sel-back {
  position: absolute; left: 0; top: 40px;
  padding: 8px 13px; border-radius: 999px; border: 1px solid rgba(147, 165, 216, .35);
  background: rgba(21, 30, 61, .72); color: #dbe7ff; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.sel-back:active { transform: scale(.95); }
.brand { font-size: 10px; letter-spacing: .4em; text-indent: .4em; color: #93a5d8; font-weight: 700; margin: 2px 0 6px; }
.sel-title { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: .06em; }
.sel-progress { margin: 6px 0 0; font-size: 12px; color: #a9bde8; font-variant-numeric: tabular-nums; }
.points-chip {
  display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px;
  background: rgba(250, 204, 21, .14); border: 1px solid rgba(250, 204, 21, .4);
  color: #fde68a; font-size: 12px; font-weight: 700;
}
.points-chip b { font-variant-numeric: tabular-nums; }
.points-chip.small { margin-top: 0; }
.points-chip[hidden] { display: none; }

.stage-grid {
  flex: 1; display: grid; align-content: center;
  grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 14px 2px;
}
.stage-cell {
  position: relative; aspect-ratio: 1; border: 1px solid rgba(147, 165, 216, .25);
  border-radius: 16px; background: rgba(21, 30, 61, .66);
  color: #dbe7ff; font-size: 18px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s cubic-bezier(.22,.8,.3,1);
}
.stage-cell:active { transform: scale(.93); }
.stage-cell.cleared { background: linear-gradient(160deg, #2f9df4, #1e40af); border-color: rgba(125, 211, 252, .6); color: #fff; }
.stage-cell.frontier { border-color: #7dd3fc; box-shadow: 0 0 0 2px rgba(125, 211, 252, .35), 0 6px 18px rgba(29, 127, 224, .35); }
.stage-cell.locked { opacity: .38; cursor: default; }
.stage-cell .star { position: absolute; top: 4px; right: 7px; font-size: 12px; color: #facc15; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.stage-cell .lock { width: 16px; height: 16px; opacity: .8; }

.pager { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 2px 0 8px; }
.pg-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(147, 165, 216, .35);
  background: rgba(21, 30, 61, .7); color: #dbe7ff; font-size: 20px; cursor: pointer;
}
.pg-btn:disabled { opacity: .3; }
.pg-dots { display: flex; gap: 7px; }
.pg-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(147, 165, 216, .35); }
.pg-dots i.on { background: #7dd3fc; }

.settings-row { display: flex; gap: 8px; justify-content: center; padding-bottom: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(147, 165, 216, .35);
  background: rgba(21, 30, 61, .7); color: #c9d6f5; font-size: 12px; font-weight: 700; cursor: pointer;
}
.chip[aria-pressed="false"] { opacity: .55; }

.foot { display: flex; gap: 14px; justify-content: center; align-items: center; font-size: 10.5px; color: #7c8fc4; padding-top: 2px; }
.foot a { color: #93a5d8; }

/* ---------- プレイ ---------- */
.hud { display: flex; flex-direction: column; gap: 6px; }
.hud-row { display: flex; align-items: center; gap: 10px; }
.hud-row.sub { justify-content: flex-end; }
.hud-btn {
  padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(147, 165, 216, .35);
  background: rgba(21, 30, 61, .72); color: #dbe7ff; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.hud-stage { font-size: 13px; letter-spacing: .12em; color: #a9bde8; font-weight: 700; }
.hud-stage b { color: #fff; font-size: 16px; }
.hud-hearts { margin-left: auto; font-size: 16px; letter-spacing: 2px; color: #fb7185; }
.hud-hearts .off { color: rgba(147, 165, 216, .3); }
.hud-remain { font-size: 12px; color: #a9bde8; }
.hud-remain b { color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }

.board-zone { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
#board {
  position: relative; border-radius: 18px;
  background:
    linear-gradient(rgba(125, 211, 252, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, .045) 1px, transparent 1px),
    rgba(13, 20, 44, .78);
  border: 1px solid rgba(147, 165, 216, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 40px rgba(0,0,0,.35);
  touch-action: none;
}
.tile {
  position: absolute; border-radius: 24%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .27s cubic-bezier(.3,.7,.25,1), opacity .27s ease .1s;
  cursor: pointer; z-index: 2;
}
.tile svg { width: 64%; height: 64%; pointer-events: none; transition: transform .15s ease; }
.tile.d-U { background: linear-gradient(160deg, #38bdf8, #0369a1); }
.tile.d-D { background: linear-gradient(160deg, #fbbf24, #b45309); }
.tile.d-L { background: linear-gradient(160deg, #a78bfa, #6d28d9); }
.tile.d-R { background: linear-gradient(160deg, #fb7185, #be123c); }
.tile.d-U svg { transform: rotate(-90deg); }
.tile.d-R svg { transform: rotate(0deg); }
.tile.d-D svg { transform: rotate(90deg); }
.tile.d-L svg { transform: rotate(180deg); }
.tile.leaving { pointer-events: none; z-index: 3; }
.tile.guide-block { outline: 3px solid #fb7185; outline-offset: -1px; }
.tile.hint-pulse { animation: hintPulse .5s ease-in-out 2; }
@keyframes hintPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.65); }
}
.tile.shake { animation: shake .32s ease; }
@keyframes shake {
  0%, 100% { margin-left: 0; }
  20% { margin-left: -4px; } 40% { margin-left: 4px; }
  60% { margin-left: -3px; } 80% { margin-left: 3px; }
}
.pathcell {
  position: absolute; border-radius: 24%; z-index: 1;
  background: rgba(125, 211, 252, .16);
  border: 1.5px dashed rgba(125, 211, 252, .55);
  display: flex; align-items: center; justify-content: center;
  color: rgba(125, 211, 252, .8); font-weight: 900;
}
.pathcell.block { background: rgba(251, 113, 133, .16); border-color: rgba(251, 113, 133, .6); color: rgba(251, 113, 133, .9); }

.play-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tool-btn {
  padding: 11px 18px; border-radius: 999px; border: 1px solid rgba(147, 165, 216, .35);
  background: rgba(21, 30, 61, .75); color: #eef4ff; font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.tool-btn:disabled { opacity: .4; }
.tool-btn .cnt { color: #7dd3fc; }

/* ---------- オーバーレイ ---------- */
.ov {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 20, .55); padding: 20px;
}
.ov[hidden] { display: none; }
.ov-card {
  width: min(330px, 100%); text-align: center;
  background: rgba(21, 30, 61, .9); border: 1px solid rgba(147, 165, 216, .3);
  border-radius: 20px; padding: 24px 20px 18px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  animation: ovIn .3s cubic-bezier(.22,.8,.3,1);
}
@keyframes ovIn { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ov-kicker { margin: 0; font-size: 11px; letter-spacing: .3em; color: #7dd3fc; font-weight: 800; }
.ov-title { margin: 8px 0 4px; font-size: 27px; font-weight: 900; }
.ov-title.perfect { color: #fde68a; }
.ov-sub { margin: 4px 0 6px; font-size: 13px; color: #c9d6f5; line-height: 1.7; min-height: 1.2em; }
.ov-points {
  display: inline-block; margin: 6px 0 2px; padding: 5px 14px; border-radius: 999px;
  background: rgba(250, 204, 21, .16); border: 1px solid rgba(250, 204, 21, .5);
  color: #fde68a; font-size: 13px; font-weight: 800;
  animation: ovIn .35s cubic-bezier(.22,.8,.3,1);
}
.ov-points[hidden] { display: none; }
.ov-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ov-actions.row { flex-direction: row; }
.ov-actions.row .btn { flex: 1; }
.btn {
  padding: 13px; border-radius: 999px; border: 1px solid rgba(147, 165, 216, .35);
  background: rgba(147, 165, 216, .12); color: #eef4ff; font-size: 14.5px; font-weight: 800; cursor: pointer;
}
.btn.primary { background: linear-gradient(180deg, #38bdf8, #1d7fe0); border-color: transparent; color: #fff; }
.btn:active { transform: scale(.97); }
.btn.coin {
  background: linear-gradient(180deg, rgba(250, 204, 21, .22), rgba(250, 204, 21, .1));
  border-color: rgba(250, 204, 21, .55); color: #fde68a;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn .btn-price { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(250, 204, 21, .18); }
/* ゲームオーバーのコンティニュー：ラベル（主＋補足の2段）と価格チップを左右に分け、
   チップは「コインの印＋50」を主役に1行で締める。288px幅でも折れない寸法に固定。 */
#o-continue {
  justify-content: space-between; text-align: left;
  padding: 10px 12px 10px 18px;
  background: linear-gradient(180deg, rgba(250, 204, 21, .27), rgba(217, 119, 6, .13));
  border-color: rgba(250, 204, 21, .65);
}
#o-continue .btn-label { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; min-width: 0; }
#o-continue .btn-sub { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: rgba(253, 230, 138, .75); }
#o-continue .btn-price {
  display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap;
  padding: 7px 12px; font-size: 12px;
  background: rgba(11, 17, 40, .38); border: 1px solid rgba(250, 204, 21, .45);
}
#o-continue .btn-price b { font-size: 18px; font-weight: 900; line-height: 1; }
#o-continue .btn-unit { font-size: 10.5px; font-weight: 800; }
#o-continue .coin-dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fef3c7, #facc15 55%, #d97706);
  box-shadow: inset 0 0 0 1.5px rgba(120, 53, 15, .5), 0 1px 3px rgba(0, 0, 0, .35);
}
.btn:disabled { opacity: .45; }
.btn[hidden] { display: none; }

/* ショップ（アズコイン） */
#ov-shop { z-index: 45; }
.shop-price { margin: 10px 0 2px; font-size: 24px; font-weight: 900; color: #fde68a; }
.shop-balance { margin: 4px 0 0; font-size: 12.5px; color: #93a5d8; min-height: 1.2em; }
.shop-note { margin: 6px 0 0; font-size: 11.5px; color: #7d8dbd; line-height: 1.6; }
.tool-btn.buyable { border-color: rgba(250, 204, 21, .55); color: #fde68a; }

/* ステージ選択：アプリ内ブラウザで開かれた人への先回り案内。
   ステージ4の壁に着いてから Safari へ移ると記録が移らないため、
   遊び始める前に「先にブラウザで開く」ことを知らせる。 */
.inapp-note {
  margin: 10px 0 0; padding: 12px 14px; width: 100%;
  border-radius: 16px; border: 1px solid rgba(250, 204, 21, .65);
  background: rgba(250, 204, 21, .13); color: #eef4ff;
  display: flex; flex-direction: column; gap: 3px;
  text-align: left; cursor: pointer;
}
.inapp-note[hidden] { display: none; }
.inapp-note b { font-size: 15.5px; color: #fde68a; }
.inapp-note span { font-size: 13px; line-height: 1.5; }
.inapp-note .inapp-note-go { font-size: 13px; font-weight: 900; color: #7dd3fc; }
.inapp-note:active { transform: scale(.98); }

/* ホーム画面の壁：1画面1ステップの案内。
   カード内はスクロールさせない（詰まった人がボタンを見落とすため）。
   絵は実機のブラウザ／共有シート／ホーム画面に寄せ、押す場所を黄色で囲む。 */
#ov-wall { z-index: 47; padding: 12px; }
body.wall-open #azc-chip, body.wall-open #azc-apphint { display: none !important; }
.wall-card {
  position: relative; z-index: 2;
  width: min(360px, 100%); height: min(780px, calc(100dvh - 24px));
  padding: 16px 18px 12px;
  display: flex; flex-direction: column;
  overflow-x: hidden; overflow-y: auto; touch-action: pan-y; text-align: center;
}
.wall-icon { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.wall-title { font-size: 23px; line-height: 1.32; margin: 10px 0 2px; }
.wall-lead { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: #c9d6f5; }
.wall-progress {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 1px; color: #a9bde8; font-size: 12.5px; font-weight: 800;
}
.wall-progress[hidden] { display: none; }
.wall-progress-dots { display: flex; gap: 6px; }
.wall-progress-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(147,165,216,.35); }
.wall-progress-dots i.on { background: #7dd3fc; }
.wall-steps { text-align: left; }
.wall-steps[hidden], .wall-panel[hidden], .wall-help[hidden] { display: none !important; }
.wall-panel h4 { margin: 10px 2px 5px; font-size: 20px; line-height: 1.45; font-weight: 900; color: #fff; }
.wall-panel p { margin: 0 2px; font-size: 16px; line-height: 1.62; color: #dbe7ff; }
.wall-panel p b { color: #fde68a; }
.wall-mini-btn {
  margin-top: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, .55); background: rgba(56, 189, 248, .14);
  color: #bae6fd; font-size: 14px; font-weight: 800; cursor: pointer;
}
.wall-mini-btn:active { transform: scale(.96); }

/* ---- 案内の絵（実機UIの模式図） ---- */
.wall-art {
  height: 172px; border-radius: 18px; overflow: hidden; position: relative;
  border: 1px solid rgba(147, 165, 216, .32);
  background: radial-gradient(110% 100% at 50% 0%, #263766 0%, #141d3d 70%);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.wall-art .hit {
  box-shadow: 0 0 0 3px #facc15, 0 0 18px rgba(250, 204, 21, .55);
  background: #fef3c7 !important; color: #92400e !important; border-radius: 12px;
}
.art-here {
  margin-left: auto; padding: 3px 9px; border-radius: 999px;
  background: #facc15; color: #713f12; font-size: 11.5px; font-weight: 900;
}
.art-x { color: #64748b; font-size: 17px; font-weight: 700; }
.art-row-icon {
  width: 27px; height: 27px; flex: none; display: grid; place-items: center;
  border-radius: 9px; background: #e2e8f0; color: #334155; font-size: 16px; font-weight: 900;
}
.art-row-icon.plus { background: #dbeafe; color: #1d4ed8; font-size: 20px; }

.browser-icon {
  width: 74px; height: 74px; flex: none; border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #bfdbfe);
  border: 2px solid #93c5fd; display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.3);
}
.browser-icon > span {
  width: 40px; height: 40px; display: block;
  background: linear-gradient(45deg, #ef4444 0 50%, #2563eb 50% 100%);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  transform: rotate(45deg);
}
.browser-icon.small { width: 30px; height: 30px; border-width: 1.5px; box-shadow: none; }
.browser-icon.small > span { width: 16px; height: 16px; }
.art-browser-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; color: #fff; font-size: 14px; }
.art-transfer { gap: 18px; }
.art-app-icon img { width: 74px; height: 74px; border-radius: 18px; box-shadow: 0 8px 18px rgba(0,0,0,.3); }
.art-transfer-arrow { font-size: 34px; font-weight: 900; color: #facc15; }

.art-phone {
  width: 86%; height: 100%; border-radius: 16px; overflow: hidden;
  border: 1.5px solid #93a5d8; background: #eef2ff; color: #172554;
  display: flex; flex-direction: column;
}
.art-phone-bar {
  position: relative; min-height: 34px; padding: 5px 10px;
  display: flex; align-items: center; gap: 10px;
  background: #fff; font-size: 15px; font-weight: 800;
}
.art-phone-bar.top { border-bottom: 1px solid #cbd5e1; }
.art-phone-bar.bottom { border-top: 1px solid #cbd5e1; justify-content: space-between; padding-right: 42px; }
.art-page-name { flex: 1; text-align: center; font-size: 13.5px; }
.art-dots { padding: 2px 7px; letter-spacing: 1px; }
.art-dots-v { padding: 2px 9px; font-size: 19px; line-height: 1; }
.art-callout {
  position: absolute; right: 42px; padding: 2px 8px; border-radius: 999px;
  background: #172554; color: #fde68a; font-size: 11px; font-weight: 900;
}
.art-phone-bar.top .art-callout { top: 38px; }
.art-phone-bar.bottom .art-callout { bottom: 38px; }
.art-phone-page {
  flex: 1; display: flex; flex-direction: column; gap: 7px;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #dbeafe, #e0e7ff);
  font-size: 14px; font-weight: 900;
}
.art-phone-page img { width: 52px; height: 52px; border-radius: 13px; }
.chrome-bar { gap: 8px; }
.art-lock { font-size: 8px; color: #64748b; }
.art-address {
  flex: 1; min-width: 0; padding: 5px 10px; border-radius: 999px;
  background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-align: left;
}

.art-menu, .art-sheet {
  width: 90%; height: 100%; gap: 6px; padding: 9px; border-radius: 16px; padding: 10px;
  background: #f8fafc; color: #172554;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 12px 26px rgba(0,0,0,.3);
}
.art-menu-row, .art-sheet-row {
  flex: 1; display: flex; align-items: center; gap: 10px; min-height: 0;
  padding: 6px 9px; border-radius: 12px; background: #fff;
  font-size: 14px; text-align: left;
}
.art-menu-row.muted, .art-sheet-row.muted { color: #64748b; }
.art-menu-row.hit, .art-sheet-row.hit { border-radius: 12px; }
.android-menu { width: 82%; margin-left: auto; }
.art-sheet-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 4px; text-align: left; }
.art-sheet-head img { width: 36px; height: 36px; border-radius: 9px; }
.art-sheet-head div { flex: 1; display: flex; flex-direction: column; }
.art-sheet-head b { font-size: 14px; }
.art-sheet-head span { font-size: 11px; color: #64748b; }
.art-sheet-head .art-x { flex: none; }
.art-scroll-hint { text-align: center; font-size: 12px; font-weight: 800; color: #2563eb; }

.art-share { padding: 0; display: flex; flex-direction: column; align-items: stretch; background: #f8fafc; color: #172554; }
.art-toolbar {
  min-height: 42px; padding: 5px 10px; display: flex; align-items: center; gap: 9px;
  background: #fff;
}
.art-toolbar.toolbar-top { display: none; border-bottom: 1px solid #cbd5e1; }
.art-toolbar.toolbar-bottom { border-top: 1px solid #cbd5e1; }
.art-share.top .toolbar-top { display: flex; }
.art-share.top .toolbar-bottom { display: none; }
.art-safari-page {
  flex: 1; display: flex; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #dbeafe, #e0e7ff); color: #172554;
}
.art-safari-page img { width: 50px; height: 50px; border-radius: 12px; }
.art-safari-page strong { font-size: 15px; }
.art-safari-page span { font-size: 12px; color: #475569; font-weight: 700; }
.art-nav-arrow { font-size: 20px; color: #64748b; }
.art-tabs { font-size: 16px; color: #64748b; }
.art-share-btn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: #2563eb; }
.art-share-btn svg { width: 21px; height: 21px; }

.art-add { padding: 0; display: flex; flex-direction: column; align-items: stretch; background: #f1f5f9; color: #172554; }
.art-add-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 12px; background: #fff; border-bottom: 1px solid #cbd5e1;
  font-size: 12.5px; color: #2563eb;
}
.art-add-bar b { color: #172554; font-size: 13.5px; }
.art-add-btn { padding: 5px 10px; font-weight: 900; }
.art-add-main {
  margin: 13px; padding: 11px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; gap: 11px; text-align: left;
}
.art-add-main img { width: 46px; height: 46px; border-radius: 11px; }
.art-add-main div { display: flex; flex-direction: column; }
.art-add-main b { font-size: 15px; }
.art-add-main span { font-size: 11.5px; color: #64748b; }
.art-add-toggle {
  margin: 0 13px; padding: 10px 11px; border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; font-weight: 700;
}
.toggle { width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.toggle.on { background: #22c55e; }
.toggle.on::after { left: 21px; }

.art-home {
  display: grid; grid-template-columns: repeat(4, 48px); gap: 15px;
  align-content: center; justify-content: center;
  background: linear-gradient(160deg, #475569, #0f172a);
}
.art-app-dot { width: 48px; height: 48px; border-radius: 13px; opacity: .75; }
.art-app-dot.c1 { background: #38bdf8; } .art-app-dot.c2 { background: #a78bfa; }
.art-app-dot.c3 { background: #34d399; } .art-app-dot.c4 { background: #fbbf24; }
.art-app-dot.c5 { background: #f472b6; } .art-app-dot.c6 { background: #94a3b8; }
.art-home-app { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; }
.art-home-app img { width: 48px; height: 48px; border-radius: 13px; }
.art-home-app span { font-size: 11px; font-weight: 800; color: #713f12; }

.art-after { gap: 18px; }
.art-after-stage {
  width: 64px; height: 64px; border-radius: 17px; display: grid; place-items: center;
  background: linear-gradient(160deg, #2f9df4, #1e40af); color: #fff;
  font-size: 27px; font-weight: 900; box-shadow: 0 8px 18px rgba(0,0,0,.3);
}
.art-after-guide {
  padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(147,165,216,.4); color: #fff;
  font-size: 14px; font-weight: 800; line-height: 1.5;
}

/* ---- 詰まったときの逃げ道 ---- */
.wall-help { text-align: left; }
.wall-help[hidden] { display: none !important; }
.wall-help-icon {
  width: 44px; height: 44px; border-radius: 50%; margin: 2px auto 8px;
  display: grid; place-items: center;
  background: rgba(250, 204, 21, .18); border: 1px solid rgba(250, 204, 21, .55);
  color: #fde68a; font-size: 22px; font-weight: 900;
}
.wall-help h4 { margin: 0; text-align: center; font-size: 20px; font-weight: 900; color: #fff; }
.wall-help > p { margin: 6px 0 0; text-align: center; font-size: 14.5px; line-height: 1.6; color: #c9d6f5; }
.wall-help-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.wall-help-detail {
  margin: 12px 0 0; padding: 11px 12px; border-radius: 12px;
  background: rgba(125, 211, 252, .12); border: 1px solid rgba(125, 211, 252, .4);
  font-size: 14.5px; line-height: 1.65; color: #e0f2fe;
}
.wall-help-detail[hidden] { display: none; }

.wall-done { margin: 18px 0 4px; font-size: 16.5px; line-height: 1.75; color: #d9f99d; font-weight: 700; }
.wall-done[hidden] { display: none; }
.wall-actions { margin-top: auto; }
.wall-nav { display: flex; gap: 8px; width: 100%; }
.wall-nav .btn { flex: 1; }
.wall-nav[hidden] { display: none; }
.wall-actions .btn { padding: 12px; }
.wall-stuck {
  margin-top: 6px; padding: 6px; border: 0; background: none; cursor: pointer;
  color: #fde68a; font-size: 14px; font-weight: 800;
  text-decoration: underline; text-underline-offset: 3px;
}
.wall-stuck[hidden] { display: none; }
.wall-note { margin: 3px 0 0; font-size: 12px; color: #7c8fc4; }
.wall-glow {
  position: absolute; left: 8%; right: 8%; bottom: 0; height: 3px; z-index: 1;
  border-radius: 999px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, .95), transparent);
  box-shadow: 0 0 18px 3px rgba(56, 189, 248, .55);
  animation: wallGlow 2.2s ease-in-out infinite;
}
.wall-glow.top { bottom: auto; top: 0; }
.wall-glow[hidden] { display: none; }
@keyframes wallGlow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

@media (max-height: 800px) {
  .wall-icon { width: 50px; height: 50px; }
  .wall-title { font-size: 21px; }
  .wall-lead { font-size: 13.5px; }
  .wall-art { height: 150px; }
  .wall-panel h4 { font-size: 19px; margin: 9px 2px 4px; }
  .wall-panel p { font-size: 15.5px; }
  .wall-actions .btn { padding: 11px; }
}

@media (max-height: 720px) {
  .wall-card { padding: 13px 15px 10px; }
  .wall-icon { width: 50px; height: 50px; border-radius: 13px; }
  .wall-title { font-size: 21px; margin-top: 5px; }
  .wall-lead { font-size: 13px; line-height: 1.55; }
  .wall-progress { margin: 7px 1px; }
  .wall-art { height: 146px; padding: 9px; }
  .wall-panel h4 { margin: 9px 2px 4px; font-size: 19px; }
  .wall-panel p { font-size: 15.5px; line-height: 1.58; }
  .wall-mini-btn { margin-top: 7px; padding: 8px 13px; }
  .wall-actions .btn { padding: 11px; }
  .wall-stuck { margin-top: 5px; padding: 5px; }
  .wall-note { margin-top: 2px; }
  .browser-icon { width: 60px; height: 60px; }
  .art-app-icon img { width: 60px; height: 60px; }
}

/* 記録を守る案内 */
#ov-guard { z-index: 46; }
.guard-title { font-size: 21px; line-height: 1.5; }
.guard-sub { font-size: 14px; line-height: 1.85; text-align: left; }
.btn.free {
  background: linear-gradient(180deg, rgba(52, 211, 153, .25), rgba(52, 211, 153, .12));
  border-color: rgba(52, 211, 153, .55); color: #a7f3d0;
}

/* 広告（配信レイヤーは js/ads.js。ここは枠の見た目だけ） */
.ad-banner { margin: 2px 0 10px; }
.ad-banner[hidden] { display: none; }
.ad-card {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  background: rgba(21, 30, 61, .8); border: 1px solid rgba(147, 165, 216, .3);
  border-radius: 14px; padding: 8px 12px 8px 8px; color: #eef4ff;
  animation: ovIn .3s cubic-bezier(.22,.8,.3,1);
}
.ad-card img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: rgba(147,165,216,.15); }
.ad-card .ad-tx { flex: 1; min-width: 0; text-align: left; }
.ad-card .ad-name { display: block; font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-card .ad-tag { display: block; font-size: 11.5px; color: #a9bde8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ad-badge { flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: #0b1128; background: #facc15; border-radius: 4px; padding: 2px 5px; }
.ad-go { flex: none; font-size: 12px; font-weight: 800; color: #7dd3fc; }
#ov-ad { z-index: 48; }
.adov-card { width: min(340px, 100%); }
/* 広告カード：素材はタイトル画面等の縦長スクショのため、全面 cover では被写体が切れる。
   写真は小さなサムネに格下げし、名前＋ジャンル＋キャッチ＋CTA で構成する（龍大「写真出さすぎ」）。 */
.adov-creative { display: flex; align-items: center; gap: 13px; margin-top: 10px; padding: 12px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(147, 165, 216, .3); text-decoration: none; color: #eef4ff; background: rgba(13, 20, 44, .8); }
.adov-creative img { width: 84px; height: 84px; flex: none; border-radius: 10px; object-fit: cover; object-position: 50% 28%; display: block; background: rgba(147,165,216,.15); }
.adov-creative .adov-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.adov-creative .ad-name { font-size: 17px; font-weight: 900; line-height: 1.3; }
.adov-creative .ad-genre { font-size: 11px; font-weight: 700; color: #93a5d8; margin-top: 1px; }
.adov-creative .ad-tag { font-size: 12.5px; color: #c9d6f5; margin-top: 5px; line-height: 1.5; }
.adov-creative .ad-cta { margin-top: 9px; font-size: 12px; font-weight: 800; color: #7dd3fc; border: 1px solid rgba(147, 165, 216, .45); padding: 4px 11px; border-radius: 999px; }
.adov-status { margin: 12px 0 0; font-size: 13px; color: #c9d6f5; min-height: 1.3em; }
.adov-bar { height: 6px; border-radius: 999px; background: rgba(147, 165, 216, .2); margin-top: 10px; overflow: hidden; }
.adov-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #38bdf8, #1d7fe0); border-radius: 999px; }

/* あそびかた */
.howto-panel { min-height: 218px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.howto-art { width: 132px; height: 132px; }
.howto-text { font-size: 13.5px; line-height: 1.8; color: #dbe7ff; margin: 0; }
.howto-dots { display: flex; gap: 7px; justify-content: center; margin-top: 6px; }
.howto-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(147, 165, 216, .35); }
.howto-dots i.on { background: #7dd3fc; }

/* トースト */
.toast {
  position: fixed; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 50; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: rgba(13, 20, 44, .92); border: 1px solid rgba(250, 204, 21, .45);
  color: #fde68a; font-size: 13px; font-weight: 800;
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
.toast[hidden] { display: none; }

