/* 手机横屏专用界面（方案 A）。只在 body.phone 下生效；颜色只取 tokens.css。
   #phud 不随地图缩放，下面的尺寸都是真实的点数。地图居中铺满高度，两侧空边放信息和按钮。 */
#phud { display: none; position: fixed; left: env(safe-area-inset-left); right: env(safe-area-inset-right); top: env(safe-area-inset-top); bottom: env(safe-area-inset-bottom); z-index: 30; pointer-events: none; font-family: var(--font-ui); color: var(--ink); }
body.phone #phud { display: block; }
#phud > * { position: absolute; pointer-events: auto; }
body.phone #dock, body.phone #tip, body.phone #dtip { display: none !important; }

/* 左列：暂停、倍速、波次、吸收率 */
#phud #pausebtn { left: 4px; top: 6px; width: 38px; height: 38px; }
#phud #speed { left: 46px; top: 6px; width: 38px; height: 38px; }
#phud #speed .num { font-size: 14px; }
#phud #wave { left: 0; top: 52px; width: 84px; height: auto; padding: 7px 8px 12px; }
#phud #wave .meal, #phud #wave .pv { display: none; }
#phud #wave .row { flex-wrap: wrap; gap: 2px 4px; margin: 0; }
#phud #wave .n { font-size: 22px; }
#phud #wave .of { font-size: 13px; }
#phud #wave .dish { margin: 2px 0 0; flex-basis: 100%; max-width: 100%; font-size: 12px; white-space: normal; line-height: 1.3; }
#phud #wave .bar { left: 8px; right: 8px; bottom: 6px; }
#phud #meter { left: 0; top: auto; bottom: 0; width: 84px; height: 74px; padding: 7px 8px; }
#phud #meter .label { font-size: 10px; letter-spacing: 1px; }
#phud #meter .big { right: auto; left: 8px; top: 22px; font-size: 22px; }
#phud #meter .track { left: 8px; right: 8px; top: auto; bottom: 16px; height: 5px; }
#phud #meter .track .st { top: 8px; font-size: 8px; }
#phud #meter .leak { display: none; }

/* 中上：宿主头像和三颗心，压在地图顶端那条本来就留给界面的带子上 */
#phud #hostbox { left: 50%; top: 0; width: 84px; height: 80px; margin-left: -42px; }
#phud #hostmount { width: 112px; height: 112px; transform: scale(0.5); transform-origin: 0 0; margin-left: 14px; margin-bottom: -56px; }
#phud #comfort .label { display: none; }
#phud #comfort .d { width: 16px; height: 14px; }

/* 右列：资源、肝、两个技能、开波 */
#phud #res { right: 0; left: auto; top: 6px; width: 84px; flex-direction: column; gap: 3px; }
#phud #res .r { width: 84px; height: 30px; padding: 0 8px; gap: 6px; }
#phud #res .r svg { width: 18px; height: 18px; }
#phud #res .r .v { font-size: 16px; }
#phud #res .r .t { display: none; }
#phud #liver { right: 18px; left: auto; top: 110px; width: 48px; }
#phud #liver svg { width: 40px; height: 40px; }
#phud #liver .t { font-size: 9px; }
#phud .skill { top: auto; left: auto; right: 0; width: 84px; height: 58px; }
#phud #sk1 { bottom: 132px; }
#phud #sk2 { bottom: 68px; }
#phud .skill .k { display: none; }
#phud .skill .ring { width: 34px; height: 34px; margin: 5px auto 0; }
#phud .skill .ring svg { width: 26px; height: 26px; }
#phud .skill .nm { display: none; }
#phud .skill .cst { font-size: 11px; margin-top: 2px; }
#phud #next { right: 0; left: auto; top: auto; bottom: 0; width: 84px; height: 62px; }
#phud #next .t { font-size: 10px; margin-top: 5px; }
#phud #next .cd { font-size: 20px; line-height: 1.3; }
#phud #next.ready .cd { font-size: 22px; }
#phud #next.wave .cd { font-size: 14px; line-height: 1.8; }
#phud #next .go { font-size: 10px; }

/* 横幅与弹窗 */
#phud #banner { left: 90px; right: 90px; top: 84px; }
#phud #banner .n { font-size: 34px; }
#phud #banner .d { font-size: 15px; }
#phud #banner .fi { width: 26px; height: 26px; }
#phud .modal { inset: 0; }
#phud .modal .card { transform: scale(0.86); }
#phud .modal button { height: 52px; }
#phud .modal .col { gap: 8px; margin-top: 16px; }
#phud .modal.show .card { animation: none; }

/* 点槽位弹出的环形菜单 */
#ring { left: 0; top: 0; width: 0; height: 0; z-index: 5; display: none; }
#ring.show { display: block; }
#ring .mk { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--teal); box-sizing: border-box; animation: ring-spin 3s linear infinite; pointer-events: none; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
#ring .rb { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: radial-gradient(circle at 50% 35%, var(--panel), var(--panel-2)); border: 2px solid var(--tc, var(--line-2)); box-shadow: 0 4px 14px rgba(0,0,0,0.6), 0 0 14px -4px var(--tc); color: var(--ink); animation: ring-in 0.18s ease-out both; }
#ring .rb svg, #ring .rb .fi { width: 28px; height: 28px; flex: none; }
#ring .rb .c { display: flex; align-items: center; gap: 1px; font-size: 12px; font-weight: 700; color: var(--coral); line-height: 1; }
#ring .rb .c svg { width: 11px; height: 11px; }
#ring .rb .tg { position: absolute; top: -9px; right: -6px; padding: 1px 5px; border-radius: 8px; background: var(--amber); color: var(--bg); font-size: 10px; font-weight: 700; }
#ring .rb.poor { opacity: 0.45; }
#ring .rb.off { opacity: 0.35; pointer-events: none; }
#ring .rb.armed { border-color: var(--ink); box-shadow: 0 0 0 3px var(--tc), 0 0 22px var(--tc); }
#ring .rb .ok { position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; }
#ring .lbl { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; padding: 4px 10px; white-space: nowrap; background: rgba(10,15,23,0.92); border: 1px solid var(--line-2); border-radius: 14px; font-size: 13px; pointer-events: none; }
#ring .lbl .lv { color: var(--amber); font-size: 12px; }
#ring .lbl .fi { width: 22px; height: 22px; }
#ring .lbl .x { font-size: 11px; color: var(--dim); }
#ring .lbl .aura { display: none; }
@keyframes ring-in { from { opacity: 0; transform: scale(0.4); } }
@media (prefers-reduced-motion: reduce) { #ring .mk, #ring .rb { animation: none; } }

/* 标题画面与选关地图仍在缩放的舞台里（约 0.45 倍），只把太小的按钮和字放大，让按钮至少 44 点 */
body.phone #title .start { transform: scale(1.5); }
body.phone #title .snd { transform: scale(2.6); transform-origin: 100% 0; }
body.phone #map .back { transform: scale(2.45); transform-origin: 0 0; }
body.phone #map .crumb { left: 152px; top: 62px; font-size: 22px; letter-spacing: 3px; }
body.phone #map .head { top: 146px; }
body.phone #map .card .top { font-size: 18px; letter-spacing: 0; }
body.phone #map .card .top > span:first-child { display: none; }
body.phone #map .card .stars { font-size: 22px; }
body.phone #map .card .hstars { font-size: 18px; }
body.phone #map .go .d { font-size: 18px; line-height: 22px; top: 62px; }
body.phone #map .hard { top: 650px; height: 92px; font-size: 26px; gap: 14px; }
body.phone #map .hard .box { width: 30px; height: 30px; border-width: 3px; }
