/* 夜空は紺一色（グラデーションなし）、結果は古い星図の紙。線は白と黒、色は見立ての絵の金（夜）と茶（紙）だけ */
* { box-sizing: border-box; }
:root { --night: #0b1030; --star: #fff; --gold: #f0c76a; --paper: #f3ead6; --ink: #2a2118; --sub: #7a6a55; --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Noto Serif CJK JP", serif; }
html, body { margin: 0; background: var(--night); color: var(--star); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
html { touch-action: manipulation; } /* ダブルタップで拡大しない（ピンチは viewport の user-scalable=no） */
html, body { overscroll-behavior: none; } /* X のアプリ内ブラウザを、なぞる指の上下で閉じさせない */
.title, .play { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus:not(:focus-visible) { outline: none; }
#app { max-width: 440px; margin: 0 auto; min-height: 100dvh; position: relative; overflow-x: clip; }
.btn { display: flex; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 52px; margin: 10px 0 0; padding: 10px 14px; border: 2px solid currentColor; border-radius: 12px; background: transparent; font-weight: 800; font-size: 17px; cursor: pointer; }
.btn.primary { background: var(--star); color: var(--night); border-color: var(--star); }
.btn:disabled { opacity: .35; cursor: default; }
.btn svg { width: 22px; height: 22px; }

/* タイトル */
.title { padding: 28px 22px 28px; text-align: center; }
.hero { display: block; width: 100%; height: 240px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 14px; }
.title h1 { margin: 22px 0 2px; font: 900 54px/1.1 var(--serif); letter-spacing: .1em; }
.catch { margin: 0 0 22px; font: 700 19px/1.5 var(--serif); }
.title .btn.primary { font-size: 19px; min-height: 58px; }
.guide { margin-top: 16px; font-size: 13px; }

/* つなぐ（縦 530px でも空と「名付ける」が見える: 空だけが縮む） */
.play { position: fixed; inset: 0; max-width: 440px; margin: 0 auto; min-height: 420px; display: flex; flex-direction: column; padding: 0 0 12px; overflow: hidden; touch-action: none; overscroll-behavior: none; } /* 遊ぶ画面はページごと動かない */
.skywrap { position: relative; flex: 1 1 auto; min-height: 260px; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hint { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; font-size: 14px; font-weight: 700; color: rgba(255,255,255,.75); pointer-events: none; }
.bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 0; }
.bar.off { visibility: hidden; }
.bar .btn { margin: 0; }
.bar .icon { flex: none; width: 52px; padding: 0; }
.bar #name { flex: none; width: 116px; }
.dots { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.6); }
.dots i.on { background: var(--star); border-color: var(--star); }
.stamp { position: absolute; left: 0; right: 0; top: 18px; text-align: center; opacity: 0; transform: scale(1.15); transition: opacity .25s, transform .25s; pointer-events: none; }
.stamp.on { opacity: 1; transform: none; }
.stamp b { display: block; font: 900 38px/1.2 var(--serif); color: var(--gold); }
.stamp span { font-size: 16px; font-weight: 800; }
.stamp em { font-style: normal; font-size: 26px; font-variant-numeric: tabular-nums; }

/* 結果（星図の紙） */
.result { min-height: 100dvh; padding: 14px 14px 30px; background: var(--paper); color: var(--ink); }
.shot { display: block; width: 100%; height: auto; border-radius: 6px; }
.myth { margin: 10px 2px 4px; font: 500 14.5px/1.65 var(--serif); }
.btn.xpost { background: #0f1419; border-color: #0f1419; color: #fff; }
.btn.xpost svg { width: 18px; height: 18px; fill: #fff; }
.zk { display: inline-flex; align-items: center; gap: 4px; margin: 14px 0 0; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 99px; background: transparent; font-size: 14px; font-weight: 700; cursor: pointer; }
.zk i { font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: #b0703c; border-radius: 4px; padding: 1px 4px; margin-left: 4px; }
.result .sn-after { color: var(--ink); }

/* 図鑑 */
.zukan { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 16px; overscroll-behavior: contain; }
.zk-in { width: 100%; max-width: 420px; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); color: var(--ink); border-radius: 12px; padding: 12px 12px 16px; }
.zk-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.zk-head b { font: 900 20px var(--serif); }
.zk-head span { font-weight: 700; color: var(--sub); }
.zk-x { margin-left: auto; width: 40px; height: 40px; border: 0; background: transparent; font-size: 26px; cursor: pointer; }
.zukan ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.zukan li { border: 1px solid rgba(42,33,24,.25); border-radius: 8px; padding: 4px 2px 6px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--sub); }
.zukan li.got { color: var(--ink); border-color: var(--ink); }
.zukan canvas { display: block; width: 100%; aspect-ratio: 1; }

/* 異議申し立て（名前の付け直し）。地の色の文字リンクで、赤はペンの印と書き込みだけ。入力欄は画面の上端（キーボードの出し方がどのブラウザでも隠れない） */
.ob-bar { display: flex; justify-content: flex-end; margin-top: 6px; }
.ob-go { display: inline-flex; align-items: center; gap: 4px; padding: 6px 2px; border: 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.ob-go span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ob-go svg { width: 15px; height: 15px; color: #c3301f; }
.objection { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.45); overscroll-behavior: contain; }
.ob-in { max-width: 440px; margin: 0 auto; padding: 14px 16px 16px; background: var(--paper); color: var(--ink); border-radius: 0 0 14px 14px; }
.ob-old { margin: 0 0 8px; font: 800 20px var(--serif); }
.ob-old s { text-decoration: line-through double #c3301f; text-decoration-thickness: 2px; }
.ob-row { display: flex; align-items: baseline; gap: 6px; border-bottom: 2.5px solid #c3301f; padding: 2px 2px 4px; }
.ob-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #c3301f; font: 800 24px var(--serif); padding: 4px 0; }
.ob-row input::placeholder { color: rgba(195,48,31,.3); }
.ob-row span { font: 800 24px var(--serif); color: #c3301f; }
.ob-btns { display: flex; gap: 8px; margin-top: 4px; }
.ob-btns .btn { flex: 1; min-height: 46px; }
.ob-btns .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
