/* Geometry measured from the live APK at 960 x 540. */
#panel.apk-window{width:56.25vw;height:100dvh;max-height:100dvh;margin:0 auto;padding:0;border:2px solid #a4c7bd;border-radius:0;background:#093132;overflow:visible;box-shadow:none}
#panel.apk-window header{height:36px;min-height:36px;margin:0;padding:0 8px;justify-content:center;background:#6baca8 url('./native/apk-title-cloud.png') repeat-x center;flex:none;border-bottom:1px solid #7bb0aa}
#panel.apk-window header h2{font:24px Tahoma,Arial,sans-serif;text-align:center;color:#f6fff5;text-shadow:1px 2px #49675f;overflow-wrap:anywhere}
#panel.apk-window #panelBody{overflow:auto;font-size:20px;line-height:1.4;flex:1}
#panel.apk-window #apkContent{padding:0}
#panel.apk-window .apk-tabs{min-height:58px;background:#518486;border-bottom:2px solid #82aba6}
#panel.apk-window .apk-tabs button{min-width:125px;flex:1 0 auto;font-size:22px;white-space:nowrap;padding:6px;color:#f2f3ed}
#panel.apk-window .apk-tabs button.selected{background:#14393b;color:#ff3333;box-shadow:inset 0 0 0 1px #a0b9b3}
#panel.apk-window .apk-table{margin:0;border:0}
#panel.apk-window .apk-table-head{min-height:58px;background:#18494d;font-size:22px;color:#e5e6aa}
#panel.apk-window .apk-table-row,#panel.apk-window .apk-route-row{min-height:60px;background:#17494b;border-top:1px solid #356c70;font-size:22px}
#panel.apk-window .apk-table-row:nth-child(odd){background:#1a5053}
#panel.apk-window .apk-empty{font-size:16px}
#panel.apk-window .inventory-item{min-height:60px;font-size:22px;background:#16494b;border-radius:0;border:1px solid #396e70}
#panel.apk-window .inventory-item.selected{outline:2px solid #aac9c1;outline-offset:-2px}
#panel .game-dialog-actions{position:fixed;right:4px;top:46%;width:92px;height:34%;padding:0;border:0;background:transparent;display:flex;flex-direction:column-reverse;justify-content:space-between;pointer-events:none;z-index:3}
#panel .game-dialog-actions .native-button{width:86px;height:86px;pointer-events:auto}
#panel.legacy-list{width:54vw;max-height:100dvh;height:100dvh;margin:0 auto;padding:0;border-radius:0;overflow:visible;justify-content:center}
#panel.legacy-list #panelBody{overflow:auto}
#panel.legacy-list .legacy-menu-list{gap:4px;padding:0}
#panel.legacy-list .legacy-menu-row{height:56px;min-height:56px;font-size:24px;border-radius:0}
#panel.legacy-list .game-dialog-actions{top:auto;bottom:4px;height:180px}
#panel.legacy-list>.game-dialog-actions{display:none}
#panel.legacy-branch{width:100vw}
#panel.legacy-branch .legacy-parent{width:52vw;margin-left:24vw}
#panel.legacy-branch .legacy-current{position:absolute;left:51.5vw;top:var(--branch-top,20%);width:47vw;max-height:calc(100dvh - var(--branch-top,20%));overflow:auto;z-index:1}
#panel.legacy-branch[data-menu-kind=socialMenu] .legacy-current,#panel.legacy-branch[data-menu-kind=mapMenu] .legacy-current,#panel.legacy-branch[data-menu-kind=shopMenu] .legacy-current{left:20.8vw;width:58.5vw}
#panel.legacy-branch[data-menu-kind=systemMenu] .legacy-current{left:1.5vw;width:50vw}
.apk-setting-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:60px;font-size:22px;background:#194c4e;padding:8px;border-bottom:1px solid #497a7d;gap:8px}
.apk-setting-row select{margin:0;background:transparent;border:0;border-radius:0;padding:4px;color:#f5f6ed;font-size:20px}
.apk-tree-row{background:#17484c;border-bottom:1px solid #387379;color:#eaf1eb}
.apk-tree-row summary{padding:15px 10px;cursor:pointer;min-height:60px;overflow-wrap:anywhere}
.apk-tree-row>div{padding:10px;font-size:16px}
.apk-technique{margin-left:18px;border-top:1px solid #387379;font-size:16px}
.apk-technique summary{min-height:44px;padding:10px;overflow-wrap:anywhere}
.apk-technique .apk-properties{margin:0;padding:8px 12px}
.apk-technique-actions{display:flex;gap:8px;padding:8px 12px;flex-wrap:wrap}
.apk-technique-actions button{min-height:44px;border-radius:0;padding:6px 12px}
.apk-technique-inspection{padding:16px;font-size:18px;overflow-wrap:anywhere}
.apk-technique-inspection h3{font-size:22px;display:flex;align-items:center;gap:10px;margin:0 0 16px}
.apk-technique-inspection h4{font-size:18px;margin:16px 0 8px}
.apk-technique-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}
.apk-technique-effect{color:#f0eb56;white-space:pre-line;margin:0;line-height:1.5}
.apk-technique-learning{padding:16px;font-size:24px;line-height:1.12;overflow-wrap:anywhere;color:#e7eeee;min-height:100%;background:#082f31}
.apk-technique-learning h3{display:flex;align-items:center;gap:8px;font-size:24px;font-weight:400;margin:0 0 40px}
.apk-technique-learning h3 span{min-width:0}
.apk-learning-effects p,.apk-learning-requirements p{margin:0;white-space:pre-line}
.apk-learning-effects{margin-bottom:2px}
.apk-learning-yellow{color:#ffff00}
.apk-learning-green{color:#00ff00}
.apk-learning-white,.apk-learning-met{color:#e7eeee}
.apk-learning-unmet{color:#ff0000}
.apk-technique-learning #learnTechnique{border:3px double #9bbcb7;border-radius:0;background:#819795;color:#fff;font-size:24px;min-height:60px;min-width:150px;margin-top:8px;text-shadow:1px 2px #314f4d}
.apk-technique-learning #techniqueLearningStatus{font-size:16px;color:#eee8b0;line-height:1.35}
.apk-technique-name{display:inline}
.apk-technique-progress{white-space:nowrap;margin-left:8px}
.apk-wudang-technique{font-size:26px;line-height:1.1;color:#e7eeee}
.apk-wudang-technique h3{font-size:26px;font-weight:400;margin-bottom:16px}
.apk-wudang-technique.apk-technique-learning h3{margin-bottom:16px}
.apk-wudang-technique.apk-technique-inspection h3{margin-bottom:32px}
.apk-wudang-technique .apk-technique-stats{display:flex;flex-direction:column;gap:28px;margin-bottom:16px}
.apk-wudang-technique .apk-technique-stats span:nth-child(2){align-self:flex-end}
.apk-wudang-technique .apk-technique-effect{font-size:26px;line-height:1.1;color:#e7eeee}
.apk-wudang-technique.apk-am-duong .apk-learning-effects p{color:#e7eeee}
@media(max-width:600px),(max-height:450px){.apk-wudang-technique,.apk-wudang-technique h3,.apk-wudang-technique .apk-technique-effect{font-size:18px}.apk-wudang-technique .apk-technique-stats{gap:20px}}
@media(max-width:600px),(max-height:450px){.apk-technique-learning{font-size:18px;padding:12px}.apk-technique-learning h3{font-size:20px;margin-bottom:24px}.apk-technique-learning #learnTechnique{font-size:20px;min-height:44px;min-width:120px}}
@media(max-width:400px){.apk-technique-inspection{font-size:16px;padding:12px}.apk-technique-inspection h3{font-size:18px}.apk-technique-stats{gap:12px}}
.apk-resource{padding:10px;border-bottom:1px solid #73999a;color:#e1e8a8}
.apk-search{display:flex;gap:8px;padding:8px;align-items:center;flex-wrap:wrap}
.apk-search input{width:72px;min-width:0;padding:6px;background:#071f20;border-radius:0}
.apk-search button{border-radius:0;min-height:38px;padding:6px 12px}
.apk-pagination{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px}
.apk-pagination button{padding:4px 20px;border-radius:0;font-size:24px}
.apk-item-actions{position:sticky;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#173c3d;padding:4px;gap:2px;border:2px ridge #89aba5;z-index:2}
.apk-item-actions button{padding:8px 2px;font-size:16px;border-radius:0;overflow-wrap:anywhere}
.apk-support{padding:16px}.apk-support textarea{display:block;width:100%;min-height:180px;background:#163d3e;color:#fff;margin-top:12px;font:16px Tahoma,Arial,sans-serif}
.apk-guide-welcome{padding:16px;font-size:20px}.apk-guide-choice{width:100%;text-align:left;border-radius:0;background:#164448;padding:12px;min-height:60px;font-size:20px}
.apk-week-row{width:100%;text-align:left;border-radius:0;background:#164448;color:#62e98f;padding:14px;font-size:22px;min-height:60px}
.apk-week-row.today{color:#ff4242}.apk-region{position:relative}.apk-region:before,.apk-region:after{content:'';position:absolute;background:#ffd74e;pointer-events:none}.apk-region:before{left:50%;top:0;bottom:0;width:1px}.apk-region:after{top:50%;left:0;right:0;height:1px}
.apk-character-identity{padding:8px;text-align:center;font-size:16px}.apk-chat-compose{padding:8px;display:flex;gap:8px}.apk-chat-compose input{min-width:0}.apk-chat-log{height:auto;min-height:150px;padding:10px;font-size:16px}
@media(orientation:landscape) and (max-height:420px){
  #panel.apk-window header{height:28px;min-height:28px}#panel.apk-window header h2{font-size:18px}
  #panel.apk-window .apk-tabs{min-height:40px}#panel.apk-window .apk-tabs button{font-size:16px;min-width:80px}
  #panel.apk-window .apk-table-head,#panel.apk-window .apk-table-row,#panel.apk-window .apk-route-row,#panel.apk-window .inventory-item{min-height:42px;font-size:16px}
  #panel.legacy-list .legacy-menu-row{height:36px;min-height:36px;font-size:17px}
  #panel .game-dialog-actions{width:58px}#panel .game-dialog-actions .native-button{width:54px;height:54px}
  #panel.legacy-list .game-dialog-actions{height:116px}.apk-setting-row{min-height:42px;font-size:16px}.apk-setting-row select{font-size:16px}
  .apk-tree-row summary,.apk-week-row,.apk-guide-choice{min-height:42px;font-size:16px;padding:9px}.apk-guide-welcome{font-size:16px}
}
@media(orientation:portrait){
  #panel.apk-window{width:calc(100vw - 16px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);margin:6px auto;overflow:hidden}
  #panel.apk-window header h2{font-size:20px}#panel.apk-window .apk-tabs{min-height:44px}#panel.apk-window .apk-tabs button{font-size:14px;min-width:80px}
  #panel.apk-window .apk-table-head,#panel.apk-window .apk-table-row,#panel.apk-window .apk-route-row,#panel.apk-window .inventory-item{min-height:48px;font-size:16px}
  #panel .game-dialog-actions{position:static;flex-direction:row;width:auto;height:64px;min-height:64px;padding:4px 10px;border-top:1px solid #81a9a5;flex:none}
  #panel .game-dialog-actions .native-button{width:56px;height:56px}
  #panel.legacy-list{width:calc(100vw - 16px);height:auto;max-height:calc(100dvh - 12px)}
  #panel.legacy-list .legacy-menu-row{height:48px;min-height:48px;font-size:18px}
  #panel.legacy-branch .legacy-parent{display:none}#panel.legacy-branch .legacy-current{position:static;width:auto!important;max-height:none}
  #panel.legacy-list .game-dialog-actions{height:64px}
  .apk-setting-row{min-height:48px;font-size:16px}.apk-setting-row select{font-size:16px}.apk-week-row,.apk-guide-choice{font-size:16px}
}
/* Shared shortcut and label columns on the LD popup. Unnumbered entries keep the same inset. */
#toast.game-general-notice.native-menu-notice{
  --ld-notice-unit:min(.10416667vw,.18518519dvh);
  width:calc(540 * var(--ld-notice-unit));
  min-height:calc(46 * var(--ld-notice-unit));
  max-width:calc(100vw - 16px);
  margin:0;
  padding:calc(4 * var(--ld-notice-unit)) calc(12 * var(--ld-notice-unit));
  display:grid;
  place-content:center;
  border:calc(3 * var(--ld-notice-unit)) ridge #adc6bf;
  background:#0a3032;
  color:#e6ecea;
  text-align:center;
  font:calc(27 * var(--ld-notice-unit))/1.15 InventoryLD,Tahoma,Arial,sans-serif;
  text-shadow:1px 2px #263532;
}
#panel.legacy-list .legacy-menu-row{
  display:grid;
  grid-template-columns:max-content minmax(0,1fr);
  align-content:center;
  justify-content:start;
  text-align:left;
}
#panel.legacy-list .legacy-menu-row .menu-key{display:inline-grid;place-items:center;text-align:center}
#panel.legacy-list .legacy-menu-row .menu-key:empty{visibility:hidden}
#panel.legacy-list .legacy-menu-row .menu-label{align-self:center}
/* 960×540 LD reference: main menu width 502 px, system menu width 566 px. */
@media(orientation:landscape){
  #panel.legacy-list{--ld-menu-unit:min(.10416667vw,.18518519dvh)}
  #panel.legacy-list[data-menu-kind=menu]{width:calc(502 * var(--ld-menu-unit))}
  #panel.legacy-list[data-menu-kind=menu] .legacy-current,
  #panel.legacy-branch .legacy-parent[data-parent-kind=menu]{position:relative;top:calc(-5 * var(--ld-menu-unit))}
  #panel.legacy-list[data-menu-kind=settings]{width:calc(566 * var(--ld-menu-unit))}
  #panel.legacy-branch{max-width:none}
  #panel.legacy-branch .legacy-parent[data-parent-kind=menu]{width:calc(502 * var(--ld-menu-unit));margin-inline:auto}
  #panel.legacy-branch .legacy-parent[data-parent-kind=settings]{width:calc(566 * var(--ld-menu-unit));margin-inline:auto}
  #panel.legacy-branch[data-menu-kind=mapMenu] .legacy-current{
    left:max(0px,calc(50% - 470 * var(--ld-menu-unit)));
    width:calc(486 * var(--ld-menu-unit));
  }
  #panel.legacy-branch[data-menu-kind=systemMenu] .legacy-current{
    left:max(0px,calc(50% - 465 * var(--ld-menu-unit)));
    width:calc(481 * var(--ld-menu-unit));
  }
  #panel.legacy-branch[data-menu-kind=characterMenu] .legacy-current,
  #panel.legacy-branch[data-menu-kind=guildMenu] .legacy-current,
  #panel.legacy-branch[data-menu-kind=questMenu] .legacy-current{
    left:calc(50% + 14 * var(--ld-menu-unit));
    width:calc(460 * var(--ld-menu-unit));
  }
  #panel.legacy-branch[data-menu-kind=questMenu] .legacy-current{width:calc(440 * var(--ld-menu-unit))}
  #panel.legacy-branch[data-menu-kind=socialMenu] .legacy-current{
    left:calc(50% - 282 * var(--ld-menu-unit));
    width:calc(564 * var(--ld-menu-unit));
  }
  #panel.legacy-list .legacy-menu-list{gap:calc(2.5 * var(--ld-menu-unit))}
  #panel.legacy-list .legacy-menu-row{
    height:calc(59 * var(--ld-menu-unit));
    min-height:calc(59 * var(--ld-menu-unit));
    font-size:calc(27 * var(--ld-menu-unit));
    border-width:calc(4 * var(--ld-menu-unit));
    padding:0 2% 0 22%;
    column-gap:calc(3 * var(--ld-menu-unit));
  }
  #panel.legacy-list .menu-key{
    font-size:calc(15 * var(--ld-menu-unit));
    line-height:calc(18 * var(--ld-menu-unit));
    min-width:calc(13 * var(--ld-menu-unit));
  }
}
@media(orientation:portrait){
  #panel.legacy-list .legacy-menu-row{padding-inline:12% 4%}
  #panel.legacy-list .menu-key{min-width:12px}
}
