:root {
  --ink: #453229;
  --muted: #81695c;
  --paper: rgba(255, 248, 237, 0.92);
  --pink: #ef8e9d;
  --shadow: 0 14px 36px rgba(31, 26, 28, 0.2);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: #9fd6ef;
}
button, input { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; background: #fff; }
.hidden { display: none !important; }

#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  z-index: 1;
}
#view canvas {
  width: 100% !important;
  height: 100% !important;
}
#minimap {
  position: fixed;
  right: calc(12px + var(--safe-r));
  top: calc(12px + var(--safe-t));
  z-index: 4;
  width: 92px;
  height: 92px;
  border: 3px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  pointer-events: none;
}
/* Dim the 3D world while start menu is open so it cannot cover controls */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(28, 36, 52, 0.35) 0%,
    rgba(28, 36, 52, 0.55) 45%,
    rgba(28, 36, 52, 0.72) 100%
  );
}
.menu-backdrop.hidden { display: none !important; }
body.is-playing .menu-backdrop { display: none !important; }
body:not(.is-playing) #minimap { display: none !important; }
body:not(.is-playing) #hud { display: none !important; }
.split-line {
  position: fixed; left: 50%; top: 0; bottom: 0; width: 2px;
  background: rgba(255,255,255,.65); z-index: 3; pointer-events: none;
}
.crosshair {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  color: rgba(255,255,255,.92); z-index: 3; font-size: 26px;
  text-shadow: 0 0 6px #000, 0 1px 4px #000;
  pointer-events: none;
}
.hit-mark {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px;
  margin: -9px 0 0 -9px; border: 2px solid #ff8fab; border-radius: 50%;
  box-shadow: 0 0 8px #ff8fab;
}
.hit-mark.flash { animation: hitpop .12s ease-out; }
@keyframes hitpop {
  from { transform: scale(.6); opacity: 1; }
  to { transform: scale(1.4); opacity: 0; }
}
.hud.in-vehicle .crosshair { opacity: 0.2; }

.panel {
  position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%);
  z-index: 40; width: min(720px, calc(100% - 24px)); padding: 18px 22px;
  border-radius: 24px; background: var(--paper); backdrop-filter: blur(12px);
  box-shadow: var(--shadow); text-align: center;
  max-height: calc(100% - 24px); overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#menu.panel {
  z-index: 40;
  background: rgba(255, 248, 237, 0.96);
}
.eyebrow { color: var(--muted); letter-spacing: .24em; font-size: 12px; }
h1 { margin: 2px 0 4px; font-size: clamp(26px, 5vw, 40px); letter-spacing: 0.06em; }
.menu-tag { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.menu > p { color: var(--muted); }
.model-status { color: #f3d7a4 !important; font-weight: 600; }
.menu small { display: block; color: var(--muted); margin-top: 12px; }
.setup-row { margin: 8px 0 10px; }
.setup-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.setup-field span { font-size: 12px; color: var(--muted); }
.setup-field input {
  height: 42px; border-radius: 12px; border: 1px solid #ead4c2;
  padding: 0 14px; font: inherit; background: #fffaf6;
}
.char-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
@media (min-width: 520px) {
  .char-pick { grid-template-columns: repeat(4, 1fr); }
}
.mate-chip { cursor: pointer; pointer-events: auto; }
.mate-chip .mate-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 3px;
}
.mate-chip .mate-actions button {
  border: 0;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  background: rgba(255,255,255,.22);
  color: #fff;
  cursor: pointer;
}
.char-card {
  padding: 12px 10px; border-radius: 14px; border: 2px solid transparent;
  background: #fffaf6; box-shadow: 0 6px 15px rgba(70,40,28,.08);
  text-align: center; cursor: pointer; font: inherit;
}
.char-card b { display: block; font-size: 16px; }
.char-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.char-card.selected { border-color: var(--pink); background: #fff0f3; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px; }
.mode {
  padding: 14px; border-radius: 15px; text-align: center;
  box-shadow: 0 6px 15px rgba(70,40,28,.09);
}
.mode.primary-mode { background: var(--pink); color: #fff; }
.mode.primary-mode b { color: #fff; }
.mode:hover, .mode:active { outline: 2px solid var(--pink); }
.mode b, .mode span { display: block; }
.mode span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.menu-help { margin-top: 6px; color: var(--muted); font-size: 12px; text-align: left; }
.menu-help summary { cursor: pointer; text-align: center; }
.online-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.online-box button, .online-box input {
  height: 40px; padding: 0 14px; border: 1px solid #ead4c2; border-radius: 11px;
}
.online-box input { flex: 1; min-width: 130px; }
.online-box .primary { background: var(--pink); color: #fff; }
.invite-row {
  flex-basis: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
}
.invite-row.hidden { display: none !important; }
.invite-row input {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #5a3a48;
}
#btn-copy-invite { background: #5a8fd4; color: #fff; white-space: nowrap; border-color: #4a7fc4; }
.invite-hud { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.invite-hud.hidden { display: none !important; }
.mini-invite {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #5a8fd4;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
#net-status { flex-basis: 100%; color: #b65766; }
details { margin-top: 9px; color: var(--muted); font-size: 12px; }
details summary { cursor: pointer; font-size: 13px; }
details p, details label { margin: 5px 8px; display: inline-block; }

.hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.hud-top {
  display: flex; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) calc(112px + var(--safe-r)) 0 calc(12px + var(--safe-l));
  pointer-events: none;
  position: relative;
  z-index: 2;
}
.hud-top.collapsed .hud-details,
.hud-top.collapsed .inventory-card { display: none !important; }
.hud-chrome {
  position: absolute;
  top: calc(8px + var(--safe-t));
  right: calc(10px + var(--safe-r));
  z-index: 6;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.hud-icon-btn {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  pointer-events: auto;
}
/* 全屏按钮始终可见，不被其它 HUD 挡住 */
.fs-fab {
  position: absolute;
  left: calc(10px + var(--safe-l));
  top: calc(8px + var(--safe-t));
  z-index: 12;
  min-width: 64px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(40, 48, 73, 0.88);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
body.is-fullscreen .fs-fab,
body.is-playing .fs-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.is-mobile .fs-fab {
  min-width: 72px;
  height: 44px;
  font-size: 15px;
}
.menu-fs-btn {
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid #c9d4e8;
  border-radius: 12px;
  background: #f3f6fb;
  color: #283049;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.menu-fs-btn:active {
  background: #e5ecf7;
}
.hud.in-vehicle #btn-shoot { opacity: .35; pointer-events: none; }
.status-card, .inventory-card {
  min-width: 160px; padding: 8px 12px; border-radius: 15px;
  background: rgba(255,255,255,.84); backdrop-filter: blur(8px);
  box-shadow: var(--shadow); font-size: 12px;
  pointer-events: auto;
}
.hud-compact {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.hud-compact .health { width: 72px; margin: 0; }
.hud-hp-num { font-size: 12px; }
.hud-details { margin-top: 6px; }
.invite-hint {
  flex-basis: 100%;
  margin: 0;
  color: #b65766;
  font-size: 12px;
  text-align: left;
}
.invite-hint.hidden { display: none !important; }
.mate-radar {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.mate-radar.hidden { display: none !important; }
.mate-chip {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 14px;
  background: rgba(40, 48, 73, 0.78);
  color: #fff;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  pointer-events: auto;
  cursor: pointer;
}
.mate-chip .mate-arrow {
  display: block;
  font-size: 14px;
  line-height: 1;
  margin-bottom: 2px;
  transform-origin: 50% 60%;
}
body.is-fullscreen,
html.is-fullscreen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}
body.is-fullscreen {
  position: fixed;
  inset: 0;
}
body.is-fullscreen #view {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}
body.is-fullscreen #rotate-hint { display: none !important; }
.hud-top.collapsed .status-card {
  padding: 6px 10px;
  min-width: 0;
}
.inventory-card { display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: 220px; }
.health { height: 8px; margin: 6px 0; overflow: hidden; border-radius: 99px; background: #ead5cf; }
.health i { display: block; width: 100%; height: 100%; background: #75c87b; transition: width .2s; }
.nav-guide {
  position: absolute; left: 50%; top: calc(12px + var(--safe-t)); transform: translateX(-50%);
  z-index: 7; min-width: 330px; padding: 8px 10px; border-radius: 16px;
  background: rgba(23,31,39,.88); color: #fff; box-shadow: var(--shadow);
  pointer-events: auto; backdrop-filter: blur(8px);
}
.nav-readout { display: flex; align-items: center; justify-content: center; gap: 9px; }
.nav-readout small { display: block; margin-top: 1px; color: #bfe8ff; font-size: 11px; text-align: center; }
.nav-arrow {
  display: inline-block; color: #61d4ff; font-size: 25px; line-height: 1;
  transform-origin: 50% 50%; filter: drop-shadow(0 0 5px rgba(97,212,255,.85));
}
.nav-actions { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.nav-actions button { padding: 5px 8px; border-radius: 8px; font-size: 11px; }
.nav-actions button:last-child { background: #ef6c61; color: #fff; }
.prompt {
  position: absolute; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%);
  background: rgba(255,255,255,.86); padding: 6px 12px; border-radius: 999px;
  color: var(--muted); white-space: nowrap; font-size: 12px; max-width: min(42%, 280px);
  overflow: hidden; text-overflow: ellipsis; z-index: 2; pointer-events: none;
}
.family-toggle {
  position: absolute; right: calc(12px + var(--safe-r)); top: calc(112px + var(--safe-t));
  padding: 8px 12px; border-radius: 12px; box-shadow: var(--shadow); pointer-events: auto;
  font-size: 13px; opacity: 0.85; z-index: 5;
}
.intimacy-toggle {
  top: calc(156px + var(--safe-t));
  background: #f2a3ab;
  color: #fff;
  opacity: 1;
}
.split-hud { position: absolute; bottom: 58px; left: 0; right: 0; display: flex; }
.split-hud span {
  width: 50%; text-align: center; color: #fff; font-size: 13px;
  text-shadow: 0 2px 5px #000; font-weight: 700;
}

.look-pad {
  position: absolute; inset: 0;
  pointer-events: auto;
  touch-action: none;
  z-index: 1;
}
.stick {
  position: absolute;
  left: calc(22px + var(--safe-l));
  bottom: calc(22px + var(--safe-b));
  width: 118px; height: 118px; border-radius: 50%;
  background: rgba(255,255,255,.22);
  border: 2px solid rgba(255,255,255,.45);
  pointer-events: auto; touch-action: none; z-index: 4;
}
.stick-knob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px;
  margin: -27px 0 0 -27px; border-radius: 50%;
  background: rgba(255,255,255,.78);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  pointer-events: none;
}
.action-cluster {
  position: absolute;
  right: calc(10px + var(--safe-r));
  bottom: calc(12px + var(--safe-b));
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  z-index: 4;
}
.action-extra {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.more-actions {
  display: none;
  background: rgba(90, 143, 212, 0.92) !important;
  color: #fff !important;
}
body.is-mobile .more-actions {
  display: flex;
}
body.is-mobile .action-extra {
  display: none;
}
body.is-mobile .action-cluster.expanded .action-extra {
  display: flex;
}
body.is-mobile .hud.in-vehicle .stick {
  width: 132px;
  height: 132px;
  left: calc(14px + var(--safe-l));
  bottom: calc(18px + var(--safe-b));
}
body.is-mobile .hud.in-vehicle .stick-knob {
  width: 58px;
  height: 58px;
}
/* 飞行：升/降横排放在「更多」上方，不挡住功能键 */
.fly-row {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.hud.in-plane .fly-row {
  display: flex;
}
.fly-row .fly-btn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  background: rgba(70, 130, 210, 0.95) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}
body.is-mobile .hud.in-plane .more-actions {
  display: flex;
}
body.is-mobile .hud.in-plane .action-extra {
  display: none;
}
body.is-mobile .hud.in-plane .action-cluster.expanded .action-extra {
  display: flex;
}
.pad-btn.bail-btn {
  position: absolute;
  right: 88px;
  bottom: 86px;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255, 152, 72, 0.96) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  z-index: 6;
}
body.is-mobile .hud.in-vehicle .pad-btn.bail-btn:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
}
body.is-mobile .hud.in-vehicle .pad-btn.shoot {
  display: none;
}
/* 驾驶时隐藏战斗技能，把最重要的下车/跳跃做成大按钮。 */
body.is-mobile .hud.in-vehicle .pad-btn.skill {
  display: none;
}
body.is-mobile .hud.in-vehicle .combat-pad {
  width: 178px;
  height: 92px;
}
body.is-mobile .hud.in-vehicle #btn-interact {
  right: 0;
  bottom: 0;
  width: 78px;
  height: 78px;
  border-radius: 20px;
  background: rgba(239, 108, 97, 0.96);
  color: #fff;
  font-size: 16px;
  z-index: 7;
}
body.is-mobile .hud.in-vehicle #btn-jump {
  right: 88px;
  bottom: 8px;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  z-index: 6;
}
.action-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
}
.combat-pad {
  position: relative;
  width: 236px;
  height: 212px;
  pointer-events: none;
  margin-top: 2px;
}
.pad-btn {
  position: static;
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,.84);
  box-shadow: var(--shadow);
  pointer-events: auto; touch-action: none;
  font-size: 11px; font-weight: 700;
  line-height: 1.1;
  padding: 2px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  flex-shrink: 0;
  color: #3a2f2c;
}
.pad-btn.active { background: var(--pink); color: #fff; }
.pad-btn.shoot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78px; height: 78px;
  background: rgba(239, 142, 157, .94); color: #fff; font-size: 15px;
  z-index: 3;
}
.pad-btn.shoot.active { background: #d86b7c; }
.pad-btn.side {
  position: absolute;
  width: 46px;
  height: 46px;
  font-size: 13px;
  z-index: 2;
}
#btn-jump { right: 86px; bottom: 2px; }
#btn-interact { right: 138px; bottom: 2px; }
.pad-btn.skill {
  position: absolute;
  width: 56px;
  height: 56px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  background: rgba(255, 248, 237, 0.94);
  border: 2px solid rgba(239, 142, 157, 0.55);
  z-index: 2;
}
.pad-btn.skill.s1 { right: 88px; bottom: 56px; }
.pad-btn.skill.s2 { right: 146px; bottom: 78px; }
.pad-btn.skill.s3 { right: 92px; bottom: 124px; }
.pad-btn.skill.ult {
  right: 154px;
  bottom: 138px;
  width: 64px;
  height: 64px;
  font-size: 13px;
  background: linear-gradient(160deg, #fff3c4, #ffd27a);
  border-color: #f0b429;
  box-shadow: 0 0 0 2px rgba(240, 180, 41, 0.35), var(--shadow);
}
.pad-btn.skill.locked { opacity: 0.4; }
.pad-btn.skill.ready:not(.cooling) { box-shadow: 0 0 0 2px #ef8e9d, var(--shadow); }
.pad-btn.skill.ult.ready:not(.cooling) {
  box-shadow: 0 0 0 2px #f0b429, 0 6px 14px rgba(0,0,0,.18);
}
.pad-btn.skill.cooling {
  color: #fff;
  background: rgba(55, 45, 42, 0.78);
  border-color: rgba(255,255,255,.25);
}
.pad-btn.skill .sk-key {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(40, 30, 28, 0.75);
  color: #fff;
  font-size: 9px;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.flight { display: none !important; }
.tp-card {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(255, 248, 237, 0.96);
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 320px;
}
.tp-card button {
  margin: 8px 6px 0;
  padding: 8px 14px;
  border-radius: 10px;
}
.tp-card #tp-yes { background: var(--pink); color: #fff; }

.family-panel {
  position: fixed; right: calc(14px + var(--safe-r)); top: 50%; transform: translateY(-50%);
  z-index: 8; width: min(310px, calc(100% - 28px)); padding: 20px;
  border-radius: 20px; background: var(--paper); box-shadow: var(--shadow);
}
.family-panel h2 { margin-bottom: 8px; }
.family-panel p { color: var(--muted); margin: 6px 0; }
.family-panel .close { position: absolute; right: 12px; top: 9px; font-size: 24px; background: transparent; }
.family-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0; }
.family-actions button { padding: 9px 6px; border-radius: 10px; border: 1px solid #eed7c4; }
.child-stats { padding: 10px; border-radius: 12px; background: #eaf6ff; }
.child-stats h3 { font-size: 14px; }
.toast {
  position: fixed; left: 50%; top: 19%; transform: translateX(-50%); z-index: 10;
  max-width: 80%; padding: 10px 16px; border-radius: 13px;
  background: rgba(38,34,35,.84); color: #fff; box-shadow: var(--shadow);
}
.flying-heart {
  position: fixed; z-index: 12; color: #ff7891; font-size: 22px;
  pointer-events: none; animation: fly-heart 1.25s ease-out forwards;
}
@keyframes fly-heart {
  from { transform: translateY(0) scale(.7); opacity: 1; }
  to { transform: translateY(-150px) scale(1.35); opacity: 0; }
}

.rotate-hint {
  position: fixed; inset: 0; z-index: 20;
  background: #283049; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.rotate-hint span { font-size: 64px; animation: spin-phone 1.6s ease-in-out infinite; }
@keyframes spin-phone {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}

@media (orientation: portrait) and (max-width: 900px) {
  #hud.playing-portrait ~ .rotate-hint { display: flex; }
}

@media (max-height: 430px) {
  .panel { padding: 12px 16px; }
  h1 { font-size: 22px; }
  .inventory-card { display: none; }
  .stick { width: 96px; height: 96px; bottom: calc(14px + var(--safe-b)); }
  .stick-knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .action-cluster {
    bottom: calc(8px + var(--safe-b));
    gap: 5px;
  }
  .action-row { gap: 5px; }
  .pad-btn { width: 42px; height: 42px; font-size: 10px; }
  .combat-pad { width: 196px; height: 176px; }
  .pad-btn.shoot { width: 64px; height: 64px; font-size: 13px; }
  .pad-btn.side { width: 40px; height: 40px; font-size: 12px; }
  #btn-jump { right: 72px; bottom: 2px; }
  #btn-interact { right: 116px; bottom: 2px; }
  body.is-mobile .hud.in-vehicle #btn-interact {
    right: 0;
    bottom: 0;
    width: 72px;
    height: 72px;
  }
  body.is-mobile .hud.in-vehicle #btn-jump {
    right: 80px;
    bottom: 7px;
    width: 58px;
    height: 58px;
  }
  .pad-btn.skill { width: 46px; height: 46px; font-size: 11px; }
  .pad-btn.skill.s1 { right: 72px; bottom: 48px; }
  .pad-btn.skill.s2 { right: 122px; bottom: 66px; }
  .pad-btn.skill.s3 { right: 76px; bottom: 104px; }
  .pad-btn.skill.ult { right: 128px; bottom: 116px; width: 52px; height: 52px; font-size: 11px; }
  #minimap { width: 76px; height: 76px; }
  .nav-guide { min-width: 0; width: min(310px, calc(100% - 210px)); padding: 5px 7px; }
  .nav-actions { margin-top: 3px; }
  .nav-actions button { padding: 3px 5px; font-size: 10px; }
  .prompt {
    top: calc(8px + var(--safe-t));
    bottom: auto;
    max-width: 36%;
    font-size: 11px;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .prompt { max-width: 34%; }
}

.age-gate {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(28, 24, 32, .94); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 12px;
}
.age-gate h1 { font-size: 28px; }
.age-gate p { max-width: 420px; color: #ddd; line-height: 1.6; }
.age-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.age-actions button { padding: 12px 22px; border-radius: 12px; }
.age-actions .primary { background: var(--pink); color: #fff; }
.intimacy {
  position: fixed; left: 50%; top: calc(8px + var(--safe-t)); transform: translateX(-50%);
  z-index: 12; padding: 8px 16px; border-radius: 14px;
  background: rgba(40, 24, 32, .82); color: #ffd6e0; text-align: center;
  pointer-events: none;
}
.intimacy small { display: block; margin-top: 4px; opacity: .7; }
.pose-picker {
  position: fixed; left: 12px; bottom: calc(12px + var(--safe-b)); top: auto;
  transform: none; z-index: 16; width: 230px;
  padding: 8px; border-radius: 14px;
  background: rgba(255, 248, 237, .94); box-shadow: var(--shadow);
  text-align: center; pointer-events: auto; touch-action: none;
}
.pose-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: grab; padding: 2px 4px 6px; font-size: 13px;
}
.pose-head button { padding: 4px 10px; border-radius: 8px; background: #fff; border: 1px solid #eed7c4; font-size: 12px; }
.pose-picker.collapsed { width: 118px; }
.pose-picker.collapsed .pose-body { display: none; }
.pose-picker h3 { margin-bottom: 6px; font-size: 14px; }
.pose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.pose-grid button, #pose-stop, .pose-speed button {
  padding: 8px 6px; border-radius: 10px; border: 1px solid #eed7c4;
}
.pose-grid button { background: #fff; }
.pose-speed {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px;
}
.pose-speed b { min-width: 72px; color: #c45d72; font-size: 13px; }
#pose-slow { background: #fff; }
#pose-fast { background: #f7c4cc; }
#pose-stop { width: 100%; background: #f2a3ab; color: #fff; }
.quest-line { margin-top: 4px; color: var(--muted); font-size: 11px; }
.menu.locked { pointer-events: none; filter: blur(8px); }
