/* HUD ของเกม "ARMY สนามนัดพบ" */
/* ระหว่างเล่น: ซ่อนเครื่องมือของตัวแก้ฉากทั้งหมด */
body.rms-playing .topbar,
body.rms-playing #tools,
body.rms-playing .cozy-toolbar,
body.rms-playing #inspector,
body.rms-playing #catalog,
body.rms-playing .view-buttons,
body.rms-playing .viewport-footer,
body.rms-playing #walk-preview-panel,
body.rms-playing #spring-placement-hint,
body.rms-playing #toast { display: none !important; }

.rms-concert-toggle.rms-play { background: #ff6fb5; box-shadow: 0 2px 0 #d94f96; }

.rmsg {
  position: absolute; inset: 0; pointer-events: none; z-index: 30; color: #3a2f6b;
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif; font-size: 15px; user-select: none;
}
.rmsg[hidden] { display: none; }
.rmsg button { font: inherit; color: inherit; cursor: pointer; border: 0; }
.rmsg > * { pointer-events: auto; }

.rmsg-quest {
  position: absolute; left: 14px; top: 14px; max-width: min(340px, 46vw); padding: 10px 14px; border-radius: 18px;
  background: #fffffff0; box-shadow: 0 4px 0 #cfc4f5, 0 8px 22px #2a1f5a33; display: grid; gap: 2px; pointer-events: none;
}
.rmsg-quest small { color: #8a6cf0; font-weight: 700; }
.rmsg-quest b { font-size: 17px; }
.rmsg-quest span { color: #655c86; line-height: 1.35; }

.rmsg-side { position: absolute; right: 14px; top: 14px; display: grid; justify-items: end; gap: 8px; }
.rmsg-mini { width: 150px; height: 150px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 4px 0 #cfc4f5, 0 8px 22px #2a1f5a44; background: #b5b7b3; }
.rmsg-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rmsg-chip { padding: 6px 12px; border-radius: 999px; background: #fffffff0; font-weight: 700; box-shadow: 0 3px 0 #cfc4f5; }
.rmsg-chip.rmsg-exit { background: #3a2f6b; color: #fff; box-shadow: 0 3px 0 #231a4a; }

.rmsg-actions { position: absolute; right: 14px; bottom: 16px; display: flex; gap: 8px; }
.rmsg-actions button {
  width: 58px; height: 58px; border-radius: 20px; background: #fffffff2; font-size: 24px; line-height: 1;
  display: grid; place-items: center; align-content: center; gap: 2px; box-shadow: 0 4px 0 #cfc4f5, 0 8px 18px #2a1f5a33;
}
.rmsg-actions small { font-size: 11px; font-weight: 700; color: #6a4fd0; }
.rmsg-actions button:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfc4f5; }

.rmsg-prompt {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); padding: 12px 22px; border-radius: 999px;
  background: #8a6cf0; color: #fff !important; font-weight: 700; font-size: 16px; box-shadow: 0 4px 0 #6a4fd0, 0 10px 24px #2a1f5a55;
  max-width: 86vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rmsg-prompt[hidden] { display: none; }

.rmsg-bar {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  justify-content: center; padding: 10px 14px; border-radius: 22px; background: #fffffff2; box-shadow: 0 4px 0 #cfc4f5, 0 10px 24px #2a1f5a44;
  max-width: calc(100vw - 28px);
}
.rmsg-bar[hidden] { display: none; }
.rmsg-bar button { padding: 9px 14px; border-radius: 14px; background: #efeaff; font-weight: 700; }
.rmsg-barinfo { font-weight: 700; color: #6a4fd0; padding: 0 6px; }
.rmsg .rmsg-primary { background: #8a6cf0; color: #fff; box-shadow: 0 3px 0 #6a4fd0; }
.rmsg .rmsg-secondary { background: #ffe1f3; color: #b0307c; box-shadow: 0 3px 0 #f3b6da; }

.rmsg-toasts { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; pointer-events: none; width: min(560px, 60vw); }
.rmsg-toast { padding: 8px 16px; border-radius: 999px; background: #3a2f6bee; color: #fff; font-weight: 600; text-align: center; animation: rmsg-pop .25s ease-out; }
@keyframes rmsg-pop { from { transform: translateY(-10px); opacity: 0; } }

.rmsg-joy {
  position: absolute; left: 22px; bottom: 26px; width: 118px; height: 118px; border-radius: 50%; background: #ffffff66;
  border: 3px solid #ffffffcc; display: none; place-items: center; touch-action: none;
}
.rmsg-joy i { width: 50px; height: 50px; border-radius: 50%; background: #8a6cf0; box-shadow: 0 3px 0 #6a4fd0; }
@media (pointer: coarse) { .rmsg-joy { display: grid; } }

.rmsg-dialog {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(620px, calc(100vw - 28px)); padding: 16px 18px;
  border-radius: 22px; background: #fffffffa; box-shadow: 0 5px 0 #cfc4f5, 0 14px 30px #2a1f5a55; display: grid; gap: 6px; z-index: 3;
}
.rmsg-dialog[hidden] { display: none; }
.rmsg-dialog strong { color: #8a6cf0; }
.rmsg-dialog p { margin: 0; font-size: 17px; line-height: 1.5; }
.rmsg-dialog button { justify-self: end; padding: 8px 16px; border-radius: 12px; background: #8a6cf0; color: #fff; font-weight: 700; }

.rmsg-modal { position: absolute; inset: 0; background: #1c163466; display: grid; place-items: center; padding: 14px; z-index: 4; }
.rmsg-modal[hidden] { display: none; }
.rmsg-card { width: min(980px, 100%); max-height: 100%; background: #fff; border-radius: 26px; display: grid; grid-template-rows: auto 1fr; overflow: hidden; box-shadow: 0 16px 40px #1c163466; }
.rmsg-card header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: #f3eeff; }
.rmsg-card h2 { margin: 0; font-size: 19px; }
.rmsg-card header button { width: 36px; height: 36px; border-radius: 12px; background: #fff; font-weight: 700; }
.rmsg-body { padding: 16px 18px; overflow: auto; }
.rmsg-body h3 { margin: 14px 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.rmsg-body h3 i, .rmsg-price i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.rmsg-note { color: #655c86; line-height: 1.5; margin: 0 0 10px; }
.rmsg-link { color: #8a6cf0; font-weight: 700; background: none; text-decoration: underline; padding: 0; }

.rmsg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.rmsg-item { background: #f6f3ff; border-radius: 18px; padding: 8px; display: grid; justify-items: center; gap: 4px; box-shadow: 0 3px 0 #ddd3fb; }
.rmsg-item img { width: 86px; height: 86px; object-fit: contain; background: #5f6880; border-radius: 14px; }
.rmsg-item span { font-weight: 600; font-size: 13px; text-align: center; }
.rmsg-item b { color: #8a6cf0; }
.rmsg-item:disabled { opacity: .42; cursor: default; }

.rmsg-quests { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 6px; }
.rmsg-quests li { padding: 8px 12px; border-radius: 14px; background: #f6f3ff; color: #8d86a8; }
.rmsg-quests li.now { background: #efe6ff; color: #3a2f6b; outline: 2px solid #b48cff; }
.rmsg-quests li.done { color: #4f9a6a; }
.rmsg-quests span { color: #655c86; }
.rmsg-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rmsg-badge { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: #fff6d8; font-size: 22px; }
.rmsg-badge small { font-size: 12px; font-weight: 600; color: #6b5a22; }
.rmsg-badge.off { filter: grayscale(1); opacity: .45; }
.rmsg-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rmsg-album img, .rmsg-shot { width: 100%; border-radius: 12px; box-shadow: 0 4px 14px #2a1f5a33; }
.rmsg-manage { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rmsg-manage button { padding: 14px 18px; border-radius: 16px; background: #efeaff; font-weight: 700; }
.rmsg-result { text-align: center; }
.rmsg-result b { font-size: 84px; color: #8a6cf0; line-height: 1; }
.rmsg-result p { font-size: 17px; line-height: 1.6; }

.rmsg-mapwrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(210px, 1fr); gap: 14px; align-items: start; }
.rmsg-map { width: 100%; height: auto; border-radius: 18px; cursor: pointer; }
.rmsg-seatpanel { display: grid; gap: 10px; }
.rmsg-seatpanel label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.rmsg-step { display: inline-flex; align-items: center; gap: 6px; }
.rmsg-step button { width: 34px; height: 34px; border-radius: 10px; background: #efeaff; font-weight: 700; font-size: 18px; }
.rmsg-step b { min-width: 34px; text-align: center; }
.rmsg-seatpanel > button { padding: 12px; border-radius: 14px; font-weight: 700; }
.rmsg-price { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
@media (max-width: 700px) { .rmsg-mapwrap { grid-template-columns: 1fr; } .rmsg-actions button { width: 52px; height: 52px; } }

.rmsg-rhythm { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(460px, calc(100vw - 28px)); height: auto; touch-action: none; z-index: 2; }
.rmsg-rhythm[hidden] { display: none; }

.rmsg-fade { position: absolute; inset: 0; background: #1c1634; opacity: 0; pointer-events: none !important; transition: opacity .24s; z-index: 6; }
.rmsg-fade.on { opacity: 1; }
.rmsg-flash::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: .85; pointer-events: none; z-index: 7; }

/* นั่งอยู่ / ถ่ายรูป: ซ่อนส่วนที่ไม่ใช้ */
.rmsg-seated .rmsg-actions, .rmsg-seated .rmsg-quest, .rmsg-seated .rmsg-mini, .rmsg-seated .rmsg-joy { display: none; }
.rmsg-photo .rmsg-actions, .rmsg-photo .rmsg-quest, .rmsg-photo .rmsg-side, .rmsg-photo .rmsg-joy, .rmsg-photo .rmsg-prompt { display: none; }

.rmsg-chip.off { opacity: .5; }
/* มีแถบคำสั่งด้านล่าง (วางของ/ถ่ายรูป) ให้ปุ่มหลักขยับขึ้น ไม่ทับกัน */
.rmsg:has(.rmsg-bar:not([hidden])) .rmsg-actions { bottom: 96px; }
.rmsg:has(.rmsg-bar:not([hidden])) .rmsg-prompt { bottom: 176px; }

/* หน้าเลือกตัวละคร */
.rmsg-chooser {
  position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 14px; background: #1c163499;
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif; color: #3a2f6b;
}
.rmsg-chooser[hidden] { display: none; }
.rmsg-chooser .rmsg-card { width: min(560px, 100%); }
.rmsg-chooser button { font: inherit; color: inherit; cursor: pointer; border: 0; }
.rmsg-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.rmsg-pick button { display: grid; justify-items: center; gap: 4px; padding: 12px; border-radius: 22px; background: #f3eeff; box-shadow: 0 4px 0 #ddd3fb; }
.rmsg-pick button.on, .rmsg-pick button:hover { outline: 3px solid #8a6cf0; }
.rmsg-pick img { width: 100%; max-width: 190px; aspect-ratio: 3 / 4; object-fit: contain; background: linear-gradient(#cfe6ff, #f6e9ff); border-radius: 16px; }
.rmsg-pick b { font-size: 18px; }
.rmsg-pick small { color: #655c86; }

/* แผงท่าทาง */
.rmsg-emotes { position: absolute; right: 14px; bottom: 84px; display: grid; gap: 6px; padding: 8px; border-radius: 20px; background: #fffffff2; box-shadow: 0 4px 0 #cfc4f5, 0 8px 18px #2a1f5a33; }
.rmsg-emotes[hidden] { display: none; }
.rmsg-emotes button { width: 54px; height: 54px; border-radius: 16px; background: #f3eeff; font-size: 22px; line-height: 1; display: grid; place-items: center; align-content: center; gap: 2px; }
.rmsg-emotes small { font-size: 10px; font-weight: 700; color: #6a4fd0; }
.rmsg:has(.rmsg-bar:not([hidden])) .rmsg-emotes { bottom: 164px; }
.rmsg-photo .rmsg-emotes { display: none; }
.rmsg-actions button { width: 54px; height: 54px; }

/* ตู้เสื้อผ้า */
.rmsg-wardrobe { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rmsg-wardrobe button { font: inherit; color: inherit; cursor: pointer; border: 0; text-align: center; }
.rmsg-wardrobe small { font-size: 12px; line-height: 1.35; }

/* แผงท่าทาง: แถวบน = ท่าทาง, แถวล่าง = สีหน้า */
.rmsg-emotes > div { display: flex; gap: 6px; justify-content: flex-end; }
.rmsg-emotes button.on { outline: 3px solid #8a6cf0; background: #e4daff; }

/* หน้าแต่งตัว: แผงด้านขวา ตัวละครอยู่กลางจอให้หมุนดูได้ */
.rmsg-dress { position: absolute; top: 14px; right: 14px; bottom: 14px; width: min(340px, 92vw); display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: 14px;
  border-radius: 24px; background: #fffffff5; box-shadow: 0 6px 0 #cfc4f5, 0 12px 28px #2a1f5a44; color: #2a1f5a; pointer-events: auto; overflow: hidden; }
.rmsg-dress[hidden] { display: none; }
.rmsg-dress button { font: inherit; color: inherit; cursor: pointer; border: 0; }
.rmsg-dress header { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
.rmsg-dress header button { padding: 8px 18px; border-radius: 14px; background: #8a6cf0; color: #fff; font-weight: 700; box-shadow: 0 3px 0 #6a4fd0; }
.rmsg-dress nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.rmsg-dress nav button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; background: #f3eeff; font-size: 20px; }
.rmsg-dress nav small { font-size: 11px; font-weight: 700; }
.rmsg-dress nav button.on { background: #8a6cf0; color: #fff; }
.rmsg-dress-items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; overflow-y: auto; padding: 2px; }
.rmsg-dress-items button { padding: 10px 8px; border-radius: 12px; background: #f3eeff; font-size: 13px; font-weight: 600; line-height: 1.25; text-align: center; }
.rmsg-dress-items button.on { outline: 3px solid #8a6cf0; background: #e4daff; }
.rmsg-dress-colors { display: grid; gap: 8px; padding-top: 8px; border-top: 2px solid #ece5ff; }
.rmsg-dress-color label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.rmsg-dress-color input[type=color] { width: 52px; height: 30px; padding: 0; border: 2px solid #cfc4f5; border-radius: 9px; background: #fff; cursor: pointer; }
.rmsg-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.rmsg-swatches button { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #00000026; }
.rmsg-swatches button:hover { transform: scale(1.15); }
.rmsg-dress .rmsg-note { margin: 0; font-size: 12px; }
.rmsg-dressing .rmsg-actions, .rmsg-dressing .rmsg-quest, .rmsg-dressing .rmsg-mini, .rmsg-dressing .rmsg-joy, .rmsg-dressing .rmsg-emotes, .rmsg-dressing .rmsg-prompt { display: none; }
@media (max-width: 640px) { .rmsg-dress { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 56vh; } }

/* แท็บชุดสำเร็จ: รูปย่อของชุดบนตัวละครที่เล่นอยู่ */
.rmsg-dress-sets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; overflow-y: auto; padding: 2px; }
.rmsg-dress-sets button { display: grid; gap: 2px; padding: 4px 4px 6px; border-radius: 12px; background: #f3eeff; }
.rmsg-dress-sets img { width: 100%; aspect-ratio: 204 / 352; object-fit: contain; border-radius: 9px; background: linear-gradient(#e3efff, #f6e9ff); }
.rmsg-dress-sets small { font-size: 10.5px; font-weight: 700; line-height: 1.2; }
.rmsg-dress-sets button.on { outline: 3px solid #8a6cf0; background: #e4daff; }

/* รายการชิ้นที่มีรูปย่อ (ทรงผม): ตาราง 3 ช่อง รูปหัวตัวละคร + ชื่อ */
.rmsg-dress-thumbs { grid-template-columns: repeat(3, 1fr); }
.rmsg-dress-thumbs button { display: grid; gap: 2px; padding: 4px 4px 6px; font-size: 10.5px; font-weight: 700; line-height: 1.2; }
.rmsg-dress-thumbs img, .rmsg-dress-thumbs i { width: 100%; aspect-ratio: 168 / 184; object-fit: contain; border-radius: 9px; background: linear-gradient(#e3efff, #f6e9ff); }
.rmsg-dress-thumbs i { display: grid; place-items: center; font-style: normal; font-size: 30px; }

/* ผังที่นั่ง: ขั้นเลือกที่นั่งในโซน */
.rmsg-seatpanel .rmsg-back { justify-self: start; padding: 8px 14px; border-radius: 12px; background: #efeaff; font-weight: 700; }
.rmsg-seatpick { padding: 10px 12px; border-radius: 12px; background: #f6f2ff; font-size: 14px; }
.rmsg-seatpanel > button[disabled] { opacity: .45; cursor: not-allowed; }

/* หน้าแต่งตัวแบบกระชับ (มีรูปทุกชิ้น): แถบของที่ใส่อยู่ + ตารางรูป + แถบสี */
.rmsg-dress { grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 8px; padding: 12px; width: min(330px, 92vw); }
.rmsg-dress header { font-size: 16px; }
.rmsg-dress header button { padding: 6px 16px; }
.rmsg-thumb { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: linear-gradient(#eef3ff, #f6edff); }
.rmsg-thumb--icon, .rmsg-thumb--none { display: grid; place-items: center; font-style: normal; font-size: 24px; }
.rmsg-dress-worn { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.rmsg-dress-worn button { display: grid; gap: 2px; padding: 4px 4px 5px; border-radius: 12px; background: #f3eeff; }
.rmsg-dress-worn small { font-size: 10.5px; font-weight: 700; text-align: center; }
.rmsg-dress-worn button.on { background: #8a6cf0; color: #fff; }
.rmsg-dress-worn button.on .rmsg-thumb { background: #fff; }
.rmsg-dress-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; overflow-y: auto; padding: 3px; min-height: 0; }
.rmsg-dress-grid button { display: grid; gap: 3px; padding: 4px 4px 6px; border-radius: 12px; background: #f6f2ff; }
.rmsg-dress-grid small { font-size: 10.5px; font-weight: 700; line-height: 1.2; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rmsg-dress-grid button.on { outline: 3px solid #8a6cf0; background: #e4daff; }
.rmsg-dress-grid--sets .rmsg-thumb { aspect-ratio: 204 / 300; }
.rmsg-dress-colors { gap: 6px; padding-top: 6px; }
.rmsg-dress-color { display: grid; grid-template-columns: 44px 36px 1fr; align-items: center; gap: 6px; }
.rmsg-dress-color > span { font-size: 12px; font-weight: 700; }
.rmsg-dress-color input[type=color] { width: 36px; height: 26px; border-radius: 8px; }
.rmsg-dress-color .rmsg-swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.rmsg-dress-color .rmsg-swatches button { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
@media (max-width: 640px) { .rmsg-dress { max-height: 62vh; } .rmsg-dress-grid { grid-template-columns: repeat(4, 1fr); } }
/* แผงแต่งตัวสูงเท่าที่มีของ (ไม่ยืดเต็มจอจนเหลือที่ว่าง) */
.rmsg-dress { bottom: auto; max-height: calc(100% - 28px); grid-template-rows: auto auto minmax(0, auto) auto; }
@media (max-width: 640px) { .rmsg-dress { top: auto; bottom: 8px; max-height: 62vh; } }

/* มือถือ (จอสัมผัส): สะอาดที่สุด — ไม่มีแผนที่เล็ก, ปุ่มทั้งหมดซ่อนหลังปุ่ม ☰ มุมขวาบน กดแล้วกางเป็นแผงเล็ก */
.rmsg-fab { display: none; }
@media (pointer: coarse) {
  .rmsg-fab { display: grid; place-items: center; position: absolute; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); width: 46px; height: 46px;
    border: 0; border-radius: 50%; background: #ffffffee; color: #4b3a8f; font: 700 22px/1 sans-serif; box-shadow: 0 3px 0 #cfc4f5, 0 6px 16px #2a1f5a33; z-index: 6; }
  .rmsg .rmsg-mini { display: none !important; }
  .rmsg-side { top: calc(66px + env(safe-area-inset-top, 0px)); right: 12px; }
  .rmsg:not(.rmsg-menu-open) .rmsg-chips, .rmsg:not(.rmsg-menu-open) .rmsg-actions { display: none !important; }
  .rmsg-menu-open .rmsg-chips { max-width: 230px; padding: 8px; border-radius: 18px; background: #ffffffe6; box-shadow: 0 4px 16px #2a1f5a33; }
  .rmsg-menu-open .rmsg-actions { top: auto; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: 12px; display: grid; grid-template-columns: repeat(3, 54px); gap: 8px; /* 3 คอลัมน์: ไม่ทับจอยสติ๊กมุมซ้ายล่าง */
    padding: 10px; border-radius: 20px; background: #ffffffe6; box-shadow: 0 4px 16px #2a1f5a33; }
  .rmsg-photo .rmsg-fab, .rmsg-dressing .rmsg-fab { display: none; } /* ตอนนั่งยังมีปุ่ม ☰ (เวลา จอ เสียง ไฟ พลุ ออก) */
}

/* ผังที่นั่ง: กรอบภาพ + ปุ่มซูม (ถ่างนิ้ว/ลากได้ด้วย) */
.rmsg-mapbox { position: relative; }
.rmsg-mapbox .rmsg-map { display: block; touch-action: none; }
.rmsg-zoom { position: absolute; right: 10px; top: 62px; display: grid; gap: 6px; }
.rmsg-zoom[hidden] { display: none; }
.rmsg-zoom button { width: 36px; height: 36px; border: 0; border-radius: 12px; background: #ffffffe6; color: #4b3a8f; font: 700 18px/1 sans-serif; box-shadow: 0 2px 0 #cfc4f5; cursor: pointer; }

/* มือถือ: แถบคำสั่งตอนนั่งเป็นปุ่มไอคอนกลมแถวเดียวชิดล่าง ไม่บังวิว (ชื่อปุ่มซ่อน — แตะค้างดูชื่อได้จาก title) */
@media (pointer: coarse) {
  .rmsg-bar { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); flex-wrap: nowrap; gap: 6px; padding: 6px 8px; border-radius: 999px; background: #ffffffd9; box-shadow: 0 3px 12px #2a1f5a33; }
  .rmsg-bar .rmsg-barinfo, .rmsg-bar button span { display: none; }
  .rmsg-bar button { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 20px; display: grid; place-items: center; }
  .rmsg-bar button[data-seat="color"] { box-shadow: inset 0 0 0 3px var(--stick, transparent); }
}

@media (pointer: coarse) { .rmsg-modal-open .rmsg-fab, .rmsg-modal-open .rmsg-chips, .rmsg-modal-open .rmsg-actions { display: none !important; } }

@media (pointer: coarse) { .rmsg-seated .rmsg-actions { display: none !important; } } /* ตอนนั่ง: เมนู ☰ มีแค่ตั้งค่า (คำสั่งตอนนั่งอยู่ในแถบล่างแล้ว) */

/* มือถือ: ปุ่ม "ที่นั่ง" ค้างไว้มุมขวาล่างเสมอ (ไม่ต้องเปิดเมนู ☰) — ซ่อนตอนนั่ง เปิดเมนู ถ่ายรูป แต่งตัว หรือมีหน้าต่างเปิด */
.rmsg-seatfab { display: none; }
@media (pointer: coarse) {
  .rmsg-seatfab { display: grid; place-items: center; align-content: center; gap: 2px; position: absolute; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    width: 60px; height: 60px; border: 0; border-radius: 18px; background: #ffffffee; font-size: 26px; line-height: 1; box-shadow: 0 3px 0 #cfc4f5, 0 6px 16px #2a1f5a33; z-index: 5; }
  .rmsg-seatfab small { font-size: 11px; font-weight: 700; color: #6a4fd0; }
  .rmsg-seated .rmsg-seatfab, .rmsg-menu-open .rmsg-seatfab, .rmsg-photo .rmsg-seatfab, .rmsg-dressing .rmsg-seatfab, .rmsg-modal-open .rmsg-seatfab { display: none; }
  /* แถบตอนนั่งมี 8 ปุ่ม: ย่อให้พอดีจอกว้าง 360 px */
  .rmsg-bar { gap: 4px; padding: 5px 6px; }
  .rmsg-bar button { width: 39px; height: 39px; font-size: 18px; }
  .rmsg-bar button.on { box-shadow: inset 0 0 0 3px #8a6cf0; }
  .rmsg:has(.rmsg-bar:not([hidden])) .rmsg-emotes { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); right: 50%; transform: translateX(50%); }
}
.rmsg-bar button.on { outline: 3px solid #8a6cf0; }

/* มุมสนาม 1-5 ในโหมดเล่น (แบบเดียวกับปุ่มมุมมองในหน้าแอดมิน) */
.rmsg-views { position: absolute; right: 14px; bottom: 84px; display: flex; align-items: center; gap: 5px; padding: 6px 8px 6px 12px; border-radius: 999px; background: #fffffff2; box-shadow: 0 4px 0 #cfc4f5, 0 8px 18px #2a1f5a33; z-index: 4; }
.rmsg-views[hidden] { display: none; }
.rmsg-views > span { font: 700 13px/1 sans-serif; color: #5b47b8; margin-right: 2px; white-space: nowrap; }
.rmsg-views button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f3eeff; color: #5b47b8; font: 700 14px/1 sans-serif; cursor: pointer; box-shadow: 0 2px 0 #d3c8f7; }
.rmsg-views button.on { background: #8a6cf0; color: #fff; box-shadow: 0 2px 0 #6a4fd0; }
.rmsg-seated .rmsg-views, .rmsg-photo .rmsg-views, .rmsg-dressing .rmsg-views { display: none; }

/* จำนวนคนในสนาม (ผู้เล่นหลายคน) */
.rmsg-online { position: absolute; left: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); padding: 6px 12px; border-radius: 999px; background: #2a1f5acc; color: #fff; font: 700 13px/1 sans-serif; pointer-events: none; z-index: 3; }
.rmsg-online[hidden] { display: none; }
