/* オトムス・クエスト：画面 */
.rq-wrap { position: relative; width: 100%; max-width: 1040px; margin: 0 auto; font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; color: #fff; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.rq-stage { position: relative; width: 100%; aspect-ratio: 640 / 416; background: #0a0a14; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 3px #2a2140, 0 8px 30px rgba(0, 0, 0, .5); }
.rq-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto; }
.rq-ui { position: absolute; inset: 0; pointer-events: none; font-size: 15px; }
.rq-ui > * { pointer-events: auto; }
.rq-fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none !important; z-index: 40; }
/* ウィンドウの共通 */
.rq-msg, .rq-choice, .rq-panel, .rq-blog, .rq-bcmd, .rq-bparty, .rq-hud, .rq-toast { background: linear-gradient(180deg, rgba(24, 28, 70, .93), rgba(10, 12, 38, .95)); border: 2px solid #e8ecff; border-radius: 10px; box-shadow: 0 0 0 2px #1a2050, 0 4px 16px rgba(0, 0, 0, .55), inset 0 0 18px rgba(80, 100, 220, .25); color: #fff; }
.rq-msg { position: absolute; left: 3%; right: 3%; bottom: 3%; padding: 1em 1.4em 1.1em; min-height: 6.4em; z-index: 45; }
.rq-msg-name { position: absolute; top: -1.05em; left: 1em; background: #2a3a9a; border: 2px solid #e8ecff; border-radius: 8px; padding: .1em .8em; font-weight: 800; font-size: .9em; }
.rq-msg-text { line-height: 1.7; font-size: 1.15em; white-space: pre-wrap; font-weight: 700; letter-spacing: .02em; }
.rq-msg-next { position: absolute; right: 1.1em; bottom: .5em; animation: rq-blink .8s infinite; font-size: .9em; }
@keyframes rq-blink { 50% { opacity: 0; } }
.rq-hud { position: absolute; left: 1.5%; top: 2%; padding: .4em .7em; display: flex; flex-direction: column; gap: .25em; background: rgba(10, 12, 38, .7); border-width: 1px; font-size: 1.12em; z-index: 5; pointer-events: none !important; max-width: 48%; }
.rq-hm { line-height: 1.2; } .rq-hm b { margin-right: .3em; } .rq-hm.dead { opacity: .5; }
.rq-hm span { font-size: .85em; opacity: .85; }
.bar { height: .45em; background: #20243e; border-radius: 4px; overflow: hidden; margin: .1em 0; position: relative; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #5ef08a, #2fc85a); border-radius: 4px; transition: width .25s; }
.rq-gold { color: #ffe27a; font-weight: 800; text-align: right; }
.rq-toast { position: absolute; left: 50%; top: 10%; transform: translateX(-50%) translateY(-10px); padding: .5em 1.2em; opacity: 0; transition: .3s; z-index: 50; pointer-events: none !important; font-weight: 800; }
.rq-toast.show { opacity: 1; transform: translateX(-50%); }
.rq-mapname { position: absolute; left: 50%; top: 12%; transform: translateX(-50%) scale(.96); opacity: 0; padding: .5em 2em; font-size: 1.5em; font-weight: 900; letter-spacing: .15em; background: linear-gradient(90deg, transparent, rgba(10, 12, 38, .85) 20%, rgba(10, 12, 38, .85) 80%, transparent); transition: all .7s; z-index: 30; pointer-events: none !important; text-shadow: 0 0 12px rgba(120, 140, 255, .9); }
.rq-mapname.go { opacity: 1; transform: translateX(-50%) scale(1); }
/* 選択肢 */
.rq-layer { position: absolute; inset: 0; z-index: 25; pointer-events: none; }
.rq-layer > * { pointer-events: auto; }
.rq-choice { position: absolute; right: 4%; bottom: 33%; padding: .5em; min-width: 10em; display: flex; flex-direction: column; gap: .15em; z-index: 46; }
.rq-choice.small { min-width: 6em; }
.rq-choice-t { font-weight: 800; padding: .2em .6em; border-bottom: 1px solid #4a5aa0; margin-bottom: .2em; }
.rq-opt { background: none; border: 2px solid transparent; color: #fff; font: inherit; font-weight: 700; text-align: left; padding: .28em .9em .28em 1.4em; border-radius: 7px; cursor: pointer; position: relative; display: flex; justify-content: space-between; gap: 1em; line-height: 1.35; width: 100%; }
.rq-opt .r { opacity: .85; font-weight: 600; font-size: .92em; }
.rq-opt.sel { background: rgba(110, 130, 255, .28); border-color: #cfd8ff; }
.rq-opt.sel::before { content: '▶'; position: absolute; left: .35em; font-size: .75em; top: .55em; }
.rq-opt.dis { opacity: .45; }
/* パネル */
.rq-panel { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); width: min(40em, 94%); max-height: 88%; z-index: 27; display: flex; flex-direction: column; overflow: hidden; }
.rq-panel.wide { width: min(58em, 96%); }
.rq-panel.shop { width: min(34em, 94%); }
.rq-panel.menu { left: 1.5%; top: 2%; transform: none; width: 15em; max-height: 94%; }
.rq-panel.menu .rq-panel-b { padding: .4em .5em .5em; }
.rq-panel-h { padding: .35em .9em; font-weight: 900; font-size: 1.1em; background: rgba(60, 80, 190, .5); border-bottom: 2px solid #e8ecff; display: flex; justify-content: space-between; align-items: center; }
.rq-panel-x { background: none; border: 1px solid #aab4e8; color: #fff; border-radius: 6px; cursor: pointer; padding: 0 .5em; font: inherit; }
.rq-panel-b { padding: .6em .9em; overflow-y: auto; flex: 1; }
.rq-gl { color: #ffe27a; font-weight: 800; margin-bottom: .3em; } .rq-gl small { color: #bbc; margin-left: .6em; }
.rq-info { padding: .3em .5em; margin-bottom: .4em; background: rgba(0, 0, 0, .25); border-radius: 6px; min-height: 1.6em; font-size: .95em; }
.rq-list { display: flex; flex-direction: column; gap: .1em; }
.rq-menu-main .rq-list { max-width: 14em; }
.rq-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7em; }
.rq-card { background: rgba(0, 0, 0, .25); border: 1px solid #5a6ac0; border-radius: 8px; padding: .5em .7em; }
.rq-card-h { font-weight: 800; margin-bottom: .3em; }
.rq-card-b { display: flex; gap: .7em; align-items: center; }
.rq-sprite { width: 3.4em; height: 4.4em; flex: none; background-size: 400% 100%; background-position: 0 0; background-repeat: no-repeat; image-rendering: auto; }
.rq-card table { font-size: .85em; border-collapse: collapse; } .rq-card th { text-align: left; font-weight: 600; color: #aab; padding-right: .5em; } .rq-card td { padding-right: 1em; font-weight: 800; }
.rq-eq { font-size: .8em; margin-top: .3em; opacity: .9; }
/* 戦闘 */
.rq-b { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
.rq-blog { position: absolute; left: 2%; top: 3%; max-width: 54%; padding: .5em 1.5em; font-weight: 800; font-size: 1.05em; text-align: center; opacity: 0; transition: opacity .15s; white-space: pre-wrap; max-width: 80%; pointer-events: none !important; }
.rq-blog.show { opacity: 1; }
.rq-bcmd { position: absolute; left: 2%; bottom: 3%; min-width: 12em; max-height: 46%; overflow-y: auto; padding: .4em; pointer-events: auto; }
.rq-bcmd:empty { display: none; }
.rq-bcmd-t { font-weight: 900; padding: .15em .6em .3em; border-bottom: 1px solid #4a5aa0; margin-bottom: .2em; } .rq-bcmd-t small { font-weight: 600; color: #bbd; }
.rq-bopts { display: flex; flex-direction: column; }
.rq-bparty { position: absolute; right: 2%; top: 2%; padding: .35em; display: grid; grid-template-columns: repeat(2, 1fr); gap: .3em; font-size: .78em; pointer-events: none !important; width: 47%; }
.rq-bparty .m { border: 1px solid #4a5aa0; border-radius: 6px; padding: .2em .5em; background: rgba(0, 0, 0, .25); }
.rq-bparty .m.on { border-color: #ffe566; box-shadow: 0 0 6px #ffe566; }
.rq-bparty .m.dead { opacity: .5; }
.rq-bparty b { margin-right: .3em; } .rq-bparty small { color: #bcd; }
.rq-bparty .bar { height: .7em; position: relative; margin: .12em 0; } .rq-bparty .bar span { position: absolute; right: .3em; top: -.15em; font-size: .85em; font-weight: 800; text-shadow: 0 0 3px #000; line-height: 1em; }
.rq-bparty .bar.mp i { background: linear-gradient(90deg, #6aa8ff, #3a7ae0); }
/* タイトル */
.rq-title { position: absolute; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.rq-title-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 120%, #ffb866 0%, #b04870 25%, #2a2a6a 55%, #0a0a24 100%); }
.rq-title-bg::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #fff, transparent), radial-gradient(2px 2px at 40% 60%, #ffe, transparent), radial-gradient(1.5px 1.5px at 85% 55%, #fff, transparent), radial-gradient(1px 1px at 10% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 12%, #ffd, transparent); animation: rq-twinkle 3s infinite alternate; }
@keyframes rq-twinkle { 50% { opacity: .55; } }
.rq-title-in { position: relative; z-index: 2; width: 90%; }
.rq-logo { font-size: 3.2em; font-weight: 900; letter-spacing: .08em; background: linear-gradient(180deg, #fff6c8, #ffc860 55%, #d88a38); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #5a2a40) drop-shadow(0 0 14px rgba(255, 190, 90, .7)); line-height: 1.1; }
.rq-sub { font-size: 1.2em; margin: .4em 0 1.2em; color: #ffe6c8; letter-spacing: .2em; text-shadow: 0 2px 6px #000; }
.rq-title-menu { display: inline-flex; flex-direction: column; min-width: 15em; background: rgba(10, 12, 38, .8); border: 2px solid #e8ecff; border-radius: 12px; padding: .6em; align-items: stretch; }
.rq-tn { margin-top: 1.2em; font-size: .78em; color: #ffe; text-shadow: 0 1px 4px #000; }
.rq-name { font: inherit; font-weight: 800; padding: .4em .7em; border-radius: 8px; border: 2px solid #e8ecff; background: #0c1034; color: #fff; text-align: center; margin: .3em 0 .6em; font-size: 1.1em; }
.rq-namelab { font-weight: 700; margin-bottom: .2em; }
/* 操作パッド */
.rq-pad { display: none; justify-content: space-between; align-items: center; padding: 10px 14px 6px; touch-action: none; }
.rq-pad .dp { position: relative; width: 132px; height: 132px; }
.rq-pad button { position: absolute; width: 44px; height: 44px; border-radius: 12px; border: 2px solid #aab4ff; background: rgba(40, 50, 120, .85); color: #fff; font-size: 18px; touch-action: none; }
.rq-pad .u { left: 44px; top: 0; } .rq-pad .d { left: 44px; top: 88px; } .rq-pad .l { left: 0; top: 44px; } .rq-pad .r { left: 88px; top: 44px; }
.rq-pad .ab { display: flex; gap: 14px; } .rq-pad .ab button { position: static; width: 64px; height: 64px; border-radius: 50%; font-weight: 900; font-size: 17px; }
.rq-pad .ab .b { background: rgba(120, 60, 60, .85); border-color: #ffb0b0; }
@media (pointer: coarse), (max-width: 760px) { .rq-pad { display: flex; } }
.rq-msg-text, .rq-opt, .rq-panel-b { -webkit-font-smoothing: antialiased; }
[hidden]{display:none !important}

.rq-ending { position: absolute; inset: 0; z-index: 30; background: radial-gradient(ellipse at 50% 40%, #3a2a6a, #0a0a1c 70%); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; pointer-events: none; }
.rq-end-pic { margin-top: 5%; height: 52%; display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0 0 18px rgba(255, 230, 160, .5)); }
.rq-end-pic img { max-height: 100%; max-width: 70%; object-fit: contain; image-rendering: auto; }
.rq-credits { position: absolute; inset: 0; overflow: hidden; pointer-events: auto; text-align: center; }
.rq-cr-in { position: absolute; left: 0; right: 0; top: 100%; animation: rq-roll 36s linear forwards; font-weight: 800; line-height: 1.8; }
.rq-cr-in h2 { font-size: 2.2em; color: #ffd27a; margin: 0; } .rq-cr-in h3 { color: #ffe6b0; font-size: 1.6em; } .rq-cr-in h4 { color: #9fb0ff; margin: 1.2em 0 .2em; } .rq-cr-in p { margin: .1em; }
@keyframes rq-roll { to { top: -120%; } }

/* 全画面：画面いっぱいに（黒い余白を出さない） */
.gc-cabinet:fullscreen .gc-cabinet-screen > #otm-rq, .gc-cabinet.gc-fs-css .gc-cabinet-screen > #otm-rq { width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; display: flex; flex-direction: column; }
.gc-cabinet:fullscreen .gc-cabinet-screen, .gc-cabinet.gc-fs-css .gc-cabinet-screen { padding: 0 !important; }
.gc-cabinet:fullscreen #otm-rq .rq-host, .gc-cabinet.gc-fs-css #otm-rq .rq-host { flex: 1; min-height: 0; }
.gc-cabinet:fullscreen #otm-rq .rq-stage, .gc-cabinet.gc-fs-css #otm-rq .rq-stage { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.gc-cabinet:fullscreen #otm-rq .rq-pad, .gc-cabinet.gc-fs-css #otm-rq .rq-pad { position: absolute; left: 0; right: 0; bottom: 0; background: transparent; pointer-events: none; }
.gc-cabinet:fullscreen #otm-rq .rq-pad > *, .gc-cabinet.gc-fs-css #otm-rq .rq-pad > * { pointer-events: auto; opacity: .85; }

.inbattle .rq-hud { display: none; }
.rq-bparty { width: 40%; }

/* モンスターの向き調整ツール */
.rq-facing { position: absolute; inset: 0; z-index: 60; background: rgba(8, 10, 30, .97); overflow-y: auto; padding: 1em; pointer-events: auto; }
.rq-fc-head { display: grid; gap: .5em; margin-bottom: .8em; position: sticky; top: -1em; background: rgba(8, 10, 30, .97); padding: .6em 0; z-index: 2; }
.rq-fc-head b { font-size: 1.3em; } .rq-fc-head span { font-size: .9em; opacity: .85; }
.rq-fc-btns { display: flex; flex-wrap: wrap; gap: .5em; }
.rq-fc-btns input, .rq-fc-btns button { font: inherit; padding: .35em .8em; border-radius: 8px; border: 2px solid #aab4ff; background: #1a2050; color: #fff; cursor: pointer; }
.rq-fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.4em, 1fr)); gap: .6em; }
.rq-fc-card { font: inherit; color: #fff; background: #141a46; border: 2px solid #3a4590; border-radius: 10px; padding: .4em; display: grid; justify-items: center; gap: .2em; cursor: pointer; }
.rq-fc-card:hover { border-color: #ffe566; } .rq-fc-card.flip { border-color: #7fe08a; background: #16381f; }
.rq-fc-card .pic { position: relative; width: 6.4em; height: 5.2em; display: flex; align-items: flex-end; justify-content: center; }
.rq-fc-card img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; }
.rq-fc-card .arrow { position: absolute; right: -.2em; top: 0; font-style: normal; color: #ffe566; font-size: .8em; }
.rq-fc-card small { color: #9fffaa; min-height: 1em; }

.rq-fc-tabs { display: flex; gap: .4em; } .rq-fc-tabs button { font: inherit; font-weight: 800; padding: .3em 1em; border-radius: 8px 8px 0 0; border: 2px solid #aab4ff; background: #141a46; color: #fff; cursor: pointer; } .rq-fc-tabs button.on { background: #3a4ab0; }
.rq-fc-card.chr { grid-column: span 2; } .rq-fc-card .pair { display: flex; gap: .8em; }
.rq-fc-card .pair > span { display: grid; justify-items: center; gap: .1em; }
.rq-fc-card .cell { display: block; width: 3.4em; height: 4.4em; background-size: 400% 100%; background-repeat: no-repeat; }

/* メニューボタン（左上のステータスの上） */
.rq-menubtn { pointer-events: auto; font: inherit; font-weight: 800; font-size: 1em; padding: .25em .8em; border-radius: 8px; border: 2px solid #cfd8ff; background: linear-gradient(180deg, #3a4ab0, #232c78); color: #fff; cursor: pointer; margin-bottom: .2em; align-self: flex-start; }
.rq-menubtn:hover { background: #4a5ac8; }
.rq-hud { pointer-events: none; } .rq-hud .rq-menubtn { pointer-events: auto; }
.rq-panel.menu .rq-menu-main .rq-list { max-width: none; }
.rq-panel.menu .rq-opt { padding: .22em .6em .22em 1.3em; }

.rq-bparty .bar { height: .5em; } .rq-bparty .vl { display: flex; justify-content: space-between; gap: .5em; font-weight: 800; line-height: 1.15; margin-bottom: .15em; } .rq-bparty .vl em { font-style: normal; color: #9fd0ff; } .rq-bparty .vl span { text-shadow: 0 0 3px #000; }

/* 戦闘コマンド：項目が7つ（さくせん入り）でも、画面の下まで切れずに入る */
.rq-bcmd { max-height: 62%; }
.rq-bcmd .rq-opt { padding-top: .16em; padding-bottom: .16em; line-height: 1.25; }
.rq-bcmd .rq-opt.sel::before { top: .4em; }

/* スマホをたてにして全画面にしたとき：ボタンを画面の下に置き、文字の表示とかさならないようにする */
@media (orientation: portrait) {
  .gc-cabinet:fullscreen #otm-rq .rq-pad, .gc-cabinet.gc-fs-css #otm-rq .rq-pad { position: relative; flex: none; background: #0a0a14; pointer-events: auto; padding-bottom: env(safe-area-inset-bottom, 8px); }
  .gc-cabinet:fullscreen #otm-rq .rq-pad > *, .gc-cabinet.gc-fs-css #otm-rq .rq-pad > * { opacity: 1; }
}
/* お店：個数入力 */
.rq-qty { display: flex; align-items: baseline; justify-content: space-between; padding: .5em .8em; margin: .4em 0; background: rgba(10,12,40,.55); border-radius: 8px; }
.rq-qty .q { font-size: 1.7em; font-weight: 800; color: #fff; } .rq-qty .tt { color: #ffe27a; font-weight: 800; }
.rq-qrow { display: flex; flex-wrap: wrap; gap: .4em; } .rq-qrow .rq-opt { flex: 1 1 auto; text-align: center; min-width: 3.2em; }
/* 左上のステータス：状態異常の表示 */
.rq-hm .st { font-style: normal; font-size: .78em; font-weight: 800; margin-left: .5em; padding: 0 .4em; border-radius: 4px; }
.rq-hm .st.poi { color: #e9c9ff; background: rgba(140,60,200,.55); } .rq-hm .st.slp { color: #d6e8ff; background: rgba(60,100,190,.55); }
/* つよさの表：サイト共通の表の背景（白）に負けて、数字が見えなくなるのを防ぐ */
.rq-card table, .rq-card table tr, .rq-card table th, .rq-card table td { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.rq-card table td { color: #fff !important; } .rq-card table th { color: #aab !important; }
.rq-card table tr + tr th, .rq-card table tr + tr td { border-top: 1px solid rgba(255,255,255,.08) !important; }
