#mobile-hud-stack, #mobile-corner { display: none; }
#desktop-auto, #desktop-travel { display: none; }
#game-systems .quest-travel {display:none}
#bag-drop-mode, #inventory-panel .mobile-shortcut-handle, .shortcut-handle-mark {display:none}
.classic-skill-row > .mobile-shortcut-handle {display:contents}
.equipment-comparison {margin:7px 0;padding:5px 0;border-block:1px solid #827455}
.equipment-comparison>div {display:flex;justify-content:space-between;gap:8px}
.equipment-comparison .stat-up {color:#ffe17a}
.equipment-comparison .stat-down {color:#ff8888}

@media (pointer: fine) {
  .bottom-center :is(#desktop-auto,#desktop-travel) {
    display: grid !important;
    place-items: center;
    position: absolute;
    right: 8px;
    bottom: calc(100% + 7px);
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #b6a06b;
    border-radius: 50%;
    background: #1b2b23;
    color: #f7ebce;
    font: 600 11px/1 Arial, sans-serif;
    cursor: pointer;
    pointer-events: auto;
  }
  .bottom-center #desktop-travel { bottom: calc(100% + 43px); }
  .bottom-center #desktop-auto[aria-pressed=true] {
    color: #223221;
    background: #d1e9a7;
    border-color: #effdc9;
  }
}

.world-touch-stick {
  position: fixed;
  z-index: 2;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 1px solid #f2e3a971;
  border-radius: 50%;
  background: #10231c45;
}
.world-touch-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 1px solid #e6dba770;
  border-radius: 50%;
  background: #dfdab675;
}
.world-touch-stick[hidden] { display: none; }

@media (pointer: coarse) {
  :root {
    --hud-top: calc(env(safe-area-inset-top, 0px) + 8px);
    --hud-right: calc(env(safe-area-inset-right, 0px) + 10px);
    --hud-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    --hud-left: calc(env(safe-area-inset-left, 0px) + 10px);
    --hud-surface: linear-gradient(125deg, #29372cec, #121e1aeb);
    --hud-edge: 1px solid #b6a06b95;
    --corner-size: 34px;
    --corner-gap: 6px;
    --corner-width: var(--corner-size);
    --hotkey-size: min(44px, calc((100vw - var(--hud-left) - var(--hud-right) - var(--corner-size) - var(--corner-gap) - 9px) / 10));
    touch-action: manipulation;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  #game, #world, .vignette, #floating { width: 100%; height: 100dvh; }
  #world { touch-action: none; }
  body.in-world #mobile-corner {
    position: fixed;
    z-index: 29;
    right: var(--hud-right);
    bottom: max(var(--hud-bottom),calc(var(--keyboard-inset,0px) + 4px));
    display: grid;
    gap: var(--corner-gap);
    pointer-events: auto;
  }
  #mobile-hud-menu summary, #mobile-corner > button {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: var(--corner-size);
    height: var(--corner-size);
    min-width: 0;
    min-height: 0;
    font: 600 11px/1 "Microsoft JhengHei", sans-serif;
    color: #f7ebce;
    padding: 0;
    text-align: center;
    border: var(--hud-edge);
    border-radius: 50%;
    background: var(--hud-surface);
    box-shadow: 0 2px 5px #0005;
    cursor: pointer;
  }
  #mobile-corner #mobile-auto-settings {
    align-content:center;
    grid-template-rows:16px 9px;
  }
  #mobile-auto-settings span {font:16px/1 sans-serif}
  #mobile-auto-settings small {font:700 9px/1 Arial,sans-serif}
  #mobile-corner :is(#mobile-bag,#mobile-skill,#mobile-status,#mobile-transform,#mobile-game-settings) img {width:23px;height:23px}
  #mobile-hud-menu summary { list-style: none; }
  #mobile-hud-menu summary::-webkit-details-marker { display: none; }
  .mobile-npc-names-hidden .npc-label > b,
  .mobile-npc-names-hidden .npc-label[data-mark="none"],
  .mobile-npc-names-hidden #merchant-interact > b { display: none; }
  .mobile-hud-options {
    position: absolute;
    right: calc(100% + var(--corner-gap));
    bottom: 0;
    min-width: 142px;
    max-height: calc(100dvh - var(--hud-top) - var(--hud-bottom) - 44px);
    overflow-y: auto;
    padding: 3px 8px;
    border: var(--hud-edge);
    border-radius: 7px;
    background: #18271ff7;
  }
  .mobile-hud-options label, #mobile-fullscreen {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 3px;
    white-space: nowrap;
  }
  .mobile-hud-options input { width: 18px; height: 18px; margin: 0; accent-color: #a9c888; }
  #mobile-fullscreen { justify-content: center; border: 0; border-top: var(--hud-edge); background: transparent; }
  #mobile-corner #mobile-auto[aria-pressed="true"] {
    color: #223221;
    background: #d1e9a7;
    border-color: #effdc9;
    box-shadow: inset 0 -3px #819260, 0 2px 5px #0005;
  }
  .right-hud {
    zoom: 1;
    right: var(--hud-right);
    top: var(--hud-top);
    transform: scale(.64);
    transform-origin: top right;
  }
  #mailbox-button { --mail-unit: 1.6px; }
  #active-statuses { top: calc(var(--hud-top) + 109px); right: calc(var(--hud-right) + 33px); zoom: 1; }

  .player-panel.classic-hud:not(.status-expanded) {
    zoom: 1;
    transform: none;
    top: var(--hud-top);
    left: var(--hud-left);
    width: min(330px, calc(100vw - var(--hud-left) - var(--hud-right) - 91px));
    height: auto;
    padding: 5px 7px;
    border: var(--hud-edge);
    border-radius: 6px;
    background: var(--hud-surface);
  }
  .classic-hud:not(.status-expanded) > :is(.classic-title, .classic-form-tabs) { display: none !important; }
  .classic-hud:not(.status-expanded) .player-name {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: baseline;
    gap: 0 7px;
    width: auto;
    margin-bottom: 3px;
    font: 11px/17px "Microsoft JhengHei", sans-serif;
    color: #d9cbaa;
  }
  .classic-hud:not(.status-expanded) .player-name label { min-width: 0; max-width: 100%; gap: 3px; }
  .classic-hud:not(.status-expanded) :is(#player-name, #player-role, #level) {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f3edda;
  }
  .classic-hud:not(.status-expanded) .meter {
    position: relative;
    inset: auto;
    height: 17px;
    margin-top: 2px;
    border: 1px solid #77735a;
    overflow: hidden;
  }
  .classic-hud:not(.status-expanded) .meter > span {
    justify-content: space-between;
    font: 600 12px/15px Arial, sans-serif;
    padding: 0 5px;
  }
  .classic-hud:not(.status-expanded) .meter b { position: static; font: inherit; }
  .player-panel.classic-hud.status-expanded {
    zoom:1;transform:none;left:var(--hud-left);top:var(--hud-top);z-index:31;
    display:grid;grid-template-rows:auto auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);align-items:stretch;gap:3px;
    width:min(560px,var(--panel-control-width));height:min(670px,var(--panel-height));
    max-width:none;max-height:none;border:var(--hud-edge);border-radius:6px;
    padding:6px;background:#202b22;overflow:clip;color:#f1e8ce;font:16px/1.4 "Microsoft JhengHei",sans-serif;
  }
  .classic-hud.status-expanded > .player-stats {display:none}
  .classic-hud.status-expanded > .classic-title {
    position:static;display:flex;height:44px;align-items:center;justify-content:space-between;
    padding:0 0 0 8px;color:#35280d;background:#dfc58d url('../../assets/interface/social/title.png') center/100% 100% no-repeat;
    font:600 17px/1.3 "Microsoft JhengHei",sans-serif;
  }
  .classic-hud.status-expanded > .classic-title .ui-minimize {display:none}
  .classic-hud.status-expanded > .classic-title .ui-close {width:44px;height:44px;background-size:20px;background-repeat:no-repeat;background-position:center}
  .classic-hud.status-expanded > .classic-form-tabs {position:static;display:flex;align-items:center;gap:5px;padding:3px 0;height:auto}
  .classic-hud.status-expanded > .classic-form-tabs :is(button,#portrait-attributes) {
    position:static;width:auto;height:40px;padding:0 10px 0 34px;min-width:84px;border:1px solid #7a7253;border-radius:4px;
    background-size:28px;background-repeat:no-repeat;background-position:3px center;color:#ebddb7;font:600 16px/1.3 "Microsoft JhengHei",sans-serif;
  }
  .classic-hud.status-expanded > .classic-form-tabs .ui-human::after {content:'人物'}
  .classic-hud.status-expanded > .classic-form-tabs .ui-mech::after {content:'機甲'}
  .classic-hud.status-expanded > #attributes-panel {
    display:flex;flex-direction:column;gap:8px;position:static;min-height:0;width:100%;height:100%;
    padding:0 4px;overflow:auto;overscroll-behavior:contain;font:16px/1.4 "Microsoft JhengHei",sans-serif;
  }
  .classic-hud.status-expanded #attributes-editor {
    position:static;order:-1;flex:none;padding:0 0 6px;border:0;border-bottom:1px solid #736a4a;
  }
  .classic-hud.status-expanded #attributes-panel .allocation-top {position:static;display:flex;justify-content:flex-start;margin:2px 0 4px}
  .classic-hud.status-expanded #attributes-panel .points-badge,
  .classic-hud.status-expanded #attributes-panel .points-badge b {font-size:17px}
  .classic-hud.status-expanded #attributes-panel .attribute-rows {grid-template:repeat(3,auto)/repeat(2,minmax(0,1fr));gap:2px 10px}
  .classic-hud.status-expanded #attributes-panel .attribute-row {
    display:grid;grid-template-columns:minmax(2em,auto) minmax(2ch,1fr) 40px;
    align-items:center;gap:2px;height:auto;min-height:44px;border-bottom:1px solid #596149;
  }
  .classic-hud.status-expanded #attributes-panel .attribute-row b,
  .classic-hud.status-expanded #attributes-panel .attribute-row strong {font:600 16px/1.3 "Microsoft JhengHei",sans-serif}
  .classic-hud.status-expanded #attributes-panel .attribute-row strong {display:block;text-align:right;white-space:normal;overflow-wrap:anywhere}
  .classic-hud.status-expanded #attributes-panel .attribute-row button:last-of-type {
    display:grid;place-items:center;width:40px;height:44px;
    background:transparent;border:0;padding:0;color:#f6e6ba;
  }
  .classic-hud.status-expanded #attributes-panel .attribute-row button:last-of-type::after {
    content:'+';display:grid;place-items:center;width:26px;height:26px;
    border:1px solid #ae9a63;border-radius:4px;background:#354633;color:#fff0c7;
    font:700 22px/1 Arial,sans-serif;
  }
  .classic-hud.status-expanded #attributes-panel .reference-overview {position:static;flex:none;height:auto;display:flex;flex-direction:column;gap:6px}
  .classic-hud.status-expanded .reference-overview :is(.status-combat,.reference-identity,.status-details) {
    display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:2px 12px;
    max-height:none;overflow:visible;margin:0;padding:0;border:0;
  }
  .classic-hud.status-expanded .reference-overview :is(.reference-identity,.status-details)[hidden] {display:none}
  .classic-hud.status-expanded .reference-overview p {align-items:start;justify-content:space-between;gap:5px;height:auto;margin:0;padding:4px 0;border-bottom:1px solid #596149;font:15px/1.4 "Microsoft JhengHei",sans-serif;white-space:normal}
  .classic-hud.status-expanded .reference-overview p span {flex:none}
  .classic-hud.status-expanded .reference-overview p b {max-width:none;text-align:right;overflow-wrap:anywhere;overflow:visible}
  .classic-hud.status-expanded .reference-overview .status-details-toggle {position:static;min-height:44px;align-self:end;padding:0 8px;font-size:16px}

  body.in-world #mobile-hud-stack {
    display: flex;
    position: fixed;
    left: var(--hud-left);
    right: var(--hud-right);
    bottom: max(var(--hud-bottom), calc(var(--keyboard-inset, 0px) + 4px));
    padding-right: calc(var(--corner-width) + var(--corner-gap));
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    z-index: 25;
    pointer-events: none;
  }
  #mobile-hud-stack > :is(#classic-chat, #combat-dock, .bottom-center) {
    position: relative;
    inset: auto;
    zoom: 1;
    transform: none;
    margin: 0;
    z-index: auto;
  }
  #mobile-hud-stack #classic-chat {
    width: min(100%, 370px);
    height: auto;
    min-height: 0;
    padding: 0;
    overflow: visible;
    border: var(--hud-edge);
    border-radius: 5px;
    background: #14231cd6;
  }
  /* The channel selector includes all five channels; the desktop tabs duplicate three of them. */
  #mobile-hud-stack #classic-chat :is(.chat-tabs, .chat-drag-handle) { display: none; }
  #mobile-hud-stack #chat-log {
    display: block;
    flex: none;
    height: clamp(42px, 8dvh, 84px);
    padding: 3px 6px;
    font: 16px/1.4 "Microsoft JhengHei", sans-serif;
    touch-action: pan-y;
  }
  #mobile-hud-stack #chat-log p { line-height: 1.4; }
  #mobile-hud-stack #classic-chat form { min-height: 44px; padding: 0 2px; border-width: 1px 0 0; }
  #mobile-hud-stack #classic-chat :is(input, select) { height: 44px; padding: 0 3px; font: 16px/1.2 "Microsoft JhengHei", sans-serif; }
  #mobile-hud-stack #classic-chat select { width: 65px; }
  #mobile-hud-stack #chat-target { width: min(24%, 90px); }
  #mobile-hud-stack #classic-chat .chat-send { width: 44px; height: 44px; background-size: 30px; }
  #mobile-hud-stack #chat-error { bottom: 44px; left: 4px; font-size: 14px; }

  #mobile-hud-stack #combat-dock {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 1px 2px;
    height: auto;
    width: min(100%, 390px);
    border-radius: 5px;
    background: #14231c72;
  }
  #mobile-hud-stack #combat-dock nav { display: contents; }
  #mobile-hud-stack #combat-dock .main-actions > button { order: -1; }
  #mobile-hud-stack #combat-dock :is(.original-action, #gear-button) {
    display: grid !important;
    place-items: center;
    width: 100%;
    height: 40px;
    background-size: 35px 35px;
    background-repeat: no-repeat;
    pointer-events: auto;
  }
  #mobile-hud-stack #combat-dock .original-action img { width: 30px; height: 30px; }
  #mobile-hud-stack #combat-dock .bar-toggle, #mobile-hud-stack .bottom-center > .bar-toggle { display: none !important; }
  #mobile-hud-stack .bottom-center { align-self: flex-end; width: min(100%, 470px); height: auto; pointer-events: none; }
  #mobile-hud-stack .bottom-center .skillbar {
    display: grid !important;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 1px;
    width: 100%;
    height: auto;
    padding: 0;
    background: none;
    pointer-events: none;
  }
  #mobile-hud-stack .hotbar-pages { position: static; grid-area: 1 / 1 / 2 / -1; height: auto; justify-content: flex-end; }
  #mobile-hud-stack .hotbar-dots { display: flex; gap: 3px; }
  #mobile-hud-stack .hotbar-dots button {
    min-width: 33px;
    height: 26px;
    border: var(--hud-edge);
    border-radius: 4px;
    background: #19271fee;
    color: #ded8c7;
    font: 600 13px/1 Arial, sans-serif;
    pointer-events: auto;
  }
  #mobile-hud-stack .hotbar-dots button[aria-pressed="true"] { background: #d6c58b; color: #282e22; }
  #mobile-hud-stack .skillbar .skill {
    grid-row: 2;
    width: 100%;
    height: var(--hotkey-size);
    min-height: 38px;
    background-size: var(--hotkey-size) var(--hotkey-size);
    pointer-events: auto;
  }
  #mobile-hud-stack .skill > :is(img, svg) {
    inset: 50% auto auto 50%;
    transform: translate(-48%, -48%);
    width: calc(var(--hotkey-size) * .8);
    height: calc(var(--hotkey-size) * .8);
    max-width: none;
    max-height: none;
  }
  #mobile-hud-stack .skill > kbd { top: 0; left: 1px; font: bold 12px/1 Arial, sans-serif; }
  #mobile-hud-stack .skill > strong { font-size: 11px; line-height: 11px; }
  #mobile-hud-stack .skill .cd-text { inset: 50% 0 auto; width: auto; transform: translateY(-50%); font-size: 13px; line-height: 1; }
  #mobile-hud-stack .skill .cooldown { left: 10%; width: 80%; bottom: 3px; max-height: 85%; border-radius: 4px; clip-path: none; }
  .player-panel.classic-hud.mobile-hud-hidden:not(.status-expanded),
  #mobile-hud-stack > .mobile-hud-hidden,
  #mobile-hud-stack > #combat-dock.mobile-hud-hidden { display: none !important; }
  #mobile-hud-stack:has(#classic-chat input:focus) > :is(#combat-dock, .bottom-center) { display: none; }
  body.in-world.mobile-shortcut-drag :is(#mobile-hud-stack,#mobile-corner) {visibility:hidden}
  body.mobile-ground-drag #inventory-panel {opacity:0;pointer-events:none}
  #inventory-panel :is(.mobile-shortcut-handle,#bag-drop-mode), .classic-skill-row > .mobile-shortcut-handle {
    display:inline-flex;
    position:relative;
    align-items:center;
    justify-content:center;
    min-height:44px;
    touch-action:none;
    border:1px solid #a39263;
    border-radius:4px;
    background:#29382d;
    color:#f0e0b1;
    font:600 15px/1.25 "Microsoft JhengHei",sans-serif;
  }
  #inventory-panel :is(.mobile-shortcut-handle,#bag-drop-mode) {width:100%;margin:0 0 4px}
  #inventory-panel :is(.mobile-shortcut-handle,#bag-drop-mode):disabled {opacity:.55}
  .classic-skill-row > .mobile-shortcut-handle {width:44px;flex:none;padding:0}
  .classic-skill-row .shortcut-handle-mark {
    position:absolute;right:0;bottom:0;display:block;padding:0 2px;border-radius:2px;
    background:#17241e;color:#f3d99b;font:700 12px/12px sans-serif;
  }
  #mobile-shortcut-targets {
    position:fixed;
    inset:auto var(--hud-right) var(--hud-bottom) var(--hud-left);
    box-sizing:border-box;
    width:min(100% - var(--hud-left) - var(--hud-right),620px);
    max-width:none;
    max-height:calc(100dvh - var(--hud-top) - var(--hud-bottom));
    margin:0 auto;
    padding:8px;
    overflow:auto;
    z-index:140;
    border:1px solid #bca470;
    border-radius:7px;
    background:#19291ff7;
    box-shadow:0 2px 12px #0009;
    color:#f3e9cd;
    font:16px/1.3 "Microsoft JhengHei",sans-serif;
  }
  #mobile-shortcut-targets header {display:flex;gap:8px;align-items:center;justify-content:space-between}
  #bag-drop-dialog {
    position:fixed;inset:calc(var(--input-view-top,0px) + var(--input-view-height,100dvh) / 2) 0 auto;
    transform:translateY(-50%);margin:0 auto;box-sizing:border-box;width:min(310px,calc(100vw - var(--hud-left) - var(--hud-right)));
    max-height:calc(var(--input-view-height,100dvh) - 12px);overflow:auto;padding:14px 16px;border:1px solid #bca470;
    border-radius:7px;background:#1c2b22;color:#f3e9cd;font:16px/1.3 "Microsoft JhengHei",sans-serif;
  }
  #bag-drop-dialog::backdrop {background:#0b100b80}
  #bag-drop-dialog :is(h2,p) {margin:0 0 8px}
  #bag-drop-dialog h2 {color:#f4d58e;font-size:20px}
  #bag-drop-dialog .bag-drop-amount {display:grid;grid-template-columns:44px minmax(48px,1fr) 44px auto;align-items:center;gap:4px}
  #bag-drop-dialog :is(button,input) {box-sizing:border-box;min-width:0;min-height:44px;border:1px solid #91805a;border-radius:4px;
    background:#314037;color:#f3e9cd;font:inherit;text-align:center;padding:0 7px}
  #bag-drop-dialog input {width:100%;background:#17221b}
  #bag-drop-dialog button {touch-action:manipulation}
  #bag-drop-dialog footer {display:flex;gap:8px;margin-top:10px}
  #bag-drop-dialog footer button {flex:1}
  #bag-drop-dialog #bag-drop-confirm {background:#dfc38a;color:#2b251b;font-weight:700}
  #bag-drop-dialog button:disabled {opacity:.5}
  #mobile-shortcut-targets header strong {min-width:0;overflow-wrap:anywhere}
  #mobile-shortcut-targets button {
    box-sizing:border-box;min-width:0;min-height:40px;border:1px solid #827858;border-radius:4px;
    background:#2a392c;color:#eddfbc;font:600 15px/1.2 "Microsoft JhengHei",sans-serif;
  }
  #mobile-shortcut-targets header button {flex:none;padding:0 12px}
  #mobile-shortcut-targets .shortcut-target-pages {display:flex;gap:4px;margin:5px 0}
  #mobile-shortcut-targets [data-shortcut-page] {flex:1}
  #mobile-shortcut-targets [data-shortcut-page][aria-current=true] {background:#ddc58c;color:#302a1e}
  #mobile-shortcut-targets .shortcut-target-slots {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
  #mobile-shortcut-targets [data-shortcut-slot] {min-height:48px;padding:2px;display:grid;align-content:center;grid-template-rows:auto auto}
  #mobile-shortcut-targets [data-shortcut-slot] kbd {font:700 15px/1 Arial,sans-serif;color:#f2d28b}
  #mobile-shortcut-targets [data-shortcut-slot] span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
  #mobile-shortcut-targets [data-shortcut-slot][data-hover] {border-color:#ffdc8a;background:#485c3b;box-shadow:inset 0 0 0 1px #ffdc8a}

  :root {
    --panel-width: calc(100vw - var(--hud-left) - var(--hud-right));
    --panel-control-width: calc(var(--panel-width) - var(--corner-width) - var(--corner-gap));
    --panel-height: calc(100dvh - var(--hud-top) - var(--hud-bottom));
    --mobile-bag-width:min(237.33px,calc(var(--panel-width) * 2 / 3));
    --mobile-bag-height:calc(var(--panel-height) * 2 / 3);
  }
  body:has(.player-panel.status-expanded,#game-systems:is([data-mode=skill],[data-mode=quest])[open],#inventory-panel[data-mode=inventory][open]) #mobile-corner {z-index:45}
  /* 手機重新排列同一批道具格與視窗控制，讓短螢幕能以手指捲到最後一格。 */
  #inventory-panel[data-view=bag][data-mode=inventory], #inventory-panel[data-mode=shop],
  #item-description-window, #npc-dialog, #npc-talk, #npc-quest {
    zoom: 1;
    position: fixed;
    inset: var(--hud-top) var(--hud-right) var(--hud-bottom) var(--hud-left);
    margin: auto;
    box-sizing: border-box;
    max-width: var(--panel-width);
    max-height: var(--panel-height);
    padding: 8px;
    border: 1px solid #ad9569;
    border-radius: 7px;
    background: #202a21;
    color: #f6ebcd;
    font: 16px/1.4 "Microsoft JhengHei", sans-serif;
    overflow: hidden;
  }
  #inventory-panel[data-view=bag][data-mode=inventory][open], #inventory-panel[data-mode=shop][open],
  #item-description-window:not([hidden]) {display:flex;flex-direction:column}
  #inventory-panel[data-view=bag][data-mode=inventory] {
    --bag-width:var(--mobile-bag-width);
    right:auto;width:var(--bag-width);height:var(--mobile-bag-height);max-height:var(--mobile-bag-height);
    padding:5px;font-size:14px;
  }
  #inventory-panel[data-mode=shop] {width:min(680px,var(--panel-width));height:min(650px,var(--panel-height))}
  #inventory-panel[data-view=bag][data-mode=inventory] .inventory-heading,
  #inventory-panel[data-mode=shop] .inventory-heading,
  #item-description-window header, :is(#npc-dialog,#npc-talk,#npc-quest)>header {
    position: relative;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    height: 44px;
    min-height: 44px;
    margin: 0 0 5px;
    padding: 0 0 0 8px;
    border: 0;
    border-radius: 3px;
    color: #35280d;
    background: #dfc58d url('../../assets/interface/social/title.png') center/100% 100% no-repeat;
    cursor: default;
    touch-action: auto;
  }
  #inventory-panel:is([data-view=bag],[data-mode=shop]) h2, #item-description-window header b,
  :is(#npc-dialog,#npc-talk,#npc-quest) h2 {font:600 17px/1.3 "Microsoft JhengHei",sans-serif;color:inherit}
  #inventory-panel[data-view=bag][data-mode=inventory] #inventory-close,
  #inventory-panel[data-mode=shop] #inventory-close, #item-description-window header button,
  :is(#npc-dialog,#npc-talk,#npc-quest) .systems-close {
    position: static; width:44px;height:44px;flex:none;background-size:20px;background-repeat:no-repeat;background-position:center;
  }
  #inventory-panel[data-mode=shop] .inventory-heading > div:first-child {display:block}
  #inventory-panel[data-mode=shop] .inventory-heading .eyebrow {display:none}
  #inventory-panel:is([data-view=bag],[data-mode=shop]) .commerce-layout {min-height:0;overflow:auto;overscroll-behavior:contain}
  #inventory-panel[data-view=bag][data-mode=inventory] .bag-pages {
    position:static;height:auto;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;margin-bottom:4px;
  }
  #inventory-panel[data-view=bag][data-mode=inventory] #bag-filter-toggle {width:44px;height:44px;font-size:18px}
  #inventory-panel #bag-drop-mode {touch-action:manipulation}
  #inventory-panel[data-view=bag][data-mode=inventory] #bag-drop-mode[aria-pressed=true] {background:#ffd491;color:#38281f}
  #inventory-panel[data-view=bag][data-mode=inventory][data-picking-drop] #inventory-slots {outline:2px solid #e4aa67;outline-offset:-2px}
  #inventory-panel[data-view=bag][data-mode=inventory][data-picking-drop] #bag-filter-toggle {display:none}
  #inventory-panel[data-view=bag][data-mode=inventory] .weapon-filters {position:static}
  #inventory-panel[data-view=bag][data-mode=inventory] .weapon-filters select {min-height:44px;font-size:16px}
  #inventory-panel .bag-pages button[data-page] {
    width:100%;height:44px;padding:0;border:1px solid #766d4d;border-radius:3px;
    background:#2a352b;color:#e9dbb7;font:600 16px/1 Arial,sans-serif;
  }
  #inventory-panel .bag-pages button[data-page][aria-pressed=true] {background:#e2cb93;color:#322b1d}
  #inventory-panel[data-view=bag][data-mode=inventory] #inventory-slots,
  #inventory-panel[data-mode=shop] #shop-products {
    --bag-cell: min(52px, calc((var(--panel-width) - 20px) / 6));
    position:relative;inset:auto;width:calc(6 * var(--bag-cell));height:calc(10 * var(--bag-cell));margin:0 auto;
    grid-template-columns:repeat(6,var(--bag-cell));grid-template-rows:repeat(10,var(--bag-cell));
    background-color:#192019;
    background-image:linear-gradient(to right,#7a775c 1px,transparent 1px),linear-gradient(to bottom,#7a775c 1px,transparent 1px);
    background-size:var(--bag-cell) var(--bag-cell);
    box-shadow:inset -1px -1px #7a775c;touch-action:pan-y;
  }
  #inventory-panel:is([data-view=bag],[data-mode=shop]) :is(.inventory-slot,.shop-row) b {font-size:13px;line-height:16px}
  #inventory-panel[data-view=bag][data-mode=inventory] #inventory-slots {--bag-cell:min(34.667px,calc((var(--bag-width) - 12px) / 6))}
  /* 實物格在窗內跟手捲動，移出視窗後仍須收到 pointerup；空格繼續使用原生捲動。 */
  #inventory-panel[data-view=bag][data-mode=inventory] .inventory-slot[data-item-id] {touch-action:none}
  #inventory-panel[data-view=bag][data-mode=inventory] .bag-pages button[data-page] {height:32px;font-size:13px}
  #inventory-panel[data-view=bag][data-mode=inventory] h2 {font-size:15px}
  #inventory-panel[data-view=bag][data-mode=inventory] .inventory-slot b {font-size:11px;line-height:13px}
  #inventory-panel[data-view=bag][data-mode=inventory] :is(.mobile-shortcut-handle,#bag-drop-mode) {min-height:44px;font-size:14px}
  #inventory-panel[data-view=bag][data-mode=inventory][data-extra-pages=true] .inventory-pagination {position:static;height:auto;font-size:15px}
  #inventory-panel[data-view=bag][data-mode=inventory] .inventory-pagination button {min-height:44px;font-size:16px}
  #inventory-panel:is([data-view=bag],[data-mode=shop]) #commerce-message:not(:empty) {
    position:static;flex:none;font-size:15px;max-height:25%;overflow:auto;
  }
  #item-description-window {width:min(400px,var(--panel-width));height:fit-content;min-height:0;z-index:121}
  #item-description-window .item-description-content {min-height:0;max-height:none;padding:8px;overflow:auto}
  #equipment-panel, #equipment-panel[data-equipment-form=mech] {
    zoom:1;position:fixed;left:auto;right:var(--hud-right);top:var(--hud-top);bottom:var(--hud-bottom);
    margin:auto 0;width:var(--mobile-bag-width);height:var(--mobile-bag-height);max-height:var(--mobile-bag-height);
    box-sizing:border-box;border:1px solid #ad9569;border-radius:7px;background:#202a21;
    overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;
  }
  #equipment-panel[open] {display:flex;flex-direction:column}
  #equipment-panel .inventory-help {
    position:relative;inset:auto;flex:none;width:100%;height:auto;aspect-ratio:424/472;margin:auto 0;
    background:transparent url('../../assets/interface/refined/equipment-human.png') center/100% 100% no-repeat;
  }
  #equipment-panel[data-equipment-form=mech] .inventory-help {background-image:url('../../assets/interface/refined/equipment-mech.png')}
  #equipment-panel .equipment-heading {
    position:sticky;top:0;left:auto;right:auto;height:38px;flex:none;z-index:9;
    background:#dfc58d url('../../assets/interface/social/title.png') center/100% 100% no-repeat;
  }
  #equipment-panel #equipment-close {width:38px;height:38px;background-size:18px}
  #equipment-panel .equipment-mode {left:3%;top:4%;gap:4px}
  #equipment-panel .equipment-mode button {width:30px;height:23px;background-size:100% 100%}
  #equipment-panel .equipment-column-labels {top:13%;left:3%;right:3%;font-size:10px;pointer-events:none}
  #equipment-panel .paperdoll canvas {left:30.2%;top:9.1%;width:39.2%;height:52.5%}

  #inventory-panel[data-mode=shop] .shop-body {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:6px;
  }
  #inventory-panel[data-mode=shop] .shop-body > :is(.shop-mode,#shop-products,.shop-product,.shop-order,.shop-catalog-pages,#shop-funds) {grid-column:1/-1}
  #inventory-panel[data-mode=shop] .shop-body > :not(#shop-products) {position:static;width:auto;height:auto;inset:auto}
  #inventory-panel[data-mode=shop] .merchant-card {grid-row:1;grid-column:1;display:flex;align-items:center;gap:6px;overflow:hidden}
  #inventory-panel[data-mode=shop] .merchant-card b {font-size:16px;line-height:22px;overflow-wrap:anywhere}
  #inventory-panel[data-mode=shop] #merchant-preview {width:40px;height:44px;flex:none}
  #inventory-panel[data-mode=shop] #shop-kotodama-option {position:static;grid-column:1/-1;min-height:38px;font-size:16px}
  #inventory-panel[data-mode=shop] .shop-body>.shop-mode {grid-column:2;grid-row:1;justify-content:flex-end;gap:2px}
  #inventory-panel[data-mode=shop] #shop-products {
    height:min(340px,35dvh);overflow-y:auto;align-content:start;
    background-attachment:local;overscroll-behavior:contain;
  }
  #inventory-panel[data-mode=shop] #shop-page-tab {height:30px;line-height:30px;font-size:15px;background-size:100% 100%}
  #inventory-panel[data-mode=shop] .shop-mode button,
  #inventory-panel[data-mode=shop] .shop-order :is(input,button),
  #inventory-panel[data-mode=shop] .shop-catalog-pages button {min-width:44px;min-height:44px;font-size:16px;background-repeat:no-repeat}
  #inventory-panel[data-mode=shop] .shop-body > :is(.shop-product,.shop-order,.shop-payment,.shop-wallet) {
    grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px;font-size:15px;line-height:1.4;
  }
  #inventory-panel[data-mode=shop] #shop-item-title {max-width:none;white-space:normal;font:600 17px/1.3 "Microsoft JhengHei",sans-serif}
  #inventory-panel[data-mode=shop] .shop-order>div {height:auto}
  #inventory-panel[data-mode=shop] :is(.shop-payment,.shop-wallet) b {font-size:15px}
  #inventory-panel[data-mode=shop] .shop-catalog-pages {height:44px;justify-content:center;gap:12px;font-size:15px}
  #inventory-panel[data-mode=shop] #shop-funds {font-size:15px;line-height:1.4}
  #inventory-panel[data-mode=shop] :is(#shop-buy,#shop-cancel) {
    position:static;width:100%;height:auto;min-height:44px;padding:4px 6px;border:1px solid #847758;border-radius:4px;
    background:#354231;color:#f2dfab;font:600 16px/1.3 "Microsoft JhengHei",sans-serif;overflow-wrap:anywhere;
  }
  #inventory-panel[data-mode=shop] :is(#shop-buy,#shop-cancel)::after {content:attr(aria-label)}

  #game-systems[data-mode=skill] {
    zoom:1;inset:var(--hud-top) calc(var(--hud-right) + var(--corner-width) + var(--corner-gap)) auto auto;
    width:min(650px,var(--panel-control-width));height:min(670px,var(--panel-height));margin:0;border-top-width:44px;
  }
  #game-systems[data-mode=skill] > header {top:-43px;height:43px;cursor:default;touch-action:auto}
  #game-systems[data-mode=quest] {
    position:fixed;zoom:1;inset:var(--hud-top) calc(var(--hud-right) + var(--corner-width) + var(--corner-gap)) auto auto;
    margin:0;width:min(580px,var(--panel-control-width));height:min(630px,var(--panel-height));
    max-height:var(--panel-height);padding:0;border:var(--hud-edge);border-radius:6px;
    background:#202a21;color:#f6ebcd;font:16px/1.5 "Microsoft JhengHei",sans-serif;overflow:hidden;
  }
  #game-systems[data-mode=quest] > header {
    flex:none;height:44px;min-height:44px;padding:0 0 0 12px;justify-content:space-between;
    background-size:100% 100%;cursor:default;touch-action:auto;
  }
  #game-systems[data-mode=quest] h2 {font:600 18px/1.35 "Microsoft JhengHei",sans-serif}
  #game-systems[data-mode=quest] .systems-close {position:static;width:44px;height:44px;background-repeat:no-repeat;background-size:20px}
  #game-systems[data-mode=quest] .systems-layout {min-height:0;padding:6px 9px;overflow:auto;overscroll-behavior:contain}
  #game-systems[data-mode=quest] .systems-content {display:flex;flex-direction:column;gap:6px;overflow-wrap:anywhere}
  #game-systems[data-mode=quest] .systems-card {margin:0;padding:8px 10px}
  #game-systems[data-mode=quest] .quest-travel {display:block;min-width:8em;margin-block:4px 8px}
  #game-systems[data-mode=quest] :is(.quest-guide,.quest-login-reward) {order:1}
  #game-systems[data-mode=quest] h3 {font:600 17px/1.4 "Microsoft JhengHei",sans-serif}
  #game-systems[data-mode=quest] :is(.systems-card p,.systems-toolbar,.systems-toolbar label,.systems-toolbar span,input,main button) {font:16px/1.5 "Microsoft JhengHei",sans-serif}
  #game-systems[data-mode=quest] :is(main button,input) {min-height:44px;margin:0;white-space:normal}
  #game-systems[data-mode=quest] button[aria-pressed=true] {outline:2px solid #dfc58d;outline-offset:-2px}
  #game-systems[data-mode=quest] footer {position:static;flex:none;height:auto;min-height:24px;padding:3px 8px;font:14px/1.4 "Microsoft JhengHei",sans-serif}
  #game-systems[data-mode=skill] .systems-close {height:44px;width:44px;background-size:20px;background-repeat:no-repeat;background-position:center}
  #game-systems[data-mode=skill] > footer {position: static; height: auto; flex: none}
  #game-systems[data-mode=skill] .learned-list {height:auto;flex:3 1 0;min-height:0}
  #game-systems[data-mode=skill] .classic-skill-description {flex:2 1 0}
  #game-systems[data-mode=skill] .classic-skill-row {gap:2px;height:auto;min-height:46px}
  #game-systems[data-mode=skill] .classic-skill-toolbar {height:44px;min-height:44px}
  #game-systems[data-mode=skill] .classic-skill-toolbar button {height:44px;width:44px}
  #game-systems[data-mode=skill] .skill-view-tabs button {background-size:44px 132px}
  #game-systems[data-mode=skill] .skill-view-tabs button:hover {background-position:0 -44px}
  #game-systems[data-mode=skill] .skill-view-tabs button[aria-pressed=true] {background-position:0 -88px}
  #game-systems[data-mode=skill] .skill-icon {width:32px;height:32px}
  #game-systems[data-mode=skill] .classic-skill-row :is(.skill-name,span) {white-space:normal;overflow-wrap:anywhere}
  #game-systems[data-mode=skill] .skill-name {min-height:44px}
  #game-systems[data-mode=skill] .classic-skill-row .rank {min-width:28px;font-size:15px}
  #game-systems[data-mode=skill] .rank-arrow {width:44px;min-width:44px;height:44px;background-size:33px 21px;background-repeat:no-repeat;background-position:center}
  #game-systems[data-mode=skill] :is(.skill-use-actions,.skill-learn-actions,.learn-skill) {height:44px;min-height:44px}

  :is(#npc-dialog,#npc-talk,#npc-quest) {width:min(560px,var(--panel-width));height:min(480px,var(--panel-height))}
  #npc-dialog {width:min(420px,var(--panel-width));height:min(390px,var(--panel-height))}
  :is(#npc-dialog,#npc-talk,#npc-quest) .npc-window {padding:0;font:16px/1.5 "Microsoft JhengHei",sans-serif}
  :is(#npc-talk,#npc-quest) .npc-portrait-pane {flex:0 0 min(22%,126px);width:auto;padding:4px}
  :is(#npc-talk,#npc-quest) .npc-portrait {width:100%;height:auto;max-height:100%}
  :is(#npc-talk,#npc-quest) .npc-content-pane {flex:1 1 0;min-height:0;margin:0;padding:3px;gap:5px}
  :is(#npc-talk,#npc-quest) .npc-content-pane > :is(.npc-quest-box,.npc-talk-text,.npc-talk-options) {
    flex:1 1 0;padding:6px 8px;min-height:0;overflow:auto;border:1px solid #746d55;background:#141d16;
  }
  #npc-quest .npc-quest-box {position:relative}
  #npc-quest .npc-page {position:static;justify-content:flex-end}
  :is(#npc-dialog,#npc-talk,#npc-quest) :is(.npc-quest,.npc-option,.npc-menu-buttons button,.npc-quest-actions button,.npc-page-button,.npc-choice) {
    min-height:44px;height:auto;font:16px/1.4 "Microsoft JhengHei",sans-serif;white-space:normal;overflow-wrap:anywhere;
  }
  :is(#npc-talk,#npc-dialog) :is(.npc-option,.npc-quest) {display:flex;align-items:center;width:100%;box-sizing:border-box;flex:none;border-bottom:1px solid #49523e}
  :is(#npc-talk,#npc-quest) :is(.npc-talk-text,.npc-goals,.npc-rewards,.npc-guide,.npc-quest-body,.npc-quest-body p) {font-size:16px;line-height:1.5}
  #npc-quest .npc-quest-actions {flex:none;flex-wrap:wrap;gap:4px;justify-content:space-around}
  #npc-dialog .npc-menu-buttons {gap:8px}
  #npc-talk .npc-text, #npc-quest .npc-text {font:16px/1.5 "Microsoft JhengHei",sans-serif}
  #npc-dialog :is(.npc-message,.npc-quest-list) {width:100%;margin:0}
  #npc-dialog .npc-list-title {font-size:16px;line-height:1.4}
}

@media (pointer: coarse) and (max-width:520px) {
  #game-systems[data-mode=skill] .classic-skill-columns {
    display:flex;flex-direction:column;gap:8px;overflow:auto;overscroll-behavior:contain;
  }
  #game-systems[data-mode=skill] .classic-skill-columns section {flex:none}
  #game-systems[data-mode=skill] :is(.learned-list,.unlearned-list) {height:clamp(112px,19dvh,180px);flex:none}
  #game-systems[data-mode=skill] .classic-skill-description {min-height:64px;max-height:100px;flex:none}
}

@media (pointer: coarse) and (orientation: landscape) {
  #mobile-shortcut-targets .shortcut-target-slots {grid-template-columns:repeat(10,minmax(0,1fr))}
  #active-statuses { right: calc(var(--hud-right) + 90px); top: var(--hud-top); }
  #mobile-hud-stack #classic-chat { width: min(47%, 380px); }
  #mobile-hud-stack #chat-log { height: 44px; padding-block: 2px; line-height: 20px; }
  #mobile-hud-stack #chat-log p { line-height: 20px; }
  #mobile-hud-stack #combat-dock { width: min(100%, 775px); grid-template-columns: repeat(16, minmax(0, 1fr)); }
  #mobile-hud-stack #combat-dock :is(.original-action, #gear-button) { height: 34px; background-size: 33px 33px; }
  #mobile-hud-stack .bottom-center { width: min(100%, 650px); }
  #mobile-hud-stack .bottom-center .skillbar { grid-template-columns: repeat(10, minmax(0, 1fr)) minmax(94px, 125px); }
  #mobile-hud-stack .skillbar .skill { grid-row: 1; }
  #mobile-hud-stack .hotbar-pages { grid-area: 1 / 11 / 2 / 12; align-self: center; }
  #mobile-hud-stack .hotbar-dots { gap: 2px; }
  #mobile-hud-stack .hotbar-dots button { width: 25px; min-width: 0; height: 32px; }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 340px) {
  #mobile-hud-stack #chat-log { height: 24px; }
  #mobile-hud-stack #combat-dock {column-gap:0;grid-template-columns:repeat(16,minmax(29px,1fr));overflow-x:auto}
  body.in-world #mobile-corner {gap:2px}
  .right-hud {transform:scale(.44)}
}

/* 短螢幕分兩欄，聊天在自動戰鬥設定正下方。 */
@media (pointer: coarse) and (max-height: 540px) {
  :root {--corner-width:calc(2 * var(--corner-size) + var(--corner-gap))}
  body.in-world #mobile-corner {
    grid-template-areas:"travel ." "battle skill" "settings bag" "chat quest" "status interface" "transform general";
    column-gap:var(--corner-gap);
  }
  #mobile-travel {grid-area:travel}
  #mobile-auto {grid-area:battle}
  #mobile-auto-settings {grid-area:settings}
  #mobile-chat {grid-area:chat}
  #mobile-status {grid-area:status}
  #mobile-transform {grid-area:transform}
  #mobile-skill {grid-area:skill}
  #mobile-bag {grid-area:bag}
  #mobile-quest {grid-area:quest}
  #mobile-hud-menu {grid-area:interface}
  #mobile-game-settings {grid-area:general}
}

@media (pointer: coarse) {
  #gear-menu {
    width: min(370px, calc(100vw - var(--hud-left) - var(--hud-right)));
    max-height: calc(100dvh - var(--hud-top) - var(--hud-bottom));
    top: calc(50% + (var(--hud-top) - var(--hud-bottom)) / 2);
    left: calc(50% + (var(--hud-left) - var(--hud-right)) / 2);
  }
  #gear-menu header {box-sizing:border-box;height:42px;min-height:42px}
  #gear-menu[data-view=general] .gear-scroll > :is(button,label), #gear-menu[data-view=general] .quality {min-height:44px;font-size:16px}
  #gear-menu[data-view=general] select {font-size:16px}
  #gear-menu #gear-close {width:42px;height:40px;top:0;right:1px;background-size:20px;background-repeat:no-repeat}
  #gear-menu #auto-combat-settings label {min-height:40px}
}

/* 觸控遊戲與登入背景共用完整場景，螢幕鍵盤只調整可輸入的介面。 */
@media (pointer: coarse) {
  html, body {width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
  body {position:fixed;inset:0;touch-action:pan-x pan-y}
  #game, #world, #floating, .vignette, #login-backdrop {
    height:var(--scene-height, 100dvh);
  }
  body, #chat-log, #chat-log *, #model-detail, #model-detail * {
    -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
  }
  body :is(input,textarea,[contenteditable=true]) {
    -webkit-user-select:text;user-select:text;-webkit-touch-callout:default;
  }
  #welcome.character-welcome {
    top:var(--input-view-top, 0px);bottom:auto;height:var(--input-view-height, 100dvh);
    padding:var(--hud-top) var(--hud-right) var(--hud-bottom) var(--hud-left);
    overscroll-behavior:contain;
  }
  #welcome .character-form :is(input:not([type=checkbox]),select) {font-size:16px;min-width:0}
  #welcome .login-row {grid-template-columns:44px minmax(0,1fr) auto}
  #welcome .login-row:nth-child(2) {grid-template-columns:44px minmax(0,1fr)}
  #welcome:has(.character-card[data-stage=account]),
  #welcome:has(.character-card[data-stage=appearance]) {
    display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  }
  #welcome .login-logo {position:relative;inset:auto;width:100%;flex:none;margin:auto auto 10px}
  #welcome .character-card[data-stage=account] {margin:0 auto auto;flex:none}
  #welcome .character-card[data-stage=appearance] {position:relative;inset:auto;flex:none;margin:0 auto;max-width:100%}
  #welcome .character-card[data-stage=appearance] .character-visual {
    position:relative;inset:auto;width:100%;height:min(270px, calc(var(--scene-height, 100dvh) * .48));flex:none;
  }
  #welcome .character-card[data-stage=appearance] .character-form {overflow:visible}
  html[data-typing] #welcome .login-logo {display:none}
  html[data-typing] #welcome .character-card[data-stage=account] {margin:auto}
}

#travel-dialog {
  box-sizing:border-box; width:min(360px,calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-height:calc(var(--scene-height,100dvh) - 26px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding:0; border:1px solid #ac9465; border-radius:8px; margin:auto;
  background:#1c2b24; color:#f7ebce; box-shadow:0 8px 30px #0008;
}
#travel-dialog[open] {display:flex;flex-direction:column}
#travel-dialog::backdrop {background:#0b100b70}
#travel-dialog header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border-bottom:1px solid #83704f}
#travel-dialog h2 {margin:0;font-size:20px;color:#f4d58e}
#travel-map {font-size:14px}
#travel-dialog .travel-scroll {min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 12px 12px;touch-action:pan-y}
#travel-dialog h3 {margin:12px 0 4px;font-size:15px;color:#e4cc95}
#travel-dialog button {min-height:44px;border:1px solid #847251;border-radius:4px;background:#2b3c31;color:inherit;font:inherit;cursor:pointer}
#travel-close {padding:0 12px}
#travel-dialog section button {display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:5px 10px;text-align:left;margin-top:4px}
#travel-dialog section button small {flex:none;color:#e0d4b8;font-size:12px}
#travel-dialog .travel-reason {display:block;margin-top:3px}
#travel-dialog section button:disabled {color:#b4b6a9;background:#2b302c;cursor:default}
#travel-dialog section p {margin:6px 0;font-size:14px}
