/*固定*/
body{
  margin:0px;
  padding:0px;
  font-family: Microsoft JhengHei;
  background:#E7EFEF url('images/map_E7EFEF.gif');
}

/* 手機專用的艦長摘要與底部任務導覽；桌面仍使用原本三欄主畫面。 */
#mobile_game_header,
#mobile_game_nav{ display:none; }

table{
  border-collapse:collapse;
}

img{
  vertical-align: middle;
  image-rendering:-moz-crisp-edges;
  image-rendering:-o-crisp-edges;
  image-rendering:-webkit-optimize-contrast;
  image-rendering:crisp-edges;
  image-rendering:pixelated;
}

/*通用*/
.ml5{
  margin-left: 5px;
}

.Panel_w{
  background-color: rgba(255, 255, 255, 0.8);
}

.BG_map_C6EFFF{
  padding-left: 10px;
  background:#C6EFFF url('images/map_C6EFFF.gif');
}

.error-message{
margin: 4px 0 0 0;
padding: 0;
background-color: #F1DEDE;
color: #B15A5A;
}

.PersonRemove_icon{
  margin:0px auto;
  width: 24px;
  height: 24px;
  background:url('images/PersonRemove_icon.png') no-repeat center center;
  cursor: pointer;
}

.icon_field{
  float:left;
  width: 100px;
  line-height:24px;
}

.trashcan_icon{
  float:right;
  width: 24px;
  height: 24px;
  background:url('images/trashcan_icon.png') no-repeat center center;
  cursor: pointer;
}

.List_icon{
  float:right;
  width: 24px;
  height: 24px;
  background:url('images/list_icon.png') no-repeat center center;
  cursor: pointer;
}

.wList_icon{
  float:right;
  width: 24px;
  height: 24px;
  background:url('images/wlist_icon.png') no-repeat center center;
  cursor: pointer;
}

/*微改Easyui設定*/
.textbox .textbox-text{
  height: 25px;
  background-color:aliceblue;
}



/*遊戲主頁*/
#MainLayout{
  display: none;
  margin:0px auto;
  padding:0px;
  background:#C6EFFF url('images/map_C6EFFF.gif');
}

/*左側畫面*/

#MAP_DIV{
  width:200px;
  height:150px;
  margin-bottom:6px; /* 左欄分成 地圖／艦長／行動 三個區塊，間隔 6px */
  position: relative;
}

/* 世界地圖：worldmap.png 以程式重新上色為羊皮紙色調（地形像素位置不變，#Map_pointer 座標照常對齊）；
   黃銅框用 inset 陰影繪製，不改變 200×132 的尺寸 */
#Map_IMG{
  width: 200px;
  height: 132px;
  background:#E8D9B0 url('images/uw_worldmap.png') no-repeat center center;
  border-radius:6px;
  box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6), inset 0 0 10px rgba(60,35,10,.35);
  position: absolute;
  left: 0;
  bottom: 0;
}

#Map_pointer{
  position:relative;
  width: 4px;
  height: 4px;
  background:url('images/pointer.gif');
}

#Player_Title,#Lv_Title{
  background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center top;
  background-size:cover;
}

#Player_Table,#Player_Lv_Table,#Lv_Table{
  width:200px;
  height:auto;
}

/* 統一表格框線顏色 */
.Status_table,
#Port_info {
  border: 1px solid #d0dce8;
}
.Status_table td,
#Port_info td {
  border: 1px solid #d0dce8;
}

.Status_table td{
  height:25px;
  padding:0px;
}
.Status_table td.IMG_TD{
  vertical-align: middle;
  text-align:center;
  width:50px;
  height:50px;
  background-color:#C5D9F1;
}
.Status_table td.TITLE_TD{
  text-align:center;
  background-color:#16365C;
  color:#C5D9F1;
}

.NeedGoodsName{

  color:#C99367;
  text-shadow: 1px 1px 1px rgba(201, 147, 103, 0.5);
  font-weight:900;
}

.Status_table td.TH_TD{
  text-align:center;
  width:66px;
  background-color:#CDE7FE;
  color:#08398C;
  text-shadow: 1px 1px 1px rgba(8, 57, 140, 0.5);
  font-weight:900;
}
.Status_table td.center_TD{
text-align:center;
}

/* 行動／資訊面板：大航海風格（羊皮紙海圖背景、木板與黃銅銘牌按鈕，圖檔為 2 倍解析度） */
#Action_Title,#Info_Title{
  text-align:center;
  background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center;
  background-size:cover;
}

#Action_Title button,#Info_Title button{
  border:0;
  font-size: 14pt;
  font-weight:bold;
  letter-spacing:2px;
  cursor:pointer;
  background-color:transparent;
  background-repeat:no-repeat;
  background-position:center center;
  filter:drop-shadow(0 2px 2px rgba(60, 35, 10, 0.35));
  transition:filter .15s, transform .15s;
}
#Action_Title button:hover,#Info_Title button:hover{
  filter:drop-shadow(0 3px 3px rgba(60, 35, 10, 0.45)) brightness(1.08);
  transform:translateY(-1px);
}
#Action_Title button:active,#Info_Title button:active{
  filter:drop-shadow(0 1px 1px rgba(60, 35, 10, 0.35)) brightness(0.95);
  transform:translateY(1px);
}
#Action_Title button:disabled,#Info_Title button:disabled{
  filter:grayscale(0.8) opacity(0.6);
  transform:none;
  cursor:default;
}

#Action_Title button{
  width: 150px;
  height: 38px;
  padding-left:22px;
  color:#F6E7C1;
  text-shadow: 1px 1px 2px rgba(30, 15, 0, 0.9);
  background-image:url('images/uw_btn_action.png');
  background-size:150px 38px;
}

/* 手機設施抽屜的關閉鈕；桌面不顯示（桌面維持原本六個直向按鈕＋右欄設施畫面）。 */
#mobile_facility_close{ display:none; }
@keyframes mobileFacilityIn{ from{ transform:translateY(100%); } to{ transform:none; } }

/* 手機設施抽屜的載入層：抽屜開啟時才存在於畫面；body.mobile-facility-loading 時不透明，載入完成後 .3 秒淡出
   （transition 寫在「完成」狀態，所以出現時立即蓋住、消失時才淡出） */
#mobile_facility_loading{ display:none; }
@media (max-width:767px), (max-height:520px) and (pointer:coarse){
  body.game-mobile-view-action.mobile-facility-open:not(.is-sailing):not(.is-ambush) #mobile_facility_loading{
    position:fixed;
    inset:0 0 var(--mobile-nav-h, 0px) 0;
    z-index:900;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:14px;
    padding-top:env(safe-area-inset-top);
    box-sizing:border-box;
    background:radial-gradient(ellipse at center, rgba(33,17,6,.25) 0%, rgba(33,17,6,.55) 75%), #C6EFFF url('images/map_C6EFFF.gif');
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .3s ease-out, visibility 0s linear .3s;
  }
  body.game-mobile-view-action.mobile-facility-open.mobile-facility-loading:not(.is-sailing):not(.is-ambush) #mobile_facility_loading{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition:none;
  }
  /* 只有剛打開抽屜時跟著抽屜一起滑入；抽屜內切換設施時直接蓋上 */
  body.mobile-facility-opening #mobile_facility_loading{ animation:mobileFacilityIn .26s cubic-bezier(.2,.8,.2,1); }
  #mobile_facility_loading .gl-spin{ background:radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); border-color:rgba(232,199,122,.35); border-top-color:#f3dd9a; }
  #mobile_facility_loading .mfl-txt{
    padding:5px 16px;
    border-radius:4px;
    color:#F6E7C1;
    font-size:14px;
    font-weight:700;
    letter-spacing:.12em;
    background:linear-gradient(180deg,#4a2d15,#2a1709);
    border:1px solid #b8892e;
    box-shadow:0 2px 6px rgba(24,12,3,.45);
  }
}
@media (prefers-reduced-motion:reduce){
  body.mobile-facility-open #mobile_facility_loading{ animation:none !important; transition:opacity .15s linear, visibility 0s linear .15s !important; }
}

/* 桌面版：行動選單進入設施時，只在右側 east 面板蓋載入層；位置由 corejs/MainLayout.js deskFacilityLoading 依 east 面板量測。
   出現時立即蓋住，載入完成後 .3 秒淡出（同手機抽屜載入層） */
#desk_facility_loading{
  position:absolute;
  z-index:800;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding-top:150px; /* east 面板高 900，設施內容集中在上方，載入圖示放在內容區附近 */
  box-sizing:border-box;
  /* 與右側面板平常的底色一致：頁面淺色地圖（body）＋ .Panel_w 的 80% 白；地圖對位由 JS 設定 background-position */
  background:linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,.8)), #E7EFEF url('images/map_E7EFEF.gif');
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .3s ease-out, visibility 0s linear .3s;
}
#desk_facility_loading.is-on{ opacity:1; visibility:visible; pointer-events:auto; transition:none; }
#desk_facility_loading .gl-spin{ background:radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); border-color:rgba(232,199,122,.35); border-top-color:#f3dd9a; }
#desk_facility_loading .dfl-txt{
  padding:4px 14px;
  border-radius:4px;
  color:#F6E7C1;
  font-size:13px;
  font-weight:700;
  letter-spacing:.12em;
  background:linear-gradient(180deg,#4a2d15,#2a1709);
  border:1px solid #b8892e;
  box-shadow:0 2px 6px rgba(24,12,3,.45);
}
@media (max-width:767px), (max-height:520px) and (pointer:coarse){
  #desk_facility_loading{ display:none; }
}
@media (prefers-reduced-motion:reduce){
  #desk_facility_loading{ transition:opacity .15s linear, visibility 0s linear .15s; }
}

/* ── 進入遊戲的 Loading 遮罩（page.MainLayout.php #game_loading；corejs/Player.js GameLoading_Done 淡出）──
   z-index 低於 EasyUI 對話框（9000 起），載入中若有錯誤提示仍看得到 */
#game_loading{
  position:fixed;
  inset:0;
  z-index:8990;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-sizing:border-box;
  background:radial-gradient(ellipse at center, rgba(74,45,21,.35) 0%, rgba(20,10,3,.85) 70%), #211106 url('images/map_C6EFFF.gif');
  background-blend-mode:multiply;
  opacity:1;
  transition:opacity .5s ease-out, visibility 0s linear .5s;
}
#game_loading.is-done{ opacity:0; visibility:hidden; pointer-events:none; }
#game_loading .gl-box{ display:flex; flex-direction:column; align-items:center; gap:18px; text-align:center; }
#game_loading .gl-logo{ display:block; width:min(280px, 72vw); height:auto; filter:drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.gl-spin{
  position:relative;
  width:44px;
  height:44px;
  border-radius:50%;
  border:3px solid rgba(232,199,122,.22);
  border-top-color:#f3dd9a;
  box-shadow:0 0 12px rgba(243,221,154,.25);
  animation:glSpin 1s linear infinite;
}
.gl-spin i{ position:absolute; inset:9px; border-radius:50%; background:url('images/uw_ic_anchor.png') no-repeat center / 20px 20px; animation:glSpin 1s linear infinite reverse; }
#game_loading .gl-txt{ color:#e8d6b0; font-size:14px; font-weight:700; letter-spacing:.12em; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
@keyframes glSpin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){
  #game_loading{ transition:opacity .2s linear, visibility 0s linear .2s; }
  .gl-spin,
  .gl-spin i{ animation:none; }
}

#Info_Title button{
  width: 117px;
  height: 37px;
  padding-left:8px;
  color:#5A3412;
  text-shadow: 1px 1px 0 rgba(255, 248, 225, 0.7);
  background-image:url('images/uw_btn_info.png');
  background-size:117px 37px;
}

/* 行動／資訊、艦長／名聲經驗分頁標籤：選中為羊皮紙（與下方面板相連），未選中為船板木 */
/* 左欄兩組分頁各自為一個圓角區塊（四角 6px，與地圖相同）；標籤列本身透明，只顯示標籤圖 */
#PlayerStatus_tab,
#Action_tab{
  border-radius:6px;
  overflow:hidden;
}
#Action_tab{ margin-top:6px; }
/* 艦長、行動兩區塊加上與世界地圖相同的黃銅框：以覆蓋層繪製（子面板有底色會蓋住 inset 陰影），不擋點擊 */
#PlayerStatus_tab,
#Action_tab{ position:relative; }
#PlayerStatus_tab::after,
#Action_tab::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:5;
  border-radius:6px;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6), inset 0 0 10px rgba(60,35,10,.35);
}
/* 中央：港口卡、艦隊海面、艦隊資訊卡、聊天室，同樣的黃銅框（覆蓋層繪製、不擋點擊）。
   原本有 1px 框的區塊：框線改為深木色當作最外圈，覆蓋層補上黃銅線與內陰影，尺寸不變 */
#MainLayout #loc_card,
#MainLayout .Panel_w > .ship_img_area,
#MainLayout .ship_info_area > .fi-card,
#MainLayout #ingame_chat_panel{ position:relative; }
#MainLayout #loc_card,
#MainLayout .ship_info_area > .fi-card,
#MainLayout #ingame_chat_panel{
  border-color:#5a3a1c;
  box-shadow:0 2px 4px rgba(60,35,10,.3);
}
#MainLayout #loc_card::after,
#MainLayout .Panel_w > .ship_img_area::after,
#MainLayout .ship_info_area > .fi-card::after,
#MainLayout #ingame_chat_panel::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:5;
  border-radius:5px;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px #c9a24a, inset 0 0 0 2px rgba(90,58,28,.6), inset 0 0 10px rgba(60,35,10,.35);
}
#MainLayout .Panel_w > .ship_img_area::after{
  border-radius:6px;
  box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6), inset 0 0 10px rgba(60,35,10,.35);
}
/* 右側行動設施（啟航、交易所、造船廠、酒館、城鎮、海上、航行中）：每個區塊同樣的黃銅框。
   原本畫在內層（交易所、造船廠、海上選單）的框線移到外層覆蓋層，避免重疊變深 */
#MainLayout .mv-section,
#MainLayout #TRADE_LIST_BG,
#MainLayout #TRADE_TAB_BG_O,
#MainLayout #YARD_MAIN_DIV,
#MainLayout #BAR_Tab,
#MainLayout #city_dom_panel,
#MainLayout .Battle_out_bg,
#MainLayout .voy{ isolation:isolate; }
#MainLayout .mv-section,
#MainLayout #TRADE_LIST_BG,
#MainLayout #TRADE_TAB_BG_O,
#MainLayout #YARD_MAIN_DIV,
#MainLayout #BAR_Tab,
#MainLayout #city_dom_panel,
#MainLayout .voy{ position:relative; }
#MainLayout .mv-section,
#MainLayout #city_dom_panel,
#MainLayout .voy{
  border-color:#5a3a1c;
  box-shadow:0 2px 4px rgba(60,35,10,.3);
}
#MainLayout .Battle_menu,
#MainLayout #YARD_MAIN_MENU.bar-pane,
#MainLayout #TRADE_LIST_BG .tr-pane,
#MainLayout #TRADE_TAB_BG_O > .TAB_BG_I{ box-shadow:none; }
#MainLayout .mv-section::after,
#MainLayout #city_dom_panel::after,
#MainLayout .voy::after,
#MainLayout #TRADE_LIST_BG::after,
#MainLayout #TRADE_TAB_BG_O::after,
#MainLayout #YARD_MAIN_DIV::after,
#MainLayout #BAR_Tab::after,
#MainLayout .Battle_out_bg::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:100;
  border-radius:5px;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px #c9a24a, inset 0 0 0 2px rgba(90,58,28,.6), inset 0 0 10px rgba(60,35,10,.35);
}
#MainLayout #TRADE_LIST_BG::after,
#MainLayout #TRADE_TAB_BG_O::after,
#MainLayout #YARD_MAIN_DIV::after,
#MainLayout #BAR_Tab::after,
#MainLayout .Battle_out_bg::after{
  border-radius:6px;
  box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6), inset 0 0 10px rgba(60,35,10,.35);
}
#Action_tab > .tabs-header,
#PlayerStatus_tab > .tabs-header{
  border:0;
  background:transparent;
}
#Action_tab > .tabs-header .tabs,
#PlayerStatus_tab > .tabs-header .tabs{ border:0; }
#Action_tab > .tabs-header .tabs li .tabs-inner,
#PlayerStatus_tab > .tabs-header .tabs li .tabs-inner{
  border:0;
  color:#F6E7C1;
  font-weight:bold;
  letter-spacing:2px;
  text-shadow:1px 1px 2px rgba(30, 15, 0, 0.9);
  background:url('images/uw_tab_off.png') no-repeat center bottom;
  background-size:100% 100%;
  transition:filter .15s;
}
#Action_tab > .tabs-header .tabs li .tabs-inner:hover,
#PlayerStatus_tab > .tabs-header .tabs li .tabs-inner:hover{
  color:#FFF4D6;
  background:url('images/uw_tab_off.png') no-repeat center bottom;
  background-size:100% 100%;
  filter:brightness(1.15);
}
#Action_tab > .tabs-header .tabs li.tabs-selected .tabs-inner,
#PlayerStatus_tab > .tabs-header .tabs li.tabs-selected .tabs-inner,
#Action_tab > .tabs-header .tabs li.tabs-selected .tabs-inner:hover,
#PlayerStatus_tab > .tabs-header .tabs li.tabs-selected .tabs-inner:hover{
  border:0;
  color:#5A3412;
  text-shadow:1px 1px 0 rgba(255, 248, 225, 0.7);
  background:url('images/uw_tab_on.png') no-repeat center bottom;
  background-size:100% 100%;
  filter:none;
}
#Action_tab > .tabs-header .tabs-title,
#PlayerStatus_tab > .tabs-header .tabs-title{ font-size:14px; }
#Action_tab > .tabs-header .tabs li.tabs-disabled,
#PlayerStatus_tab > .tabs-header .tabs li.tabs-disabled{ opacity:0.55; }
#Action_tab > .tabs-header .tabs li.tabs-disabled .tabs-inner,
#PlayerStatus_tab > .tabs-header .tabs li.tabs-disabled .tabs-inner{
  color:#BFB6A4;
  filter:grayscale(1) brightness(0.75);
  cursor:default;
}

/*中間畫面*/
#PortArea_Title,#MoveShip{
  width:500px;
  height:50px;
  position: relative;
}

/* 中間欄標題列（艦隊／航行中）：沿用艦長名牌的木板黃銅框，九宮格切片拉成 500×35 */
.information_title{
  box-sizing:border-box;
  width: 500px;
  height: 35px;
  border:8px solid transparent;
  border-image:url('images/uw_plate_captain.png') 24 fill / 12px stretch;
  text-align:center;
  font-size: 19px;
  line-height:19px;
  letter-spacing:8px;
  color:#F6E7C1;
  text-shadow: 1px 1px 2px rgba(20, 10, 0, 0.9);
  font-weight:900;
}
/* 「艦隊」標題列下方留空隙，與 .loc-card 的 margin-bottom 一致（航行中標題為絕對定位，不受影響） */
.information_title:not(.align_bottom){ margin-bottom:4px; }

.align_bottom{
  position: absolute;
  left: 0;
  bottom: 0;
}

#Port_info{
  width:500px;
  height:100px;
}
#Port_info td.TH_TD{
  vertical-align: middle;
  text-align:center;
  width:100px;
  height:25px;
  background-color:#CDE7FE;
  color:#08398C;
  text-shadow: 1px 1px 1px rgba(8, 57, 140, 0.5);
  font-weight:900;
}

.ship_img_area{
  width:250px;
  height:275px;
  background-color:#1158B3;
  border-radius:6px; /* 與右側 .fi-card 同為 6px 圓角 */
  overflow:hidden;
}

.FL{
  float:left;
}

.battle_ship_img_area{
  width:250px;
  height:250px;
  background-color:#1158B3;
}

.battle_status_table td {
  border:1px #808080 solid;
    vertical-align:middle;
    height: 25px;
    padding: 0px;
    width: 50px;
}

.battle_status_table td.IMG_TD{
  vertical-align: middle;
  text-align:center;
  width:50px;
  height:50px;
  background-color:#C5D9F1;
}

.battle_status_table td.TH_TD {
    width: 50px;
    text-align: center;
    background-color: #CDE7FE;
    color: #08398C;
    text-shadow: 1px 1px 1px rgba(8, 57, 140, 0.5);
    font-weight: 900;
}
.battle_status_table td.center_TD{
text-align:center;
}
.battle_status_table td.money_TD{
  width: 100px;
text-align:left;
}

.ship_table{
  margin:0;padding:0;
  width:250px;
  max-width:250px;
  border-collapse: collapse;
  text-align:center;
  background:url('ship/sea.gif');
}

.ship_table td{
	margin:0;padding:0;
  border:0px;
  width: 50px;
  max-width: 50px;
  height:50px;
  max-height: 50px;
  vertical-align:middle;
}




.ship_img_title{
  box-sizing:border-box;
  width:250px;
  height:25px;
  padding:0 2px 0 6px;
  line-height:23px;
  font-size:12px;
  font-weight:700;
  letter-spacing:1px;
  background:linear-gradient(180deg,#4a2d15,#2a1709);
  border-bottom:2px solid #b8892e;
  color:#F6E7C1;
  text-shadow:1px 1px 1px rgba(20,10,0,.8);
}
.ship_img_title .wList_icon{ margin-top:-1px; border-radius:4px; background:url('images/uw_ic_fleetlist.png') no-repeat center center; background-size:20px 20px; transition:background-color .15s; }
.ship_img_title .wList_icon:hover{ background-color:rgba(232,199,122,.25); }

#ship_table{
  margin:0;padding:0;
  width:250px;
  max-width:250px;
  border-collapse: collapse;
  text-align:center;
  background:url('ship/sea.gif');
}

#ship_table td{
	margin:0;padding:0;
  border:0px;
  width: 50px;
  max-width: 50px;
  height:50px;
  max-height: 50px;
  vertical-align:middle;
}

.ship_img{
    width: 50px;
  max-width: 50px;
}

.ship_img_div_L{
  position:relative;
}

.ship_img_div_R,.T180{
  position:relative;
  -moz-transform:scaleX(-1);
  -webkit-transform:scaleX(-1);
  -o-transform:scaleX(-1);
  transform:scaleX(-1);
}

.ship_hp_bar_wrap{
  position:absolute;
  bottom:2px;left:2px;right:2px;
  height:4px;
  background:rgba(0,0,0,0.4);
  border-radius:2px;
  pointer-events:none;
}

.ship_img_div_R .ship_hp_bar_wrap{
  transform:scaleX(-1);
}
.ship_hp_bar{
  height:100%;
  border-radius:2px;
  transition:width 0.3s;
}



.ship_info_area{
  width:240px;
  height:275px;
}
#tactics_area{
  float:left;
  display:flex;
  align-items:center;
  gap:4px;
  font-size:12px;
  color:#fff;
  margin-left:6px;
}
#tactics_select{
  font-size:12px;
  height:19px;
  padding:0 2px;
  color:#3b2412;
  background:#f3e6c4;
  border:1px solid #b8892e;
  border-radius:3px;
}
.FR{
  float:right;
}

.FRMR10{
  float:right;
  margin-right: 10px;
}

.Ship_Info_Table{
  width:240px;
  height:250px;
}

.YARD_Ship_Info_Table{
  width:250px;
  height:250px;
}

#ACTION_TITLE{
  background:url('images/bl_300x50.png') no-repeat center center;
  width: 100%;
  height: 50px;
  padding-top: 15px;
  border:0;
  text-align:center;
  text-shadow: 1px 1px 1px rgba(8, 57, 140, 0.5);
  color:#08398C;
  font-size: 18pt;
  /*
  color:#4A4A4A;
  text-shadow: 1px 1px 1px rgba(74, 74, 74, 0.5);
  */
  font-weight:bold;
}

/* 造船廠主選單（大航海風格）：保留 YARD.png 背景與遮罩，背景由 ::before 以 luminosity 混合成牛皮紙色調（同海上介面） */
#YARD_MAIN_DIV{
  position:relative;
  width:297px;
  height:218px;
  border-radius:6px;
  overflow:hidden;
  background:#b39a6a;
}
#YARD_MAIN_DIV::before{
  content:'';
  position:absolute;
  left:0; top:0; right:0; bottom:0;
  background:url('images/YARD.png') no-repeat center center, #dcc28c;
  background-blend-mode:luminosity;
  filter:brightness(1.3) contrast(.9) saturate(.75);
}

#YARD_MAIN_MENU{
  position:relative;
  width:297px;
  height:218px;
}







/* 海上（page.Action.Battle.php）：保留 sea.gif 海面與隨機位置的船艦，以 CSS 調成牛皮紙色調（大航海風格）。
   海面改由 ::before 繪製：luminosity 混合只取海浪明暗、色相取自牛皮紙底色，濾鏡也不會影響上層按鈕 */
.Battle_out_bg{
  position: absolute;
  width:297px;
  height:218px;
  border-radius:6px;
  overflow:hidden;
  background:#b39a6a;
}
.Battle_out_bg::before{
  content:'';
  position:absolute;
  left:0; top:0; right:0; bottom:0;
  background:url('ship/sea.gif'), #dcc28c;
  background-blend-mode:luminosity;
  filter:brightness(1.55) contrast(.9) saturate(.75);
}
.Battle_out_bg > .ship_img_div,
.Battle_out_bg > .ship_img_div_R{ filter:sepia(.45) saturate(.9); }
.Battle_in_bg{
  position:absolute;
  z-index:2;
}
.Battle_menu{
  position:absolute;
  z-index:99;
  width:100%;
  height:100%;
  border-radius:6px;
  background:radial-gradient(ellipse at center, rgba(90,58,28,0) 45%, rgba(90,58,28,.28) 100%), rgba(240,228,196,.4);
  box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6);
  text-align:center;
}

.Battle_menu a{
  margin-top:20px
}
/* 海上按鈕（EasyUI linkbutton）：深木黃銅；冷卻中（disabled）為淡羊皮紙 */
.Battle_menu a.l-btn{
  border-radius:4px;
  border:1px solid #c9a24a;
  background:linear-gradient(180deg,#6a4320,#3b2412);
  box-shadow:inset 0 0 0 1px rgba(232,199,122,.3), 0 2px 4px rgba(40,22,8,.45);
  filter:none;
}
.Battle_menu a.l-btn:hover{ background:linear-gradient(180deg,#7a5028,#46291a); border-color:#e8c77a; }
.Battle_menu a.l-btn .l-btn-text{ color:#F6E7C1; font-weight:bold; letter-spacing:1px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
.Battle_menu a.l-btn.l-btn-disabled,
.Battle_menu a.l-btn.l-btn-disabled:hover{ opacity:1; background:rgba(255,249,232,.82); border-color:#a8833f; box-shadow:0 1px 3px rgba(40,22,8,.3); }
.Battle_menu a.l-btn.l-btn-disabled .l-btn-text{ color:#7a5c3a; text-shadow:none; }


/* 酒館分頁背景（大航海風格）：保留 BAR.png 背景與遮罩，背景由 ::before 以 luminosity 混合成牛皮紙色調（同海上介面） */
.BAR_TAB_BG_O{
  position: relative;
  overflow: hidden;
  width:297px;
  height:218px;
  background:#b39a6a;
}
.BAR_TAB_BG_O::before{
  content:'';
  position:absolute;
  left:0; top:0; right:0; bottom:0;
  background:url('images/BAR.png') no-repeat center center, #dcc28c;
  background-blend-mode:luminosity;
  filter:brightness(1.3) contrast(.9) saturate(.75);
}

/* 冒險情報 遮罩：絕對定位固定覆蓋背景，不隨內容捲動 */
.BAR_ADVEN_MASK {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
/* ── 酒館分頁標籤：圖示在上、文字在下；未選中為船板木、選中為羊皮紙配黃銅線（高度維持 tabHeight 35px） ── */
:is(#BAR_Tab, #CAPTAIN_Tab){ border-radius:6px; overflow:hidden; }
:is(#BAR_Tab, #CAPTAIN_Tab) > .tabs-header { border: 0; padding-top: 0; background: linear-gradient(180deg, #4a2d15, #2a1709); border-bottom: 2px solid #b8892e; }
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs-pill { padding: 0; }
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs li .tabs-inner {
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 0 !important; line-height: 1.1 !important; border: 0; border-radius: 0; box-sizing: border-box;
  color: #e8d6b0; background: transparent; box-shadow: inset -1px 0 0 rgba(232,199,122,.18);
  text-shadow: 1px 1px 1px rgba(20,10,0,.8);
  transition: background-color .12s, color .12s;
}
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs li.tabs-last .tabs-inner { box-shadow: none; }
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs li .tabs-inner:hover { color: #FFF4D6; background: rgba(232,199,122,.15); }
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs li.tabs-selected .tabs-inner,
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs li.tabs-selected .tabs-inner:hover {
  color: #5A3412; border: 0; text-shadow: none; background: linear-gradient(180deg, #f6ead0, #e3cf9f);
  box-shadow: inset 0 3px 0 #c9a24a;
}
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs-title { padding: 0 !important; font-size: 11px; font-weight: bold; letter-spacing: 1px; }
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs-icon.bar-ic { position: static; order: -1; width: 16px; height: 16px; margin: 0; background: no-repeat center center / 16px 16px; }
:is(#BAR_Tab, #CAPTAIN_Tab) .tabs li:not(.tabs-selected) .bar-ic { filter: saturate(.85) brightness(1.1); }
.bar-ic-food    { background-image: url('images/uw_ic_specialty.png') !important; }
.bar-ic-hire    { background-image: url('images/uw_ic_tankard.png') !important; }
.bar-ic-rumor   { background-image: url('images/uw_ic_spyglass.png') !important; }
.bar-ic-adven   { background-image: url('images/uw_ic_map.png') !important; }
.bar-ic-officer { background-image: url('images/uw_ic_officer.png') !important; }
@media (prefers-reduced-motion: reduce) { :is(#BAR_Tab, #CAPTAIN_Tab) .tabs li .tabs-inner { transition: none; } }

/* ── 酒館（page.Action.Bar.php）／造船廠主選單共用：每個分頁內容須在 297×218 背景圖內；遮罩為淡羊皮紙＋暗角＋黃銅框 ── */
.bar-pane {
  position: relative;
  box-sizing: border-box;
  height: 218px;
  padding: 7px 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #2e1d0c;
}
.BAR_TAB_BG_O > .bar-pane,
#YARD_MAIN_MENU.bar-pane,
.BAR_TAB_BG_O > .BAR_ADVEN_MASK {
  background: radial-gradient(ellipse at center, rgba(90,58,28,0) 45%, rgba(90,58,28,.28) 100%), rgba(240,228,196,.55);
}
#YARD_MAIN_MENU.bar-pane { border-radius: 6px; box-shadow: inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6); }
.bar-pane .cp-ic, .bar-tip .cp-ic { margin-right: 4px; }
.bar-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #5A3412;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(168,131,63,.55);
  text-shadow: 0 0 3px rgba(255,248,225,.9);
}
.bar-hd > span:first-child { display: inline-flex; align-items: center; }
.bar-hd-sub { font-size: 10px; font-weight: normal; letter-spacing: 0; color: #7a5c3a; }
.bar-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.bar-stats-2 { grid-template-columns: repeat(2, 1fr); }
.bar-stat {
  background: rgba(255,249,232,.85);
  border: 1px solid #c9a86a;
  border-radius: 3px;
  padding: 2px 6px 3px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.bar-stat span { display: block; font-size: 9px; color: #7a5c3a; }
.bar-stat div { font-size: 13px; font-weight: bold; color: #3b2412; line-height: 1.25; white-space: nowrap; }
.bar-stat div span { display: inline; font-size: 13px; color: #1d4f7a; }
.bar-qty { display: flex; justify-content: center; }
.bar-qty .numberspinner-f + .textbox,
.bar-qty .textbox { border-radius: 3px; border-color: #8a6a3a; }
.bar-qty .textbox-text { text-align: center; font-size: 15px; font-weight: bold; color: #3b2412; background: #fbf3df; }
/* EasyUI 數量調整鈕與滑桿：覆蓋 metro-blue 主題的藍色，改為深木黃銅 */
.bar-qty .spinner-button { background: linear-gradient(180deg, #6a4320, #3b2412) !important; border-color: #8a6a3a !important; }
.bar-qty .spinner-button:hover { filter: brightness(1.15); }
.bar-qty .spinner-button .l-btn-icon { filter: invert(1) sepia(1) saturate(.6) brightness(1.5); }
#BAR_FOOD_QTY_Bar_Div { padding: 0 6px; }
#BAR_FOOD_QTY_Bar_Div .slider-inner { background: rgba(90,60,25,.22); border-color: #a8833f; border-radius: 3px; box-shadow: inset 0 1px 1px rgba(60,35,10,.25); }
#BAR_FOOD_QTY_Bar_Div .slider-handle { background: radial-gradient(circle at 40% 35%, #fff0b8, #d9ae4a 55%, #7a5518); border-radius: 50%; box-shadow: 0 0 0 1px #5a3a1c, 0 1px 3px rgba(0,0,0,.4); }
.bar-buy-row { display: flex; align-items: center; gap: 8px; margin-top: auto; }
/* 總金額卡：羊皮紙卡片，避免文字直接疊在背景上看不清（同交易所） */
.bar-total { flex: 1; min-width: 0; line-height: 1.15; padding: 3px 8px 4px; border-radius: 3px; background: rgba(255,249,232,.9); border: 1px solid #c9a86a; border-left: 3px solid #b8892e; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 1px 2px rgba(60,35,10,.2); }
.bar-total > span { display: block; font-size: 10px; color: #7a5c3a; }
.bar-total strong { font-size: 16px; color: #8a5a00; white-space: nowrap; }
/* 東側行動頁共用按鈕：深木黃銅 */
a.bar-btn {
  flex-shrink: 0;
  min-width: 120px;
  text-align: center;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #F6E7C1;
  text-decoration: none;
  text-shadow: 1px 1px 2px rgba(20,10,0,.9);
  background: linear-gradient(180deg, #6a4320, #3b2412);
  border: 1px solid #c9a24a;
  box-shadow: inset 0 0 0 1px rgba(232,199,122,.3), 0 2px 3px rgba(60,35,10,.35);
  box-sizing: border-box;
}
a.bar-btn:hover { filter: brightness(1.12); }
a.bar-btn.bar-btn-disabled { color: #9a8463; text-shadow: none; background: rgba(255,249,232,.6); border-color: #c9a86a; box-shadow: none; cursor: not-allowed; filter: none; }
a.bar-btn.bar-busy, a.bar-card.bar-busy { opacity: .6; pointer-events: none; }
/* 招募／打探／造船廠選單：選項卡（羊皮紙卡、底部色條） */
#BAR_HIRE_MENU { display: flex; flex-direction: column; gap: 5px; flex: 1; min-height: 0; }
a.bar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 4px;
  border-radius: 4px;
  text-decoration: none;
  background: rgba(255,249,232,.85);
  border: 1px solid #c9a86a;
  border-bottom: 3px solid #2a6a8c;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.2);
  transition: transform .12s, box-shadow .12s, background .12s;
}
a.bar-card:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 3px 8px rgba(60,35,10,.3); background: rgba(255,251,240,.97); }
a.bar-card-gold { border-bottom-color: #b8892e; background: rgba(255,244,214,.88); }
.bar-card-icon { line-height: 1.1; }
.bar-card-icon .cp-ic { width: 26px; height: 26px; margin: 0; background-size: 26px 26px; vertical-align: 0; }
.bar-card-name { font-size: 13px; font-weight: bold; color: #3b2412; }
.bar-card-price { font-size: 13px; font-weight: bold; color: #8a5a00; }
.bar-card-desc { font-size: 10px; color: #7a5c3a; }
#BAR_PRICECHECK_MENU { display: flex; flex-direction: column; gap: 8px; flex: 1; }
a.bar-card-wide { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 12px; border-bottom-color: #b8892e; }
a.bar-card-wide .bar-card-icon .cp-ic { width: 30px; height: 30px; background-size: 30px 30px; }
.bar-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
/* 招募水手：啤酒／烈酒／大型酒宴三列橫卡（圖示｜名稱＋人數｜價格） */
#BAR_HIRE_MENU a.bar-card { flex: 1 1 0; min-height: 0; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 2px 10px; }
#BAR_HIRE_MENU .bar-card-icon { width: 50px; flex: none; display: flex; justify-content: center; gap: 1px; }
#BAR_HIRE_MENU .bar-card-icon .cp-ic { width: 24px; height: 24px; background-size: 24px 24px; }
#BAR_HIRE_MENU a.bar-card-feast { border-bottom-color: #8c2f1f; background: rgba(255,236,208,.92); }
.bar-tip {
  display: flex;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.5;
  color: #5A3412;
  padding: 6px 8px;
  border-radius: 3px;
  background: rgba(255,249,232,.8);
  border: 1px dashed #a8833f;
}
.bar-tip .cp-ic { flex: none; margin-top: 1px; }
/* 冒險情報：固定 218px 高，內部捲動 */
#BAR_ADVEN_AREA {
  position: relative;
  z-index: 1;
  padding: 7px 9px;
  height: 218px;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(138,106,58,.6) transparent;
}
#BAR_ADVEN_AREA::-webkit-scrollbar { width: 4px; }
#BAR_ADVEN_AREA::-webkit-scrollbar-thumb { background: rgba(138,106,58,.6); border-radius: 2px; }
#BAR_ADVEN_AREA .cp-ic { margin-right: 4px; }
#BAR_ADVEN_AREA .adven-current {
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 3px;
  background: rgba(255,249,232,.88);
  border: 1px solid #c9a86a;
  border-left: 4px solid #5d7a2e;
  font-size: 11px;
}
#BAR_ADVEN_AREA .adven-cur-hd { display: flex; justify-content: space-between; align-items: center; font-weight: bold; color: #4d6a1e; margin-bottom: 3px; }
#BAR_ADVEN_AREA .adven-cur-hd > span { display: inline-flex; align-items: center; }
#BAR_ADVEN_AREA .adven-progress-row { display: flex; align-items: center; gap: 3px; margin-bottom: 4px; }
#BAR_ADVEN_AREA .adven-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #8a6a3a; box-sizing: border-box; }
#BAR_ADVEN_AREA .adven-dot.done    { background: radial-gradient(circle at 35% 30%, #c8e08a, #5d7a2e); border-color: #3f5a1a; }
#BAR_ADVEN_AREA .adven-dot.pending { background: rgba(90,60,25,.12); }
#BAR_ADVEN_AREA .adven-progress-label { font-size: 10px; color: #7a5c3a; margin-left: 4px; }
#BAR_ADVEN_AREA .adven-clue { font-size: 11px; color: #3b2412; line-height: 1.55; }
#BAR_ADVEN_AREA .adven-cancel-btn { font-size: 10px; font-weight: normal; color: #8f1f12; text-decoration: none; padding: 0 6px; border: 1px solid #a8463a; border-radius: 3px; background: rgba(255,249,232,.9); }
#BAR_ADVEN_AREA .adven-cancel-btn:hover { background: #a8463a; color: #fff; border-color: #7f2418; }
#BAR_ADVEN_AREA .adven-buy-title { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: bold; color: #5A3412; margin: 2px 0 4px; text-shadow: 0 0 3px rgba(255,248,225,.9); }
#BAR_ADVEN_AREA .adven-buy-title b { display: inline-flex; align-items: center; }
#BAR_ADVEN_AREA .adven-buy-title span { font-weight: normal; color: #7a5c3a; }
#BAR_ADVEN_AREA .adven-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 3px;
  background: rgba(255,249,232,.85);
  border: 1px solid #c9a86a;
  cursor: pointer;
  font-size: 11px;
  transition: background .12s, border-color .12s;
}
#BAR_ADVEN_AREA .adven-item:hover { background: rgba(255,246,220,.98); border-color: #b8892e; }
#BAR_ADVEN_AREA .adven-text { flex: 1; color: #3b2412; line-height: 1.45; }
#BAR_ADVEN_AREA .adven-price { color: #8a5a00; font-weight: bold; white-space: nowrap; }
#BAR_ADVEN_AREA .adven-empty { text-align: center; color: #5A3412; font-size: 12px; padding: 40px 0; line-height: 1.8; text-shadow: 0 0 3px rgba(255,248,225,.9); }
#BAR_ADVEN_AREA .adven-empty-icon { width: 28px; height: 28px; margin: 0 auto 2px; background: url('images/uw_ic_map.png') no-repeat center center / 28px 28px; }

#TRADE_TAB_BG_O{
  width:297px;
  height:218px;
  background:url('images/TRADE.png') no-repeat center center;
}
.TAB_BG_I{
  width:100%;
  height:100%;
  background-color: rgba(206, 232, 253, 0.7);
}


.ACTION_Field{
width:100%;
height:25px;
line-height: 25px;
text-align:center;
background-color:#16365C;
color:#C5D9F1;
}


.ACTION_value{
  width:100%;
  height:25px;
  font-size: 14px;
  line-height: 25px;
  text-align:center;
  text-shadow: 1px 1px 1px rgba(8, 57, 140, 0.5);
  color:#08398C;
  font-weight: 900;
}

.ACTION_option{
  padding:10px;
  width:100%;
  height:75px;
    text-align:center;
}

.ACTION_BTN{
  padding:10px;
  width:100%;
  height:40px;
  text-align:center;
}


#TRADE_QTY_Bar_Div{
  margin:0px auto;
  padding-left:10px;
  padding-right:10px;
  width:150px;
}


#BAR_BUYFOOD_Table{
  margin:0;
  padding: 0;
  width:100%;
  height:100%;
}

.adven-progress-row { display:flex; align-items:center; gap:3px; margin-bottom:4px; }
.adven-dot { display:inline-block; width:9px; height:9px; border-radius:50%; border:1px solid #8ab; }
.adven-dot.done    { background:#16365C; border-color:#16365C; }
.adven-dot.pending { background:#c8dff5; }
.adven-progress-label { font-size:10px; color:#666; margin-left:4px; }
.adven-clue { font-size:11px; color:#1a3a6a; line-height:1.5; margin-bottom:3px; }
.adven-cancel-row { text-align:right; margin-top:4px; }
.adven-cancel-btn { font-size:10px; color:#8a2020; text-decoration:underline; cursor:pointer; }
.adven-cancel-btn:hover { color:#c00; }

/* 冒險歷練 dialog — 壓制多層 overflow，避免與 datagrid 卷軸疊加 */
#advenlog_Dialog,
#advenlog_Tabs .tabs-panels,
#advenlog_Tabs .tabs-panel,
#advenlog_Tabs .panel-body { overflow: hidden !important; }


#BAR_BUYFOOD_Table td{
  border:1px #808080 solid;
  margin:0;
  padding: 0;
  text-align :center;
}


/* ── 捨棄物資／解雇水手（大航海風格：羊皮紙海圖底、深木標頭、黃銅數量框與滑桿、暗紅執行鈕；高度依內容）── */
#Drop_Dialog{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; color:#3b2412; }
.dr-wrap{ box-sizing:border-box; padding:10px 12px 12px; display:flex; flex-direction:column; gap:10px; }
.dr-head{ display:flex; align-items:center; gap:6px; padding:6px 10px; border-radius:4px; color:#F6E7C1; font-size:13px; font-weight:bold; letter-spacing:1px; text-shadow:1px 1px 1px rgba(20,10,0,.8);
  background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #5a3a1c; box-shadow:inset 0 0 0 1px rgba(232,199,122,.3); }
.dr-head .cp-ic{ margin:0; vertical-align:0; }
.dr-have{ margin-left:auto; font-size:11px; font-weight:normal; letter-spacing:0; color:#e8d6b0; }
.dr-have b{ font-size:15px; color:#f6dc8f; margin-left:2px; }
.dr-qty{ display:flex; justify-content:center; }
.dr-qty .textbox{ border-radius:3px; border-color:#8a6a3a; }
.dr-qty .textbox-text{ text-align:center; font-size:15px; font-weight:bold; color:#3b2412; background:#fbf3df; }
.dr-qty .spinner-button{ background:linear-gradient(180deg,#6a4320,#3b2412) !important; border-color:#8a6a3a !important; }
.dr-qty .spinner-button:hover{ filter:brightness(1.15); }
.dr-qty .spinner-button .l-btn-icon{ filter:invert(1) sepia(1) saturate(.6) brightness(1.5); }
.dr-bar{ display:flex; align-items:center; gap:10px; padding:6px 10px; border-radius:4px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.4); }
.dr-end{ flex:none; min-width:24px; font-size:12px; font-weight:bold; color:#7a5c3a; text-align:center; }
#Drop_QTY_Bar_Div{ flex:1; min-width:0; }
#Drop_QTY_Bar_Div .slider-inner{ background:rgba(90,60,25,.22); border-color:#a8833f; border-radius:3px; box-shadow:inset 0 1px 1px rgba(60,35,10,.25); }
#Drop_QTY_Bar_Div .slider-handle{ background:radial-gradient(circle at 40% 35%, #fff0b8, #d9ae4a 55%, #7a5518); border-radius:50%; box-shadow:0 0 0 1px #5a3a1c, 0 1px 3px rgba(0,0,0,.4); }
.dr-note{ font-size:11px; line-height:1.5; color:#8f1f12; text-align:center; text-shadow:0 0 3px rgba(255,248,225,.9); }
.dr-foot{ display:flex; justify-content:center; }
#Drop_Dialog #DROP_BTN{ color:#fbe9e4; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 1px rgba(20,10,0,.8); background:linear-gradient(180deg,#9a3a28,#6a1e12); border:1px solid #c9876a; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(255,220,200,.2), 0 1px 3px rgba(60,20,10,.3); }
#Drop_Dialog #DROP_BTN:hover{ background:linear-gradient(180deg,#ad4430,#7a2416); border-color:#e0a088; }
#Drop_Dialog #DROP_BTN .l-btn-text{ color:inherit; }
#Drop_Dialog #DROP_BTN.l-btn-disabled, #Drop_Dialog #DROP_BTN.l-btn-disabled:hover{ opacity:1; color:#9a8463; text-shadow:none; background:rgba(255,249,232,.7); border-color:#c9a86a; box-shadow:none; }

/* ── 玩家資料卡 dialog（corejs/PlayerProfile.js）──────────────── */
#player_profile_dialog{
  max-height:calc(100vh - 70px);
  overflow-y:auto;
  background:#f4f7fb;
}
#player_profile_dialog.ppd_loading #ppd_bd,
#player_profile_dialog.ppd_loading #ppd_medal_sum{ opacity:.45; transition:opacity .15s; }

/* 標頭：頭像、名稱、稱號、獎牌總計 */
#ppd_hd{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  color:#eaf2fb;
  background:
    radial-gradient(ellipse at 85% -40%, rgba(120,170,230,.45) 0%, rgba(120,170,230,0) 60%),
    linear-gradient(135deg, #0f2a4a 0%, #16365C 55%, #1f4a7a 100%);
  border-bottom:3px solid #c9a44c;
}
#ppd_avatar_wrap{
  flex-shrink:0;
  padding:3px;
  border-radius:8px;
  background:linear-gradient(145deg, #f3dd9a, #b8892e);
  box-shadow:0 2px 6px rgba(0,0,0,.35);
}
#ppd_avatar{
  display:block;
  width:68px;
  height:68px;
  border-radius:5px;
  background:#0f2a4a;
  image-rendering:pixelated;
}
#ppd_id{ flex:1; min-width:0; }
#ppd_name{
  font-size:20px;
  font-weight:bold;
  line-height:1.25;
  letter-spacing:.5px;
  color:#fff;
  text-shadow:0 1px 2px rgba(0,0,0,.4);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ppd_title{
  display:inline-block;
  margin-top:5px;
  padding:2px 10px;
  border-radius:10px;
  font-size:11px;
  font-weight:bold;
  letter-spacing:.5px;
  color:#dbe7f5;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.25);
}
.ppd_title_legend  { color:#3b2a00; background:linear-gradient(90deg,#f6e27a,#d9a92e); border-color:#f6e27a; }
.ppd_title_champion{ color:#fff3cf; background:rgba(201,164,76,.28); border-color:#c9a44c; }
.ppd_title_pirate  { color:#ffd9d6; background:rgba(190,50,45,.35);  border-color:#d9574f; }
.ppd_title_merchant{ color:#d9f5e3; background:rgba(47,158,91,.35);  border-color:#4fbf7c; }
.ppd_title_explorer{ color:#d6f4f4; background:rgba(30,150,160,.35); border-color:#43b8c2; }
.ppd_title_sailor  { color:#dce9ff; background:rgba(60,120,210,.4);  border-color:#6d9de6; }
.ppd_title_rising  { color:#e6efff; background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.35); }
#ppd_medal_sum{
  display:flex;
  gap:4px;
  flex-shrink:0;
  align-self:flex-start;
}

/* 內容區 */
#ppd_bd{ padding:12px 14px 14px; }

/* 四項等級 */
#ppd_lvs{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:8px;
  margin-bottom:12px;
}
.ppd_lv_card{
  background:#fff;
  border:1px solid #d6e1ee;
  border-top:3px solid #16365C;
  border-radius:6px;
  text-align:center;
  padding:6px 4px 7px;
  box-shadow:0 1px 2px rgba(22,54,92,.08);
}
.ppd_lv_lbl{
  font-size:11px;
  color:#6a7f99;
  font-weight:bold;
}
.ppd_lv_num{
  font-size:24px;
  font-weight:bold;
  line-height:1.15;
  color:#16365C;
}
.ppd_lv_num:after{
  content:' Lv';
  font-size:10px;
  font-weight:normal;
  color:#8a9bb0;
}
.ppd_lv_n{ border-top-color:#2d7fd3; } .ppd_lv_n .ppd_lv_num{ color:#1f63ad; }
.ppd_lv_t{ border-top-color:#2f9e5b; } .ppd_lv_t .ppd_lv_num{ color:#23804a; }
.ppd_lv_a{ border-top-color:#d9822b; } .ppd_lv_a .ppd_lv_num{ color:#b8651a; }
.ppd_lv_b{ border-top-color:#c9443c; } .ppd_lv_b .ppd_lv_num{ color:#a8342d; }

/* 區塊標題 */
.ppd_sec{ margin-top:12px; }
.ppd_sec_hd{
  display:flex;
  align-items:baseline;
  gap:8px;
  font-size:12px;
  font-weight:bold;
  color:#16365C;
  padding-bottom:4px;
  margin-bottom:7px;
  border-bottom:1px solid #d6e1ee;
}
.ppd_sec_sub{
  font-size:11px;
  font-weight:normal;
  color:#8a9bb0;
}

/* 航海紀錄 */
#ppd_stats{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:6px;
}
.ppd_stat{
  background:#fff;
  border:1px solid #e0e8f2;
  border-radius:5px;
  padding:5px 8px 6px;
}
.ppd_stat_lbl{
  font-size:11px;
  color:#6a7f99;
}
.ppd_stat_val{
  font-size:14px;
  font-weight:bold;
  color:#16365C;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ppd_stat_val.ppd_stat_zero{ color:#b5c2d1; font-weight:normal; }

/* 獎牌（金／銀／銅幣） */
.ppd_coin{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 3px;
  box-sizing:border-box;
  border-radius:11px;
  font-size:11px;
  font-weight:bold;
  color:#fff;
  text-shadow:0 1px 1px rgba(0,0,0,.45);
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.2);
}
.ppd_coin_g{ background:radial-gradient(circle at 35% 30%, #fff3b0 0%, #e8bd2f 45%, #a87a0c 100%); }
.ppd_coin_s{ background:radial-gradient(circle at 35% 30%, #ffffff 0%, #b9c3cc 45%, #7c8791 100%); }
.ppd_coin_b{ background:radial-gradient(circle at 35% 30%, #f6c9a0 0%, #b8703a 45%, #7a4520 100%); }
.ppd_coin_zero{ opacity:.28; filter:grayscale(.6); }
#ppd_medals{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:6px;
}
.ppd_mc{
  background:#fff;
  border:1px solid #e0e8f2;
  border-radius:6px;
  padding:5px 2px 6px;
  text-align:center;
}
.ppd_mc_gold{
  border-color:#e2c66b;
  background:linear-gradient(180deg,#fffaf0 0%,#fff 60%);
}
.ppd_mc_none .ppd_mc_hd{ color:#a9b6c6; }
.ppd_mc_hd{
  font-size:11px;
  font-weight:bold;
  color:#16365C;
  margin-bottom:5px;
}
.ppd_mc_coins{
  display:flex;
  justify-content:center;
  gap:2px;
}
.ppd_mc_coins .ppd_coin{ min-width:20px; height:20px; font-size:10px; }

/* 艦隊編成（縮小為 40px 格） */
#ppd_ship_area{
  display:flex;
  justify-content:center;
}
#ppd_ship_area .ship_table{
  width:200px;
  max-width:200px;
  border-radius:8px;
  overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(15,42,74,.35), 0 2px 6px rgba(15,42,74,.25);
}
#ppd_ship_area .ship_table td{
  width:40px; max-width:40px;
  height:40px; max-height:40px;
}
#ppd_ship_area .ship_img{ width:40px; max-width:40px; }
.ppd_ship_cell{
  position:relative;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  transform:scaleX(-1);
}
.ppd_ship_cell[data-sname]{ cursor:pointer; }
/* 商會專屬艦：金色光暈＋角標（格子已水平翻轉，left 實際顯示在右上角） */
.ppd_ship_guild{
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,215,90,.55) 0%, rgba(255,200,60,.25) 45%, rgba(255,200,60,0) 70%);
  animation:ppd_guild_glow 2.4s ease-in-out infinite;
}
.ppd_ship_guild::after{
  content:'★';
  position:absolute;
  top:-2px;
  left:0;
  font-size:11px;
  line-height:1;
  color:#FFD54A;
  text-shadow:0 0 2px #7a5200, 0 0 1px #000;
  pointer-events:none;
}
@keyframes ppd_guild_glow{
  0%,100%{ filter:drop-shadow(0 0 2px rgba(255,210,80,.6)); }
  50%    { filter:drop-shadow(0 0 5px rgba(255,210,80,.95)); }
}
#ppd_ship_tip{
  display:none;
  position:absolute;
  z-index:100000;
  padding:5px 10px;
  border-radius:6px;
  background:rgba(15,42,74,.95);
  box-shadow:0 2px 8px rgba(0,0,0,.35);
  color:#fff;
  font-size:12px;
  text-align:center;
  white-space:nowrap;
  pointer-events:none;
}
#ppd_ship_tip .ppd_tip_name{ font-weight:bold; }
#ppd_ship_tip .ppd_tip_guild{ margin-top:2px; font-size:11px; color:#FFD54A; }
/* 自我介紹（艦長室填寫）：保留換行，長字串自動斷行 */
#ppd_intro_sec{ margin-bottom:10px; }
#ppd_intro{ padding:7px 10px; font-size:12px; line-height:1.6; color:#2e3d4f; white-space:pre-wrap; overflow-wrap:anywhere; background:#fff; border:1px solid #d0dce8; border-left:3px solid #c99a2e; border-radius:6px; }
body:has(#MainLayout) #ppd_intro{ color:#3b2412; background:rgba(255,249,232,.9); border-color:#c9a86a; border-left-color:#b8892e; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15); }
.ppd_empty{
  width:100%;
  padding:14px 0;
  text-align:center;
  font-size:12px;
  color:#8a9bb0;
  background:#fff;
  border:1px dashed #d0dce8;
  border-radius:6px;
}
#ppd_msg{
  padding:40px 20px;
  text-align:center;
  font-size:13px;
  color:#8a6a2a;
}
/* 艦長資料卡：遊戲頁大航海風格（深木黃銅標頭、羊皮紙海圖內容、羊皮紙卡）；
   首頁（無 #MainLayout）維持上方原樣式 */
body:has(#MainLayout) #player_profile_dialog{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center top; background-size:cover; color:#2e1d0c; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
body:has(#MainLayout) #ppd_hd{ color:#e8d6b0; background:radial-gradient(ellipse at 85% -40%, rgba(201,154,46,.3) 0%, rgba(201,154,46,0) 60%), linear-gradient(135deg, #2a1709 0%, #4a2d15 55%, #6a4320 100%); border-bottom:3px solid #b8892e; box-shadow:inset 0 -1px 0 rgba(232,199,122,.3); }
body:has(#MainLayout) #ppd_avatar_wrap{ border-radius:6px; background:linear-gradient(145deg, #f3dd9a, #b8892e 55%, #7a5518); box-shadow:0 0 0 1px rgba(20,10,0,.6), 0 2px 6px rgba(0,0,0,.45); }
body:has(#MainLayout) #ppd_avatar{ border-radius:4px; background:#2a1709; }
body:has(#MainLayout) #ppd_name{ color:#FBEFD0; text-shadow:1px 1px 2px rgba(20,10,0,.8); }
body:has(#MainLayout) .ppd_title{ border-radius:3px; color:#e8d6b0; background:rgba(255,236,190,.1); border-color:rgba(232,199,122,.35); }
body:has(#MainLayout) .ppd_title_legend  { color:#3a2410; background:linear-gradient(180deg,#f6dc8f,#c99a2e); border-color:#7a5518; }
body:has(#MainLayout) .ppd_title_champion{ color:#f6dc8f; background:rgba(201,154,46,.28); border-color:#c9a24a; }
body:has(#MainLayout) .ppd_title_pirate  { color:#fbe9e4; background:rgba(143,31,18,.6);  border-color:#c9876a; }
body:has(#MainLayout) .ppd_title_merchant{ color:#eef4dc; background:rgba(93,122,46,.55);  border-color:#b8c98a; }
body:has(#MainLayout) .ppd_title_explorer{ color:#e3f1f4; background:rgba(42,106,140,.5); border-color:#7fa6bd; }
body:has(#MainLayout) .ppd_title_sailor  { color:#e8f2f8; background:rgba(29,79,122,.55);  border-color:#7fa6bd; }
body:has(#MainLayout) .ppd_title_rising  { color:#FBEFD0; background:rgba(255,236,190,.14); border-color:rgba(232,199,122,.45); }
body:has(#MainLayout) .ppd_lv_card,
body:has(#MainLayout) .ppd_stat,
body:has(#MainLayout) .ppd_mc,
body:has(#MainLayout) .ppd_empty{ background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15); }
body:has(#MainLayout) .ppd_lv_card{ border-top:3px solid #6a4320; }
body:has(#MainLayout) .ppd_lv_lbl,
body:has(#MainLayout) .ppd_stat_lbl{ color:#7a5c3a; }
body:has(#MainLayout) .ppd_lv_num:after{ color:#9a8463; }
body:has(#MainLayout) .ppd_lv_n{ border-top-color:#1d4f7a; } body:has(#MainLayout) .ppd_lv_n .ppd_lv_num{ color:#1d4f7a; }
body:has(#MainLayout) .ppd_lv_t{ border-top-color:#5d7a2e; } body:has(#MainLayout) .ppd_lv_t .ppd_lv_num{ color:#4d6a1e; }
body:has(#MainLayout) .ppd_lv_a{ border-top-color:#b8892e; } body:has(#MainLayout) .ppd_lv_a .ppd_lv_num{ color:#8a5a00; }
body:has(#MainLayout) .ppd_lv_b{ border-top-color:#8f1f12; } body:has(#MainLayout) .ppd_lv_b .ppd_lv_num{ color:#8f1f12; }
body:has(#MainLayout) .ppd_sec_hd{ align-items:center; letter-spacing:1px; color:#5A3412; border-bottom:1px solid rgba(168,131,63,.55); text-shadow:0 0 3px rgba(255,248,225,.9); }
body:has(#MainLayout) .ppd_sec_hd::before{ content:''; flex:none; width:5px; height:5px; transform:rotate(45deg); background:#b8892e; }
body:has(#MainLayout) .ppd_sec_sub{ letter-spacing:0; color:#7a5c3a; }
body:has(#MainLayout) .ppd_stat_val{ color:#3b2412; }
body:has(#MainLayout) .ppd_stat_val.ppd_stat_zero{ color:#b8a888; }
body:has(#MainLayout) .ppd_mc_gold{ border-color:#b8892e; background:linear-gradient(180deg, rgba(246,220,143,.55) 0%, rgba(255,249,232,.9) 60%); }
body:has(#MainLayout) .ppd_mc_hd{ color:#3b2412; }
body:has(#MainLayout) .ppd_mc_none .ppd_mc_hd{ color:#b8a888; }
body:has(#MainLayout) #ppd_ship_area .ship_table{ border-radius:4px; box-shadow:0 0 0 1px #5a3a1c, 0 0 0 3px #c9a24a, 0 2px 6px rgba(40,22,8,.35); }
body:has(#MainLayout) .ppd_empty{ color:#7a5c3a; border-style:dashed; border-color:#a8833f; }
body:has(#MainLayout) #ppd_ship_tip{ border-radius:3px; background:linear-gradient(180deg, rgba(74,45,21,.97), rgba(42,23,9,.97)); border:1px solid #c9a24a; color:#FBEFD0; }
body:has(#MainLayout) #ppd_ship_tip .ppd_tip_guild{ color:#f6dc8f; }
body:has(#MainLayout) #ppd_msg{ color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.9); }
/* 視窗外框與標題列（僅遊戲頁；與其他大航海對話框相同） */
body:has(#MainLayout) .window:has(> #player_profile_dialog){ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#8a6a3a; box-shadow:0 6px 18px rgba(30,15,0,.5); }
body:has(#MainLayout) .window:has(> #player_profile_dialog) > .window-header{ background:transparent; border-color:#8a6a3a; }
body:has(#MainLayout) .window:has(> #player_profile_dialog) > .window-header .panel-title{ color:#F6E7C1; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
body:has(#MainLayout) .window:has(> #player_profile_dialog) > .window-header .panel-tool a{ filter:invert(1) sepia(1) saturate(.6) brightness(1.4); opacity:.85; }
body:has(#MainLayout) .window:has(> #player_profile_dialog) > .window-header .panel-tool a:hover{ opacity:1; }


/* ── 遊戲內聊天室（大航海風格：木製分頁列與輸入列、羊皮紙訊息區、黃銅按鈕）── */
#ingame_chat_panel {
  margin: 6px 0 0 0;
  width: 500px; /* 與上方港口卡、艦隊區同寬並左右對齊 */
  box-sizing: border-box;
  background: #E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center;
  background-size: cover;
  border: 1px solid #8a6a3a;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(232,199,122,.45), 0 2px 4px rgba(60,35,10,.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 300px;
}

#igc_header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: linear-gradient(180deg, #4a2d15, #2a1709);
  border-bottom: 2px solid #b8892e;
  flex-shrink: 0;
}

.igc_tab {
  border: 1px solid #8a6a3a;
  background: linear-gradient(180deg, #f6ead0, #e3cf9f);
  color: #5A3412;
  border-radius: 3px;
  padding: 1px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: Microsoft JhengHei;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  transition: filter .15s;
}
.igc_tab:hover { filter: brightness(1.06); }

.igc_tab_active {
  background: linear-gradient(180deg, #6a4320, #3b2412);
  border-color: #c9a24a;
  color: #F6E7C1;
  text-shadow: 1px 1px 1px rgba(20,10,0,.8);
  box-shadow: inset 0 0 0 1px rgba(232,199,122,.35);
}

#igc_box {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  min-height: 0;
}

.igc_status {
  color: #7a5c3a;
  font-size: 12px;
  display: block;
  text-align: center;
  padding: 6px 0;
}

.igc_divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7a5c3a;
  font-size: 11px;
  font-weight: 700;
  margin: 6px 0 4px;
}
.igc_divider::before,
.igc_divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(168,131,63,0), #a8833f, rgba(168,131,63,0)); }

.igc_row {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 3px 0;
  padding: 3px 6px;
  background: rgba(255,249,232,.78);
  border: 1px solid #c9a86a;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  overflow-wrap: anywhere;
}

.igc_avatar {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 2px;
  margin-top: 1px;
  box-shadow: 0 0 0 1px #b8892e;
}

.igc_meta {
  color: #8f7553;
  font-size: 11px;
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.igc_name {
  font-weight: 700;
  color: #1d4f7a;
  cursor: pointer;
}

.igc_name:hover {
  color: #8a5a00;
  text-decoration: underline;
}

.igc_notice_label {
  font-weight: 700;
  color: #8f1f12;
}

.igc_msg {
  color: #2e1d0c;
  flex: 1;
}

.igc_type {
  color: #8f7553;
  font-size: 11px;
}

#igc_form {
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  background: linear-gradient(180deg, #4a2d15, #2a1709);
  border-top: 2px solid #b8892e;
  flex-shrink: 0;
}

#igc_input {
  flex: 1;
  border: 1px solid #8a6a3a;
  border-radius: 3px;
  padding: 3px 7px;
  font-size: 12px;
  font-family: Microsoft JhengHei;
  color: #2e1d0c;
  background: #fbf3df;
  box-shadow: inset 0 1px 2px rgba(60,35,10,.25);
}
#igc_input::placeholder { color: #a08a68; }
#igc_input:focus { outline: none; border-color: #c9a24a; box-shadow: inset 0 1px 2px rgba(60,35,10,.25), 0 0 0 2px rgba(232,199,122,.45); }

#igc_send {
  border: 1px solid #7a5518;
  border-radius: 3px;
  padding: 0 12px;
  background: linear-gradient(180deg, #f3dd9a, #c99a2e 60%, #a87a1f);
  color: #3a2410;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 1px 0 rgba(255,245,215,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.4);
  cursor: pointer;
  font-family: Microsoft JhengHei;
  font-size: 12px;
  transition: filter .15s;
}
#igc_send:hover { filter: brightness(1.08); }
#igc_send:active { filter: brightness(.95); }

#igc_send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(.6);
}

#igc_online_badge {
  margin-left: auto;
  font-size: 11px;
  color: #F6E7C1;
  background: rgba(20,12,5,.45);
  border: 1px solid rgba(232,199,122,.5);
  border-radius: 3px;
  padding: 1px 8px;
  cursor: pointer;
  white-space: nowrap;
  display: none;
}
#igc_online_badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  vertical-align: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d8d0c0, #7f7666);
  box-shadow: 0 0 0 1px rgba(20,10,0,.6);
}
#igc_online_badge.is-online::before { background: radial-gradient(circle at 35% 30%, #c8f0a0, #3f8a2a); box-shadow: 0 0 0 1px rgba(20,10,0,.6), 0 0 4px rgba(140,220,100,.6); }
#igc_online_badge:hover {
  background: rgba(20,12,5,.65);
  border-color: #e8c77a;
}

/* 在線玩家（大航海風格：羊皮紙海圖底、羊皮紙名牌、綠色在線圓點） */
#onlinelist_Dialog{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; color:#3b2412; }
.online_list {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.online_list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 13px;
  font-family: Microsoft JhengHei;
  border-radius: 4px;
  background: rgba(255,249,232,.92);
  border: 1px solid #c9a86a;
  border-left: 3px solid #5d7a2e;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 1px 2px rgba(60,35,10,.12);
}
.ol_name { display: inline-flex; align-items: center; gap: 7px; font-weight: bold; color: #3b2412; }
.ol_name::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c8f0a0, #3f8a2a); box-shadow: 0 0 0 1px rgba(20,10,0,.5), 0 0 4px rgba(140,220,100,.6); }
.ol_time { color: #7a5c3a; font-size: 12px; font-variant-numeric: tabular-nums; }
.ol_auto { font-style: normal; font-weight: normal; font-size: 11px; padding: 0 5px; border-radius: 3px; color: #5A3412; background: rgba(224,184,90,.35); border: 1px solid rgba(154,108,30,.5); }
.ol_empty { margin: 0; padding: 16px 12px; text-align: center; color: #5A3412; text-shadow: 0 0 3px rgba(255,248,225,.9); }

/* ── 商會（大航海風格：配色由藍色系對應為羊皮紙、深木、黃銅、海藍、橄欖綠、暗紅）──────────────── */
/* ── 管理設定面板（gad-*）────────────────────────── */
.guild_menu_item.has-alert { position: relative; }
.guild_menu_item.has-alert:after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10px;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-radius: 50%;
  background: #a8463a;
  box-shadow: 0 0 0 2px rgba(168,70,58,.3);
}
.gad-card {
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-radius: 7px;
  padding: 10px 14px 11px;
  margin-bottom: 9px;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
}
.gad-card-apps { border-left: 4px solid #e0b84a; background: linear-gradient(90deg, #fffaf0 0%, #fbf3df 40%); }
.gad-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.gad-icon { font-size: 14px; width: 18px; text-align: center; }
.gad-title { font-size: 13px; font-weight: bold; color: #3b2412; }
.gad-hd-note { margin-left: auto; font-size: 11px; color: #9a8463; }
.gad-badge {
  font-size: 11px;
  font-weight: bold;
  color: #F6E7C1;
  background: #a8463a;
  border-radius: 10px;
  padding: 0 8px;
}
.gad-dirty { margin-left: auto; font-size: 11px; color: #c0561a; font-weight: bold; }
.gad-preview .gad-dirty { margin-left: 8px; }
.gad-desc { font-size: 12px; color: #7a5c3a; line-height: 1.6; margin-bottom: 8px; }
.gad-desc strong { color: #8f1f12; }
.gad-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.gad-empty {
  font-size: 12px;
  color: #9a8463;
  text-align: center;
  padding: 10px;
  border: 1px dashed #d8c39b;
  border-radius: 6px;
  background: #f6ecd2;
}
.gad-hint { font-size: 11px; color: #9a8463; }
/* 告示板 */
#guild_bulletin_input {
  width: 100%;
  box-sizing: border-box;
  min-height: 78px;
  resize: vertical;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.6;
  font-family: Microsoft JhengHei;
  color: #4a4430;
  background: #fffcf0;
  border: 1px solid #e3d6a4;
  border-radius: 6px;
}
#guild_bulletin_input:focus { outline: none; border-color: #c9a44c; box-shadow: 0 0 0 2px rgba(201,164,76,.25); }
.gad-count { font-size: 11px; color: #9a8463; }
.gad-count-warn { color: #c0561a; font-weight: bold; }
/* 配息率 */
.gad-rate { display: flex; align-items: center; gap: 12px; }
#guild_rate_range { flex: 1; accent-color: #5d7a2e; cursor: pointer; }
.gad-rate-num { font-size: 13px; color: #7a5c3a; white-space: nowrap; }
#guild_set_rate_input {
  width: 46px;
  font-size: 18px;
  font-weight: bold;
  color: #4d6a1e;
  text-align: center;
  padding: 1px 2px;
  border: 1px solid #c9a86a;
  border-radius: 5px;
  margin-right: 2px;
}
.gad-presets { display: flex; gap: 5px; margin-top: 6px; }
.gad-preset {
  font-size: 11px;
  padding: 1px 10px;
  border-radius: 10px;
  border: 1px solid #c9a86a;
  background: #fbf3df;
  color: #5A3412;
  text-decoration: none;
}
.gad-preset:hover { border-color: #5d7a2e; color: #4d6a1e; }
.gad-preset.active { background: #5d7a2e; border-color: #5d7a2e; color: #F6E7C1; }
.gad-preview { font-size: 12px; color: #5A3412; line-height: 1.5; }
.gad-preview strong { color: #4d6a1e; }
/* 加入條件 */
.gad-policies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.gad-policy {
  position: relative;
  display: block;
  padding: 8px 10px 9px;
  border: 1px solid #d8c39b;
  border-radius: 6px;
  cursor: pointer;
  background: #f6ecd2;
  transition: border-color .12s, background .12s;
}
.gad-policy:hover { border-color: #9fbcc6; }
.gad-policy input { position: absolute; opacity: 0; pointer-events: none; }
.gad-policy-name { display: block; font-size: 13px; font-weight: bold; color: #3b2412; }
.gad-policy-desc { display: block; font-size: 11px; color: #9a8463; margin-top: 2px; line-height: 1.45; }
.gad-policy-cur {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  color: #7a5c3a;
  background: #f3e6c4;
  border-radius: 8px;
  padding: 0 6px;
}
.gad-policy.current .gad-policy-cur { display: block; }
.gad-policy.selected { border-color: #b8892e; background: #fbf3df; box-shadow: inset 0 0 0 1px #b8892e; }
.gad-policy.selected .gad-policy-name:before { content: '✔ '; color: #8a5a00; }
.gad-profit { margin-top: 8px; font-size: 12px; color: #5A3412; display: flex; align-items: center; gap: 6px; }
#guild_join_min_profit {
  width: 120px;
  text-align: right;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid #c9a86a;
  border-radius: 5px;
}
/* 轉讓會長 */
#guild_transfer_select {
  flex: 1;
  max-width: 260px;
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid #c9a86a;
  border-radius: 5px;
  color: #3b2412;
}
/* 危險區域 */
.gad-danger { border: 1px solid #e3b8aa; border-left: 4px solid #a8463a; background: linear-gradient(90deg, #f8ebe4 0%, #fbf3df 45%); }
.gad-danger .gad-title { color: #8f1f12; }
#guild_disband_BTN.l-btn { background: #fbf3df; border-color: #a8463a; }
#guild_disband_BTN.l-btn .l-btn-text { color: #a8463a; font-weight: bold; }
#guild_disband_BTN.l-btn:hover { background: #a8463a; }
#guild_disband_BTN.l-btn:hover .l-btn-text { color: #F6E7C1; }
/* 非會長 */
.gad-locked {
  margin: 60px auto 0;
  max-width: 340px;
  text-align: center;
  padding: 24px 20px;
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-radius: 8px;
}
.gad-locked-icon { font-size: 30px; }
.gad-locked-title { font-size: 14px; font-weight: bold; color: #3b2412; margin: 6px 0 4px; }
.gad-locked-desc { font-size: 12px; color: #9a8463; line-height: 1.6; }
/* ── 商會成員列表（卡片式）──────────────────────── */
.guild_member_name_link { cursor: pointer; }
#guild_members_summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.gml_sum_tile {
  background: linear-gradient(135deg, #4a2d15 0%, #6a4320 100%);
  color: #F6E7C1;
  border-radius: 6px;
  padding: 7px 10px 8px;
  box-shadow: 0 1px 3px rgba(60,35,10,.25);
}
.gml_sum_lbl { font-size: 11px; color: #c9b48a; }
.gml_sum_val { font-size: 18px; font-weight: bold; line-height: 1.3; }
.gml_sum_sub { font-size: 11px; font-weight: normal; color: #e8d6b0; }
.gml_sort_bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  font-size: 12px;
}
.gml_sort_lbl { color: #9a8463; margin-right: 2px; }
.gml_sort {
  padding: 2px 10px;
  border: 1px solid #c9a86a;
  border-radius: 10px;
  color: #5A3412;
  background: #fbf3df;
  text-decoration: none;
}
.gml_sort:hover { border-color: #4a2d15; color: #3b2412; }
.gml_sort.active { background: #4a2d15; border-color: #4a2d15; color: #F6E7C1; }
.gml_row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-left: 3px solid #c9a86a;
  border-radius: 6px;
  transition: box-shadow .12s, border-color .12s;
}
.gml_row:hover { box-shadow: 0 2px 6px rgba(60,35,10,.12); border-color: #c9a86a; }
.gml_leader { border-left-color: #c9a44c; background: linear-gradient(90deg, #fffaf0 0%, #fbf3df 40%); }
.gml_me { border-left-color: #2a6a8c; }
.gml_leader.gml_me { border-left-color: #c9a44c; }
.gml_avatar {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}
.gml_avatar img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 2px solid #d8c39b;
  box-sizing: border-box;
  image-rendering: pixelated;
  background: #2a1709;
}
.gml_leader .gml_avatar img { border-color: #d9b55a; }
.gml_crown {
  position: absolute;
  top: -9px;
  left: -6px;
  font-size: 14px;
  transform: rotate(-18deg);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.gml_dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #fbf3df;
  box-sizing: border-box;
}
.gml_dot_on     { background: #2fb35a; }
.gml_dot_recent { background: #3f7fa6; }
.gml_dot_idle   { background: #c9a86a; }
.gml_dot_off    { background: #e1e6ec; }
.gml_main { flex: 1; min-width: 0; }
.gml_name_row { display: flex; align-items: center; gap: 6px; }
.gml_name {
  font-size: 14px;
  font-weight: bold;
  color: #3b2412;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gml_name:hover { text-decoration: underline; }
.gml_role {
  flex-shrink: 0;
  font-size: 10px;
  padding: 0 6px;
  border-radius: 8px;
  color: #5A3412;
  background: #f3e6c4;
  border: 1px solid #d8c39b;
}
.gml_role_leader { color: #7a5a10; background: #fbefcc; border-color: #e2c66b; }
.gml_online { font-size: 11px; margin-top: 2px; color: #9a8463; }
.gml_online_on     { color: #5d7a2e; font-weight: bold; }
.gml_online_recent { color: #2a6a8c; }
.gml_online_off    { color: #b5c0cc; }
.gml_shares { width: 120px; flex-shrink: 0; }
.gml_shares_top { font-size: 12px; color: #5A3412; display: flex; align-items: baseline; gap: 2px; }
.gml_shares_top strong { font-size: 15px; color: #3b2412; }
.gml_pct { margin-left: auto; font-size: 11px; color: #9a8463; }
.gml_bar {
  height: 5px;
  margin-top: 3px;
  background: #e6d6b0;
  border-radius: 3px;
  overflow: hidden;
}
.gml_bar_fill { height: 100%; background: linear-gradient(90deg, #3f7fa6, #4a2d15); border-radius: 3px; }
.gml_leader .gml_bar_fill { background: linear-gradient(90deg, #e8c45a, #b8892e); }
.gml_contrib { width: 84px; flex-shrink: 0; text-align: right; }
.gml_contrib_lbl { font-size: 11px; color: #9a8463; }
.gml_contrib_val { font-size: 13px; font-weight: bold; color: #4d6a1e; }
.gml_act { width: 44px; flex-shrink: 0; text-align: right; }
.gml_empty { padding: 30px; text-align: center; color: #9a8463; }


/* 驅除連結 */
.guild_kick_link {
  color: #8f1f12;
  text-decoration: none;
  font-size: 11px;
  padding: 1px 6px;
  border: 1px solid #8f1f12;
  border-radius: 3px;
  cursor: pointer;
}
.guild_kick_link:hover {
  background: #8f1f12;
  color: #F6E7C1;
}
/* 申請審核列表 */
.guild_app_row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin-bottom: 5px;
  background: #fbf3df;
  border: 1px solid #ecdcae;
  border-radius: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.guild_app_row:last-child { margin-bottom: 0; }
.guild_app_name   { font-size: 13px; font-weight: bold; color: #3b2412; min-width: 80px; cursor: pointer; }
.guild_app_name:hover { text-decoration: underline; }
.guild_app_profit { color: #7a5c3a; }
.guild_app_profit strong { color: #4d6a1e; }
.guild_app_date   { color: #9a8463; flex: 1; font-size: 11px; }
/* 成員列表：本人標記 */
.guild_me_tag {
  font-size: 10px;
  padding: 0 4px;
  border-radius: 3px;
  background: #e3e8e0;
  color: #1d4f7a;
  vertical-align: middle;
}
/* ── 未加入商會：商會列表（gnl_*）─────────────────── */
#gnl_wrap { display: flex; flex-direction: column; height: 100%; background: #f6ecd2; }
#gnl_hero {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #FBEFD0;
  background:
    radial-gradient(ellipse at 90% -40%, rgba(201,154,46,.45) 0%, rgba(201,154,46,0) 60%),
    linear-gradient(135deg, #2a1709 0%, #4a2d15 55%, #6a4320 100%);
  border-bottom: 3px solid #c9a44c;
}
#gnl_hero_txt { flex: 1; min-width: 0; }
#gnl_hero_title { font-size: 16px; font-weight: bold; color: #F6E7C1; letter-spacing: .5px; }
#gnl_hero_desc { font-size: 11px; color: #e8d6b0; margin-top: 2px; line-height: 1.5; }
#gnl_me { display: flex; gap: 6px; flex-shrink: 0; }
.gnl_me_chip {
  text-align: center;
  padding: 3px 10px 4px;
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
}
.gnl_me_chip span { display: block; font-size: 10px; color: #c9b48a; }
.gnl_me_chip strong { font-size: 13px; color: #F6E7C1; white-space: nowrap; }
.gnl_me_warn { border-color: rgba(232,140,90,.7); background: rgba(232,120,80,.18); }
.gnl_me_warn strong { color: #ffd2b8; }
#gnl_wrap #guild_my_apps { flex-shrink: 0; }
#gnl_toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid #d8c39b;
  background: #fbf3df;
}
#gnl_toolbar input[type=search], #gnl_toolbar select {
  border: 1px solid #c9a86a;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 12px;
  color: #3b2412;
  background: #fbf3df;
  font-family: Microsoft JhengHei;
}
#gnl_search {
  flex: 1;
  min-width: 0;
  padding-left: 26px !important;
  background: #fbf3df url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a7f99' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cline x1='15.5' y1='15.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 9px center !important;
}
#gnl_toolbar input:focus, #gnl_toolbar select:focus { outline: none; border-color: #2a6a8c; box-shadow: 0 0 0 2px rgba(42,106,140,.15); }
#gnl_only_ok_lbl { font-size: 12px; color: #5A3412; white-space: nowrap; cursor: pointer; display: flex; align-items: center; gap: 3px; }
#gnl_list { flex: 1; overflow-y: auto; padding: 8px 10px; }
.gnl_card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 7px;
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-left: 4px solid #2a6a8c;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
  transition: box-shadow .12s, border-color .12s;
}
.gnl_card:hover { box-shadow: 0 2px 8px rgba(60,35,10,.14); }
.gnl_card[data-gid] { cursor: pointer; }
.gnl_card[data-gid] .gnl_act { cursor: default; }
.gnl_card_dim { border-left-color: #c9a86a; }
.gnl_card_dim .gnl_lv { filter: grayscale(.6); opacity: .75; }
.gnl_card_applied { border-left-color: #e0b84a; background: linear-gradient(90deg, #fffaf0 0%, #fbf3df 40%); }
.gnl_lv {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  color: #F6E7C1;
  background: radial-gradient(circle at 35% 30%, #6a4320 0%, #2a1709 75%);
  border: 2px solid #d9b55a;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.gnl_lv span { font-size: 8px; color: #e8cf85; letter-spacing: 1px; font-weight: normal; margin-bottom: 1px; }
.gnl_main { flex: 1; min-width: 0; }
.gnl_name_row { display: flex; align-items: center; gap: 6px; }
.gnl_name { font-size: 14px; font-weight: bold; color: #3b2412; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gnl_tag { flex-shrink: 0; font-size: 10px; font-weight: bold; padding: 0 7px; border-radius: 8px; white-space: nowrap; }
.gnl_tag_open     { color: #4d6a1e; background: #e9edd5; border: 1px solid #b8c98a; }
.gnl_tag_approval { color: #8a6100; background: #fdf3d6; border: 1px solid #ebcf7a; }
.gnl_tag_cond     { color: #1d4f7a; background: #e3e8e0; border: 1px solid #b9cdd2; }
.gnl_intro {
  font-size: 12px;
  color: #5A3412;
  margin: 2px 0 4px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gnl_intro_none { color: #b8a888; font-style: italic; }
.gnl_meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: #7a5c3a; }
.gnl_members { display: inline-flex; align-items: center; gap: 5px; }
.gnl_mbar { display: inline-block; width: 44px; height: 4px; border-radius: 2px; background: #e6d6b0; overflow: hidden; }
.gnl_mbar span { display: block; height: 100%; background: linear-gradient(90deg, #3f7fa6, #4a2d15); }
.gnl_act { flex-shrink: 0; width: 104px; text-align: center; }
.gnl_btn {
  display: inline-block;
  min-width: 78px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  box-sizing: border-box;
}
.gnl_btn_go { color: #F6E7C1; text-shadow: 1px 1px 1px rgba(20,10,0,.8); background: linear-gradient(180deg, #6a4320, #3b2412); border: 1px solid #c9a24a; }
.gnl_btn_go:hover { background: linear-gradient(180deg, #7a5228, #4a2d15); border-color: #e0b85a; }
.gnl_btn_off { color: #9a8463; background: #f3e6c4; border: 1px solid #d8c39b; cursor: not-allowed; }
.gnl_btn_cancel { color: #8a6100; background: #fbf3df; border: 1px solid #e0b84a; }
.gnl_btn_cancel:hover { background: #fdf3d6; }
.gnl_note { font-size: 10px; color: #9a8463; margin-top: 3px; line-height: 1.3; }
.gnl_note_profit, .gnl_note_money, .gnl_note_cooldown { color: #c0561a; }
.gnl_note_applied { color: #8a6100; }
.gnl_empty { padding: 50px 20px; text-align: center; color: #9a8463; font-size: 13px; line-height: 1.8; }
.gnl_empty_icon { font-size: 28px; }
.gnl_go_create { color: #1d4f7a; font-weight: bold; }
/* ── 未加入商會：建立商會（gnc_*）────────────────── */
#gnc_wrap { display: flex; gap: 12px; padding: 12px; height: 100%; box-sizing: border-box; background: #f6ecd2; }
#gnc_form {
  flex: 1;
  min-width: 0;
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
  display: flex;
  flex-direction: column;
}
.gnc_field { margin-bottom: 12px; }
.gnc_field label { display: block; font-size: 13px; font-weight: bold; color: #3b2412; margin-bottom: 4px; }
.gnc_rule { font-size: 11px; font-weight: normal; color: #9a8463; margin-left: 4px; }
.gnc_input_wrap { position: relative; }
#guild_create_name, #guild_create_intro {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c9a86a;
  border-radius: 6px;
  padding: 7px 56px 7px 10px;
  font-size: 13px;
  font-family: Microsoft JhengHei;
  color: #3b2412;
}
#guild_create_intro { height: 74px; resize: none; line-height: 1.5; }
#guild_create_name:focus, #guild_create_intro:focus { outline: none; border-color: #2a6a8c; box-shadow: 0 0 0 2px rgba(42,106,140,.15); }
#guild_create_name.gnc_bad { border-color: #a8463a; box-shadow: 0 0 0 2px rgba(168,70,58,.15); }
.gnc_cnt { position: absolute; right: 9px; bottom: 7px; font-size: 10px; color: #b8a888; }
.gnc_err { font-size: 11px; color: #a8463a; min-height: 15px; margin-top: 2px; }
#gnc_checks { background: #f6ecd2; border: 1px solid #e6d6b0; border-radius: 6px; padding: 8px 12px; }
.gnc_checks_title { font-size: 11px; font-weight: bold; color: #7a5c3a; margin-bottom: 4px; }
.gnc_check { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 0; color: #5A3412; }
.gnc_check_icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #F6E7C1;
  flex-shrink: 0;
}
.gnc_check.ok .gnc_check_icon { background: #5d7a2e; }
.gnc_check.ng .gnc_check_icon { background: #a8463a; }
.gnc_check.ng { color: #8f1f12; }
.gnc_check_cur { margin-left: auto; font-size: 11px; color: #9a8463; }
.gnc_foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.gnc_cost { font-size: 12px; color: #7a5c3a; }
.gnc_cost strong { font-size: 15px; color: #9a7415; }
#gnc_side {
  width: 190px;
  flex-shrink: 0;
  border-radius: 8px;
  padding: 14px 14px;
  color: #e8d6b0;
  background: linear-gradient(160deg, #2a1709 0%, #4a2d15 60%, #6a4320 100%);
  border-bottom: 3px solid #c9a44c;
  box-sizing: border-box;
}
.gnc_side_title { font-size: 14px; font-weight: bold; color: #f3d98a; margin-bottom: 8px; }
#gnc_side ul { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.8; }
#gnc_side li strong { color: #F6E7C1; }
.gnc_side_note { margin-top: 10px; font-size: 11px; color: #c9b48a; line-height: 1.6; border-top: 1px dashed rgba(255,255,255,.2); padding-top: 8px; }
/* 商會列表：本人待審申請 */
#guild_my_apps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 6px 10px;
  background: #fff8e8;
  border-bottom: 1px solid #f0dfb8;
  font-size: 12px;
  color: #6a4a10;
}
.guild_my_apps_lbl  { font-weight: bold; color: #b05000; }
.guild_my_app       { display: inline-flex; align-items: center; gap: 4px; }
.guild_my_app_meta  { color: #9a8463; font-size: 11px; }
/* ── 商會現況（#guild_panel_status）──────────────── */
#gst_hero {
  border-radius: 8px;
  overflow: hidden;
  color: #FBEFD0;
  background:
    radial-gradient(ellipse at 90% -30%, rgba(201,154,46,.45) 0%, rgba(201,154,46,0) 60%),
    linear-gradient(135deg, #2a1709 0%, #4a2d15 55%, #6a4320 100%);
  border-bottom: 3px solid #c9a44c;
  box-shadow: 0 2px 6px rgba(15,42,74,.25);
}
#gst_hero_top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 10px;
}
#gst_emblem {
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, #6a4320 0%, #2a1709 75%);
  border: 3px solid #d9b55a;
  box-shadow: 0 0 0 2px rgba(217,181,90,.35), 0 2px 6px rgba(0,0,0,.4);
}
.gst_emblem_lv {
  font-size: 10px;
  letter-spacing: 1px;
  color: #e8cf85;
  line-height: 1;
}
#guild_level_badge {
  font-size: 24px;
  font-weight: bold;
  color: #F6E7C1;
  line-height: 1.05;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
#gst_hero_main { flex: 1; min-width: 0; }
#guild_my_name {
  font-size: 20px;
  font-weight: bold;
  color: #F6E7C1;
  letter-spacing: .5px;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#guild_my_intro {
  font-size: 12px;
  color: #e8d6b0;
  margin: 2px 0 6px;
  line-height: 1.5;
}
.guild_empty_intro { color: #8fa9c9; font-style: italic; }
#guild_my_meta { display: flex; flex-wrap: wrap; gap: 5px; }
.gst_chip {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #e8d6b0;
  white-space: nowrap;
}
#guild_growth_wrap {
  padding: 8px 16px 11px;
  background: rgba(0,0,0,.18);
}
#guild_growth_label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #e8d6b0;
  margin-bottom: 4px;
}
#guild_growth_label strong { color: #F6E7C1; }
.gst_growth_next strong { color: #f3d98a; }
#guild_growth_bar_wrap {
  height: 7px;
  background: rgba(255,255,255,.15);
  border-radius: 4px;
  overflow: hidden;
}
#guild_growth_bar {
  height: 100%;
  min-width: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8c45a, #f6e7a6);
  box-shadow: 0 0 6px rgba(246,231,166,.6);
  transition: width .4s;
}
/* 財務四格 */
#guild_my_finance {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.gst_tile {
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-top: 3px solid #4a2d15;
  border-radius: 6px;
  padding: 6px 10px 7px;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
}
.gst_tile_gold  { border-top-color: #c9a44c; }
.gst_tile_green { border-top-color: #5d7a2e; }
.gst_tile_muted { border-top-color: #c9a86a; }
.gst_tile_lbl { font-size: 11px; color: #7a5c3a; }
.gst_tile_val {
  font-size: 19px;
  font-weight: bold;
  color: #3b2412;
  line-height: 1.3;
  white-space: nowrap;
}
.gst_tile_val small { font-size: 11px; font-weight: normal; color: #7a5c3a; margin-left: 1px; }
.gst_tile_green .gst_tile_val { color: #4d6a1e; }
.gst_tile_gold .gst_tile_val  { color: #9a7415; }
.gst_tile_muted .gst_tile_val { color: #9a8463; }
.gst_tile_sub { font-size: 10px; color: #9a8463; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 我的帳戶 */
#gst_mine {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-left: 3px solid #b8892e;
  border-radius: 6px;
}
.gst_mine_col { padding: 9px 12px 10px; }
/* 我的奉獻比例 */
#gst_tithe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding: 7px 12px; background: #fbf3df; border: 1px solid #d8c39b; border-left: 3px solid #c9a44c; border-radius: 6px; }
.gst_tithe_lbl { font-size: 11px; font-weight: bold; color: #7a5c3a; }
#guild_tithe_range { flex: 1; min-width: 120px; accent-color: #c9a44c; }
.gst_tithe_num input { width: 46px; text-align: right; font-weight: bold; color: #3b2412; }
#guild_tithe_hint { flex-basis: 100%; }
.gst_mine_col + .gst_mine_col { border-left: 1px dashed #d8c39b; }
.gst_mine_lbl { font-size: 11px; font-weight: bold; color: #7a5c3a; }
.gst_mine_val { font-size: 12px; color: #7a5c3a; margin: 1px 0 4px; }
.gst_mine_val strong { font-size: 20px; color: #3b2412; margin-right: 2px; }
.gst_mine_bar {
  height: 5px;
  background: #e6d6b0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
#guild_my_shares_bar { height: 100%; background: linear-gradient(90deg, #c9a24a, #6a4320); border-radius: 3px; }
#guild_dividend_rate_txt { font-size: 12px; color: #5A3412; margin-bottom: 6px; min-height: 18px; }
#guild_dividend_rate_txt strong { color: #4d6a1e; }
.gst_hint { font-size: 11px; color: #9a8463; }
.gst_mine_act { display: flex; align-items: center; gap: 6px; min-height: 26px; }
#guild_invest_note { font-size: 11px; color: #9a8463; }
#guild_my_btns { flex-shrink: 0; align-self: flex-start; }
#guild_leave_BTN.l-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }
#guild_leave_BTN.l-btn .l-btn-text { color: #e8d6b0; }
#guild_leave_BTN.l-btn:hover { background: rgba(201,68,60,.85); border-color: #e0736b; }
#guild_leave_BTN.l-btn:hover .l-btn-text { color: #F6E7C1; }
/* ── 商會告示板 ───────────────────────────── */
#guild_bulletin_wrap {
  margin: 10px 0 0;
  border: 1px solid #e3d6a4;
  border-radius: 6px;
  background: #fffcf0;
  box-shadow: 0 1px 2px rgba(122,96,16,.08);
  min-height: 70px;
  max-height: 150px;
  overflow-y: auto;
}
#guild_bulletin_label {
  position: sticky;
  top: 0;
  font-size: 12px;
  font-weight: bold;
  color: #7a6010;
  padding: 5px 10px 4px;
  border-bottom: 1px solid #efe3b5;
  background: #fbf2cf;
}
#guild_bulletin_content {
  padding: 7px 12px 9px;
  font-size: 12px;
  color: #4a4430;
  line-height: 1.7;
  word-break: break-all;
}
/* ── 商會物價情報 ──────────────────────────── */
#guild_panel_market {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background: #f6ecd2;
  border-radius: 8px;
  border: 1px solid #d8c39b;
}
#gmi_toolbar {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #2a1709 0%, #4a2d15 60%, #6a4320 100%);
  border-bottom: 3px solid #c9a44c;
  flex-shrink: 0;
}
#gmi_toolbar input, #gmi_toolbar select {
  flex: 1;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.95);
  color: #3b2412;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: Microsoft JhengHei;
}
#gmi_toolbar input {
  flex: 1.4;
  padding-left: 26px;
  background: rgba(255,255,255,.95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a7f99' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cline x1='15.5' y1='15.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 9px center;
}
#gmi_expand_all {
  flex-shrink: 0;
  border: 1px solid #c9a44c;
  background: rgba(232,196,90,.15);
  color: #f6e7a6;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: Microsoft JhengHei;
  white-space: nowrap;
  cursor: pointer;
}
#gmi_expand_all:hover { background: rgba(232,196,90,.3); color: #F6E7C1; }
#gmi_toolbar input:focus, #gmi_toolbar select:focus {
  outline: none;
  border-color: #e8c45a;
  box-shadow: 0 0 0 2px rgba(232,196,90,.35);
}
#gmi_summary {
  flex-shrink: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #d8c39b;
}
.gmi_cards {
  display: grid;
  grid-template-columns: 1.7fr 1.1fr 1.5fr 1.2fr;
  gap: 8px;
}
.gmi_card {
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-top: 3px solid #4a2d15;
  border-radius: 6px;
  padding: 5px 10px 7px;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
  min-width: 0;
}
.gmi_card_prog { border-top-color: #2a6a8c; }
.gmi_card_mvp  { border-top-color: #c9a44c; }
.gmi_week_card { border-top-color: #5d7a2e; text-align: right; }
.gmi_card_label { font-size: 11px; color: #7a5c3a; margin-bottom: 1px; }
.gmi_card_val   { font-size: 18px; font-weight: 700; color: #3b2412; line-height: 1.25; display: flex; align-items: baseline; gap: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmi_week_card .gmi_card_val { justify-content: flex-end; }
.gmi_card_top   { font-size: 14px; color: #7a5a10; }
.gmi_card_sub   { font-size: 11px; font-weight: 400; color: #9a8463; }
.gmi_card_pct   { margin-left: auto; font-size: 12px; color: #2a6a8c; }
.gmi_bar        { height: 5px; background: #e6d6b0; border-radius: 99px; margin-top: 4px; overflow: hidden; }
.gmi_bar_fill   { height: 100%; background: linear-gradient(90deg,#3f7fa6,#5d7a2e); border-radius: 99px; }
#gmi_list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.gmi_loading, .gmi_empty {
  color: #9a8463;
  font-size: 13px;
  padding: 40px 20px;
  text-align: center;
}
/* 海域 */
.gmi_sea {
  margin-bottom: 8px;
  border: 1px solid #d8c39b;
  border-radius: 7px;
  overflow: hidden;
  background: #fbf3df;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
}
.gmi_sea_hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(90deg,#4a2d15,#6a4320);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #F6E7C1;
  user-select: none;
}
.gmi_sea_hd:hover { background: linear-gradient(90deg,#3b2412,#1d4f7a); }
.gmi_sea_toggle { font-size: 10px; color: #e8cf85; width: 10px; }
.gmi_sea_stat   { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 400; color: #e8d6b0; }
.gmi_sea_minibar { width: 60px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.gmi_sea_minibar span { display: block; height: 100%; background: linear-gradient(90deg,#e8c45a,#f6e7a6); }
.gmi_sea.gmi_collapsed .gmi_sea_body { display: none; }
/* 港口 */
.gmi_port { border-top: 1px solid #e6d6b0; border-left: 3px solid #c9a86a; }
.gmi_port_done    { border-left-color: #5d7a2e; }
.gmi_port_partial { border-left-color: #e0b84a; }
.gmi_port_hd {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  background: #f6ecd2;
  cursor: pointer;
}
.gmi_port_hd:hover { background: #f3e6c4; }
.gmi_port_name { font-weight: 700; font-size: 13px; color: #3b2412; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.gmi_port_toggle { font-size: 9px; color: #9a8463; width: 9px; margin-right: -2px; }
.gmi_port_meta { font-size: 11px; color: #9a8463; white-space: nowrap; }
.gmi_who       { color: #5A3412; }
.gmi_status    { border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.gmi_status_done    { background: #e9edd5; color: #4d6a1e; border: 1px solid #b8c98a; }
.gmi_status_partial { background: #fdf3d6; color: #8a6100; border: 1px solid #ebcf7a; }
.gmi_status_none    { background: #f3e6c4; color: #7a5c3a; border: 1px solid #d8c39b; }
.gmi_port.gmi_port_closed .gmi_goods_list { display: none; }
.gmi_port_none .gmi_goods_list { opacity: .8; }
/* 交易品 */
.gmi_goods_list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px 12px 10px 10px;
}
.gmi_goods {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #e6d6b0;
  background: #fbf3df;
  border-radius: 6px;
  min-width: 0;
}
.gmi_goods:hover { border-color: #c9a86a; box-shadow: 0 1px 4px rgba(60,35,10,.1); }
.gmi_goods_low { border-color: #b8c98a; background: linear-gradient(90deg, #eef2df 0%, #fbf3df 55%); }
.gmi_goods_unk { border-style: dashed; background: #f6ecd2; }
.gmi_goods_unk .gmi_goods_icon img { filter: grayscale(.7); opacity: .55; }
.gmi_goods_icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #f3e6c4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gmi_goods_icon img { width: 28px; height: 28px; display: block; }
.gmi_goods_info { min-width: 0; }
.gmi_goods_name { font-size: 12px; font-weight: 700; color: #3b2412; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.gmi_goods_time { font-size: 10px; color: #9a8463; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmi_goods_time.gmi_stale { color: #c07a1a; }
.gmi_low_tag {
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
  color: #F6E7C1;
  background: #5d7a2e;
}
.gmi_price      { text-align: right; font-size: 12px; line-height: 1.55; min-width: 72px; font-variant-numeric: tabular-nums; }
.gmi_price_row  { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.gmi_price_lbl  { font-size: 9px; font-weight: 700; padding: 0 3px; border-radius: 3px; color: #9a8463; background: #f3e6c4; }
.gmi_lbl_buy    { color: #F6E7C1; background: #a8463a; }
.gmi_lbl_sell   { color: #F6E7C1; background: #5d7a2e; }
.gmi_price_buy  { color: #8f1f12; font-weight: 700; }
.gmi_price_sell { color: #4d6a1e; font-weight: 700; }
.gmi_price_unk  { color: #b5c0cc; }
/* 物價指數／基準價比例 */
.gmi_idx        { font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 99px; white-space: nowrap; color: #5A3412; background: #f3e6c4; border: 1px solid #d8c39b; }
.gmi_idx.is-low  { color: #4d6a1e; background: #e9edd5; border-color: #b8c98a; }
.gmi_idx.is-high { color: #8a6100; background: #fdf3d6; border-color: #ebcf7a; }
.gmi_idx.is-halt { color: #8f1f12; background: #f5e3da; border-color: #d9a08f; }
.gmi_base_pct   { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; line-height: 16px; white-space: nowrap; color: #7a5c3a; background: #f6ecd2; border: 1px solid #d8c39b; margin-right: 2px; }
.gmi_base_pct.is-good { color: #4d6a1e; background: #e9edd5; border-color: #b8c98a; }
.gmi_base_pct.is-bad  { color: #8f1f12; background: #f5e3da; border-color: #d9a08f; }
.gmi_price_row + .gmi_price_row { margin-top: 2px; }
.gmi_base       { font-size: 10px; color: #b5c0cc; }
/* 流行品標籤 */
.gmi_popular {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #8a5c10;
  background: #fdf1d0;
  border: 1px solid #ebcf7a;
  border-radius: 10px;
  padding: 0 7px 0 3px;
  white-space: nowrap;
}
.gmi_pop_icon   { width: 14px; height: 14px; vertical-align: middle; border-radius: 2px; }
/* ── 商會側欄 ─────────────────────────────── */
#guild_myguild_wrap {
  display: flex;
  height: 100%;
  overflow: hidden;
}
#guild_sidebar {
  width: 100px;
  min-width: 100px;
  background: #2a1709;
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  box-sizing: border-box;
}
.guild_menu_item {
  display: block;
  padding: 9px 12px;
  color: #e8d6b0;
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background 0.1s;
}
.guild_menu_item:hover {
  background: rgba(255,255,255,0.10);
  color: #F6E7C1;
  text-decoration: none;
}
.guild_menu_item.active {
  background: rgba(255,255,255,0.15);
  color: #F6E7C1;
  border-left-color: #f0c040;
  font-weight: bold;
}
#guild_content {
  flex: 1;
  overflow: auto;
  padding: 8px;
  box-sizing: border-box;
}
#guild_panel_status {
  height: 100%;
}
.guild_wip {
  padding: 60px 20px;
  color: #9a8463;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.05em;
}

/* ── 商會任務面板（docs/guild_ship_spec.md 二）── */
.gtk-hero { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gtk-goods { flex: none; width: 40px; height: 40px; border-radius: 8px; background: #fbf3df; border: 1px solid #d8c39b; display: flex; align-items: center; justify-content: center; }
.gtk-goods img { max-width: 34px; max-height: 34px; }
.gtk-hero-main { flex: 1; min-width: 0; }
.gtk-title { font-size: 15px; font-weight: bold; color: #3b2412; }
.gtk-meta { font-size: 12px; color: #5A3412; margin-top: 2px; }
.gtk-meta b { color: #9a6400; }
.gtk-st { font-size: 11px; font-weight: bold; border-radius: 10px; padding: 1px 8px; margin-left: 4px; color: #5A3412; background: #f3e6c4; vertical-align: 2px; }
.gtk-st-run { color: #1d4f7a; background: #e3e8e0; }
.gtk-st-done { color: #4d6a1e; background: #e9edd5; }
.gtk-bar { position: relative; height: 18px; border-radius: 9px; background: #e6d6b0; overflow: hidden; margin-bottom: 10px; }
.gtk-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e0b04a, #c9a44c); }
.gtk-bar span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 18px; font-weight: bold; color: #3b2412; }
#gtk_tiles, #gsd_summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
#gsd_summary { grid-template-columns: 1fr 1fr 2fr; }
.gtk-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; }
.gtk-empty .cp-ic { width: 48px; height: 48px; margin: 0 0 4px; background-size: 48px 48px; filter: drop-shadow(0 3px 6px rgba(60,35,10,.3)); }
.gtk-empty b { color: #3b2412; font-size: 14px; }
.gtk-empty small { font-size: 12px; color: #9a8463; }
.gtk-wallet { margin-bottom: 10px; padding: 6px 10px; border-radius: 6px; background: #fff8e6; border: 1px solid #e8d18f; font-size: 12px; color: #5c4a12; }
.gtk-wallet b { color: #9a6400; }
.gtk-wallet small { margin-left: 8px; color: #8a7a4e; }
.gtk-table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fbf3df; }
.gtk-table th { text-align: left; font-weight: normal; color: #7a5c3a; border-bottom: 1px solid #d8c39b; padding: 3px 6px; }
.gtk-table td { padding: 4px 6px; border-bottom: 1px solid #f3e6c4; color: #3b2412; font-variant-numeric: tabular-nums; }
.gtk-table tr.is-me td { background: #fffaf0; font-weight: bold; }
.gtk-left { color: #8f1f12; }
/* ── 船艦開發面板（docs/guild_ship_spec.md 一）── */
.gsd-ports-val { font-size: 13px; white-space: normal; line-height: 1.5; }
.gsd-card .gcd-card-hd { margin-bottom: 4px; }
.gsd-img { height: 22px; }
.gsd-del { margin-left: 6px; font-size: 11px; color: #8f1f12 !important; }
.gsd-stats { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 11px; color: #5A3412; }
.gsd-stats span { background: #f6ecd2; border-radius: 4px; padding: 0 6px; line-height: 18px; }
.gsd-stats b { color: #3b2412; }
.gsd-stats .gsd-dim { background: none; color: #9a8463; }
.gsd-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; color: #5A3412; }
.gsd-row select { flex: 1; min-width: 0; height: 26px; }
.gsd-row input { width: 140px; height: 24px; }
.gsd-tbl { width: 100%; border-collapse: collapse; font-size: 12px; background: #fbf3df; }
.gsd-tbl th { text-align: left; font-weight: normal; color: #7a5c3a; border-bottom: 1px solid #d8c39b; padding: 3px 6px; }
.gsd-tbl td { padding: 3px 6px; border-bottom: 1px solid #f3e6c4; }
.gsd-ctl { white-space: nowrap; }
.gsd-ctl b { display: inline-block; width: 24px; text-align: center; }
.gsd-sb { cursor: pointer; display: inline-block; width: 20px; height: 20px; line-height: 18px; text-align: center; border-radius: 50%; border: 1px solid #c9a86a; background: #fbf3df; color: #3b2412 !important; font-weight: bold; text-decoration: none !important; user-select: none; }
.gsd-sb:hover { background: #e3e8e0; }
.gsd-rule { font-size: 10px; color: #9a8463; }
.gsd-sum { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: #5A3412; }
.gsd-sum b { color: #3b2412; }
.gsd-sum b.yd-down { color: #8f1f12; }
.gsd-err { margin-top: 6px; font-size: 12px; color: #8f1f12; }
.gsd-warn { margin-top: 6px; font-size: 12px; color: #c0561a; }
.gsd-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 8px; }
.gsd-btn { cursor: pointer; padding: 5px 16px; border-radius: 6px; font-size: 13px; font-weight: bold; color: #F6E7C1 !important; text-decoration: none !important; background: linear-gradient(180deg, #d6a73c, #a67a1e); border: 1px solid #8a6418; }
.gsd-btn.is-off { cursor: not-allowed; background: #e6d6b0; border-color: #d8c39b; color: #9a8463 !important; }

/* 確保 EasyUI messager 彈窗永遠在最上層 */
.messager-window { z-index: 100000 !important; }

/* ── 商會城市支配版圖面板 ────────────────────────────────────── */
#gcd_content { padding: 0; }
#gcd_summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.gcd-tile {
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-top: 3px solid #4a2d15;
  border-radius: 6px;
  padding: 6px 10px 7px;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
  min-width: 0;
}
.gcd-tile-gold  { border-top-color: #c9a44c; }
.gcd-tile-blue  { border-top-color: #2a6a8c; }
.gcd-tile-green { border-top-color: #5d7a2e; }
.gcd-tile-lbl { font-size: 11px; color: #7a5c3a; }
.gcd-tile-val { font-size: 19px; font-weight: bold; color: #3b2412; line-height: 1.3; white-space: nowrap; }
.gcd-tile-val small { font-size: 11px; font-weight: normal; color: #7a5c3a; }
.gcd-tile-sub { font-size: 11px; color: #9a8463; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcd-warn-txt { color: #c0561a; font-weight: bold; }
.gcd-ok-txt   { color: #4d6a1e; font-weight: bold; }
.gcd-section { margin-bottom: 12px; }
.gcd-section-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: bold;
  color: #3b2412;
  border-bottom: 1px solid #d8c39b;
  padding-bottom: 4px;
  margin-bottom: 7px;
}
.gcd-section-sub { font-size: 11px; font-weight: normal; color: #9a8463; }
/* 城市卡 */
.gcd-card {
  background: #fbf3df;
  border: 1px solid #d8c39b;
  border-left: 4px solid #c9a86a;
  border-radius: 6px;
  padding: 8px 12px 8px;
  margin-bottom: 7px;
  box-shadow: 0 1px 2px rgba(60,35,10,.06);
}
.gcd-card-safe  { border-left-color: #c9a44c; background: linear-gradient(90deg, #fffaf0 0%, #fbf3df 35%); }
.gcd-card-alert { border-left-color: #a8463a; background: linear-gradient(90deg, #f5e3da 0%, #fbf3df 40%); }
.gcd-card-proj  { border-left-color: #5d7a2e; background: linear-gradient(90deg, #eef2df 0%, #fbf3df 40%); }
.gcd-card-chase { border-left-color: #3f7fa6; }
.gcd-card-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.gcd-city { font-size: 14px; font-weight: bold; color: #3b2412; white-space: nowrap; }
.gcd-area {
  font-size: 10px;
  color: #5A3412;
  background: #f3e6c4;
  border: 1px solid #d8c39b;
  border-radius: 8px;
  padding: 0 6px;
  white-space: nowrap;
}
.gcd-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: bold;
  border-radius: 10px;
  padding: 1px 9px;
  white-space: nowrap;
}
.gcd-badge-safe  { color: #7a5a10; background: #fbefcc; border: 1px solid #e2c66b; }
.gcd-badge-alert { color: #F6E7C1; background: #a8463a; border: 1px solid #a8463a; animation: gcd-pulse 1.6s ease-in-out infinite; }
.gcd-badge-proj  { color: #4d6a1e; background: #e9edd5; border: 1px solid #b8c98a; }
.gcd-badge-chase { color: #1d4f7a; background: #e3e8e0; border: 1px solid #b9cdd2; }
@keyframes gcd-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(168,70,58,.45); } 50% { box-shadow: 0 0 0 4px rgba(168,70,58,0); } }
/* 我方 vs 對手 */
.gcd-duel { display: flex; align-items: center; gap: 10px; }
.gcd-side { width: 92px; flex-shrink: 0; min-width: 0; }
.gcd-rival { text-align: right; }
.gcd-side-lbl { font-size: 10px; color: #9a8463; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcd-side-val { font-size: 13px; font-weight: bold; color: #3b2412; white-space: nowrap; }
.gcd-me .gcd-side-val { color: #1d4f7a; }
.gcd-rival .gcd-side-val { color: #8f1f12; }
.gcd-duel-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(90deg, #d9a08f, #a8463a);
}
.gcd-duel-me {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4a2d15, #3f7fa6);
  border-right: 2px solid #fbf3df;
  box-sizing: border-box;
}
.gcd-card-safe .gcd-duel-me { background: linear-gradient(90deg, #b8892e, #e8c45a); }
.gcd-card-ft { margin-top: 6px; font-size: 12px; color: #5A3412; }
.gcd-card-ft strong { color: #3b2412; }
.gcd-ft-dim { color: #9a8463; }
.gcd-empty {
  padding: 16px 8px;
  color: #9a8463;
  font-size: 12px;
  text-align: center;
  background: #fbf3df;
  border: 1px dashed #d8c39b;
  border-radius: 6px;
}
.gcd-foot {
  font-size: 11px;
  color: #9a8463;
  line-height: 1.6;
  padding: 8px 10px;
  background: #f6ecd2;
  border-radius: 6px;
}

/* 商會對話框：羊皮紙海圖底、未入會分頁（EasyUI tabs）改深木／羊皮紙、圖示尺寸 */
#guild_Dialog{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; color:#2e1d0c; }
#guild_Dialog .cp-ic{ margin-right:3px; vertical-align:-3px; }
#guild_nonguild_tabs > .tabs-header{ border:0; background:linear-gradient(180deg,#4a2d15,#2a1709); border-bottom:2px solid #b8892e; }
#guild_nonguild_tabs > .tabs-header .tabs{ border:0; }
#guild_nonguild_tabs > .tabs-header .tabs li .tabs-inner{ border:0; color:#e8d6b0; font-weight:bold; letter-spacing:1px; text-shadow:1px 1px 1px rgba(20,10,0,.8); background:transparent; }
#guild_nonguild_tabs > .tabs-header .tabs li .tabs-inner:hover{ color:#FFF4D6; background:rgba(232,199,122,.15); }
#guild_nonguild_tabs > .tabs-header .tabs li.tabs-selected .tabs-inner,
#guild_nonguild_tabs > .tabs-header .tabs li.tabs-selected .tabs-inner:hover{ color:#5A3412; text-shadow:none; background:linear-gradient(180deg,#f6ead0,#e3cf9f); box-shadow:inset 0 3px 0 #c9a24a; }
#guild_nonguild_tabs .tabs-panels{ border:0; background:transparent; }
.gnl_empty_icon .cp-ic{ width:30px; height:30px; margin:0; background-size:30px 30px; }
.gml_crown .cp-ic{ width:16px; height:16px; margin:0; background-size:16px 16px; vertical-align:0; }
.gcd-section-hd .cp-ic, #guild_bulletin_label .cp-ic{ vertical-align:-3px; }
#guild_sidebar{ background:linear-gradient(180deg,#4a2d15,#2a1709); box-shadow:inset -2px 0 0 #b8892e; }
#guild_Dialog a.l-btn:not(.l-btn-plain){ color:#F6E7C1; text-shadow:1px 1px 1px rgba(20,10,0,.8); background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(232,199,122,.25); filter:none; }
#guild_Dialog a.l-btn:not(.l-btn-plain):hover{ background:linear-gradient(180deg,#7a5228,#4a2d15); border-color:#e0b85a; color:#FFF4D6; }
#guild_Dialog a.l-btn:not(.l-btn-plain) .l-btn-text{ color:inherit; }
#guild_Dialog a.l-btn.l-btn-disabled, #guild_Dialog a.l-btn.l-btn-disabled:hover{ opacity:.55; background:linear-gradient(180deg,#6a4320,#3b2412); }
#gsd_reset{ color:#5A3412; font-size:12px; text-decoration:underline; }
#guild_Dialog #guild_disband_BTN, #guild_Dialog #guild_leave_BTN{ color:#fbe9e4; background:linear-gradient(180deg,#9a3a28,#6a1e12); border-color:#c9876a; }
#guild_Dialog #guild_disband_BTN:hover, #guild_Dialog #guild_leave_BTN:hover{ background:linear-gradient(180deg,#ad4430,#7a2416); border-color:#e0a088; color:#fff4ee; }
.gcd-tile.gsd-ports{ min-width:0; }
.gcd-tile.gsd-ports .gsd-ports-val, .gcd-tile.gsd-ports .gcd-warn-txt{ white-space:normal; font-size:13px; line-height:1.5; }
.gad-icon .cp-ic, .gad-locked-icon .cp-ic{ margin:0; vertical-align:-3px; }
.gad-locked-icon .cp-ic{ width:30px; height:30px; background-size:30px 30px; }

/* ── 城鎮介面：城市支配權（page.Action.City.php；大航海風格：羊皮紙海圖底、黃銅框、羊皮紙卡）──────────────── */
#city_dom_panel {
  box-sizing: border-box;
  width: 297px;
  padding: 8px 10px 12px;
  font-size: 12px;
  color: #2e1d0c;
  border-radius: 6px;
  background: #E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center;
  background-size: cover;
  border: 1px solid #8a6a3a;
  box-shadow: inset 0 0 0 1px rgba(232,199,122,.45), 0 2px 4px rgba(60,35,10,.3);
}
#city_dom_empty {
  color: #7a5c3a;
  text-align: center;
  padding: 40px 0;
  line-height: 1.8;
  font-size: 13px;
}
#city_dom_empty span { font-size: 11px; color: #9a8463; }
.city_empty_icon { width: 32px; height: 32px; margin: 0 auto 4px; background: url('images/uw_ic_anchor.png') no-repeat center center / 32px 32px; opacity: .85; }
#city_dom_panel .cp-ic { margin-right: 4px; }
/* 卡片 */
#city_dom_card {
  background: rgba(255,249,232,.6);
  border: 1px solid #c9a86a;
  border-radius: 4px;
  padding: 8px 10px 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15);
}
#city_dom_card.city_dom_mine { border-color: #b8892e; background: linear-gradient(180deg, rgba(255,240,200,.85) 0%, rgba(255,249,232,.6) 45%); box-shadow: inset 0 0 0 1px #e8c77a, 0 1px 3px rgba(120,80,20,.3); }
.city_card_hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #5A3412;
  margin-bottom: 6px;
}
.city_card_hd > span { display: inline-flex; align-items: center; }
.city_card_sub { font-size: 10px; font-weight: normal; letter-spacing: 0; color: #7a5c3a; }
.city_card_sub .cp-ic { width: 13px; height: 13px; background-size: 13px 13px; margin-right: 2px; }
#city_dom_header {
  background: linear-gradient(180deg, #5a3a1c, #3b2412);
  border: 1px solid #c9a24a;
  border-radius: 4px;
  padding: 7px 9px 6px;
  margin-bottom: 8px;
  box-shadow: inset 0 0 0 1px rgba(232,199,122,.25);
}
#city_dom_status_row, #city_dom_week_row {
  display: flex;
  align-items: center;
  gap: 6px;
}
#city_dom_week_row { margin-top: 4px; }
.city_dom_badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: bold;
  padding: 0 6px;
  border-radius: 3px;
  color: #3a2410;
  background: linear-gradient(180deg, #f3dd9a, #c99a2e);
  border: 1px solid #7a5518;
}
.city_dom_badge_week { color: #fbe9e4; background: linear-gradient(180deg, #b5543b, #7f2418); border-color: #5a1a10; }
.city_dom_badge_mine { color: #e8f2f8; background: linear-gradient(180deg, #3f7fa6, #1d4f7a); border-color: #123552; }
#city_dom_leader_name {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-weight: bold;
  font-size: 14px;
  color: #FBEFD0;
  text-shadow: 1px 1px 2px rgba(20,10,0,.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#city_dom_week_name { font-size: 12px; font-weight: bold; color: #f0b8a8; text-shadow: 1px 1px 1px rgba(20,10,0,.7); }
#city_dom_total_row { font-size: 11px; color: #e8d6b0; margin-top: 4px; }
#city_dom_total_row strong { color: #f6dc8f; }
/* 排名（名次徽章：金／銀／銅） */
#city_dom_list { padding: 0 0 2px; }
.city_dom_row { margin-bottom: 7px; padding: 3px 4px; border-radius: 3px; }
.city_dom_row_mine { background: rgba(63,127,166,.14); box-shadow: inset 0 0 0 1px rgba(29,79,122,.3); }
.city_dom_row_hd { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }
.city_dom_rank { width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 10px; font-weight: 900; flex-shrink: 0; border-radius: 50%; color: #3a2410; background: radial-gradient(circle at 35% 30%, #fff6d8, #c9b48a 70%); box-shadow: 0 0 0 1px rgba(60,35,10,.55), inset 0 -1px 1px rgba(0,0,0,.2); }
.city_dom_rank_1 { background: radial-gradient(circle at 35% 30%, #fff3b8, #e0b040 55%, #a8781a); }
.city_dom_rank_2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c4ccd4 55%, #828d98); }
.city_dom_rank_3 { color: #fbe9d8; background: radial-gradient(circle at 35% 30%, #f3c39a, #b87440 55%, #7a4420); }
.city_dom_gname { flex: 1; min-width: 0; font-weight: bold; color: #3b2412; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city_dom_row_mine .city_dom_gname { color: #1d4f7a; }
.city_dom_amt { font-size: 11px; color: #7a5c3a; flex-shrink: 0; }
.city_dom_pct { width: 38px; text-align: right; color: #9a8463; font-size: 10px; flex-shrink: 0; }
.city_dom_bar_wrap { height: 6px; background: rgba(90,60,25,.18); box-shadow: inset 0 1px 1px rgba(60,35,10,.25); border-radius: 3px; overflow: hidden; }
.city_dom_bar { height: 100%; border-radius: 3px; min-width: 2px; }
.city_dom_bar_1 { background: linear-gradient(90deg, #9a6c1e, #e0b85a 70%, #f6dc8f); }
.city_dom_bar_2 { background: linear-gradient(90deg, #828d98, #c4ccd4); }
.city_dom_bar_3 { background: linear-gradient(90deg, #7a4420, #c9875a); }
.city_dom_row_mine .city_dom_bar { background: linear-gradient(90deg, #4f8fae, #1d4f7a); }
.city_dom_myrank { font-size: 11px; color: #1d4f7a; text-align: center; padding: 4px; background: rgba(63,127,166,.14); border: 1px solid rgba(29,79,122,.3); border-radius: 3px; margin-bottom: 4px; }
.city_dom_none { color: #9a8463; text-align: center; padding: 14px 0; }
/* 城鎮設施 */
#city_dom_footer { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.city_fac_hd { margin-bottom: 0; }
a.city_fac {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: rgba(255,249,232,.78);
  border: 1px solid #c9a86a;
  border-left: 4px solid #2a6a8c;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15);
  transition: box-shadow .12s, transform .12s, background .12s;
}
a.city_fac:hover { background: rgba(255,251,240,.95); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 3px 8px rgba(60,35,10,.28); transform: translateY(-1px); }
#city_dom_compete_btn { border-left-color: #b8892e; }
#city_bank_btn { border-left-color: #5d7a2e; }
.city_fac_icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%);
  border: 2px solid #c9a24a;
  box-shadow: 0 0 0 1px rgba(20,10,0,.5), 0 1px 3px rgba(0,0,0,.35);
}
#city_dom_panel .city_fac_icon .cp-ic { width: 20px; height: 20px; margin: 0; background-size: 20px 20px; vertical-align: 0; }
.city_fac_txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.city_fac_name { font-size: 14px; font-weight: bold; color: #3b2412; }
.city_fac_desc { font-size: 11px; color: #7a5c3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city_fac_arrow { font-size: 20px; color: #b8892e; line-height: 1; }
a.city_fac:hover .city_fac_arrow { color: #5A3412; }

/* ── 銀行 Dialog（大航海風格：深木資產總覽、羊皮紙表單、黃銅按鈕）────────────────── */
#city_bank_dialog { background: #E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size: cover; padding: 12px; box-sizing: border-box; color: #2e1d0c; }
#city_bank_dialog .cp-ic { margin-right: 4px; }
.bnk-loading, .bnk-error {
  text-align: center;
  padding: 36px 0;
  color: #7a5c3a;
  font-size: 13px;
  line-height: 1.8;
}
.bnk-error { color: #8f1f12; }
.bnk-error .bnk-err-ic { width: 32px; height: 32px; background-size: 32px 32px; margin: 0; }
/* 資產總覽 */
.bnk-hero {
  border-radius: 6px;
  padding: 11px 14px 9px;
  color: #e8d6b0;
  background: linear-gradient(135deg, #2a1709 0%, #4a2d15 55%, #6a4320 100%);
  border: 1px solid #8a6a3a;
  border-bottom: 3px solid #b8892e;
  box-shadow: inset 0 0 0 1px rgba(232,199,122,.25), 0 2px 6px rgba(40,22,8,.35);
}
.bnk-hero-lbl { font-size: 11px; color: #c9b48a; }
.bnk-hero-total { font-size: 24px; font-weight: bold; color: #f6dc8f; line-height: 1.25; text-shadow: 1px 1px 2px rgba(20,10,0,.7); }
.bnk-split { display: flex; justify-content: space-between; margin: 7px 0 5px; font-size: 11px; color: #e8d6b0; }
.bnk-split-col { display: flex; align-items: center; gap: 5px; }
.bnk-split-col strong { font-size: 14px; color: #FBEFD0; margin-left: 2px; }
.bnk-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(20,10,0,.5); }
.bnk-dot-cash { background: #a3be5e; }
.bnk-dot-bank { background: #e0b85a; }
.bnk-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: #7a9a3a;
  overflow: visible;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.3);
}
.bnk-bar-bank {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, #c99a2e, #f6dc8f);
}
.bnk-bar-cap {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: #FBEFD0;
  box-shadow: 0 0 3px rgba(0,0,0,.5);
  border-radius: 1px;
}
.bnk-hero-foot { display: flex; justify-content: space-between; font-size: 10px; color: #c9b48a; margin-top: 4px; }
/* 存提款切換 */
.bnk-seg {
  display: flex;
  gap: 2px;
  margin: 12px 0 10px;
  padding: 2px;
  border-radius: 4px;
  background: linear-gradient(180deg, #4a2d15, #2a1709);
  border: 1px solid #8a6a3a;
}
.bnk-seg-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  color: #e8d6b0;
  text-shadow: 1px 1px 1px rgba(20,10,0,.8);
  text-decoration: none;
}
.bnk-seg-btn:hover { color: #FFF4D6; background: rgba(232,199,122,.15); }
.bnk-seg-btn.active { background: linear-gradient(180deg, #f6ead0, #e3cf9f); color: #5A3412; text-shadow: none; box-shadow: inset 0 0 0 1px #c9a24a, 0 1px 2px rgba(0,0,0,.35); }
/* 表單 */
.bnk-body {
  background: rgba(255,249,232,.9);
  border: 1px solid #c9a86a;
  border-radius: 4px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 1px 3px rgba(60,35,10,.15);
}
.bnk-avail { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #7a5c3a; margin-bottom: 6px; }
.bnk-avail strong { font-size: 14px; color: #3b2412; }
.bnk-input-wrap { position: relative; }
.bnk-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 30px 8px 12px;
  font-size: 18px;
  font-weight: bold;
  color: #3b2412;
  text-align: right;
  background: #fbf3df;
  border: 1px solid #8a6a3a;
  border-radius: 3px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(60,35,10,.25);
  font-variant-numeric: tabular-nums;
}
.bnk-input:focus { border-color: #c9a24a; box-shadow: inset 0 1px 2px rgba(60,35,10,.25), 0 0 0 2px rgba(232,199,122,.45); }
.bnk-input::placeholder { font-size: 13px; font-weight: normal; color: #a08a68; }
.bnk-unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: #7a5c3a; }
.bnk-quick { display: flex; gap: 6px; margin: 8px 0; }
.bnk-quick-btn {
  flex: 1;
  text-align: center;
  padding: 3px 0;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  border: 1px solid #c9a86a;
  background: rgba(255,249,232,.9);
  color: #5A3412;
  text-decoration: none;
}
.bnk-quick-btn:hover { border-color: #b8892e; color: #3b2412; }
.bnk-quick-btn.active { background: linear-gradient(180deg, #6a4320, #3b2412); border-color: #c9a24a; color: #F6E7C1; }
.bnk-preview {
  min-height: 42px;
  padding: 7px 10px;
  margin-bottom: 10px;
  border-radius: 3px;
  background: rgba(90,60,25,.06);
  border: 1px dashed #a8833f;
  font-size: 12px;
  color: #7a5c3a;
}
.bnk-pv-row { display: flex; justify-content: space-between; line-height: 1.7; }
.bnk-pv-row em { font-style: normal; color: #a08a68; margin: 0 2px; }
.bnk-pv-row strong { color: #3b2412; }
.bnk-pv-fee { color: #8f1f12; }
.bnk-dim  { color: #9a8463; }
.bnk-warn { color: #8f1f12; font-weight: bold; }
.bnk-confirm-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 9px 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #F6E7C1;
  text-shadow: 1px 1px 2px rgba(20,10,0,.9);
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(180deg, #6a4320, #3b2412);
  border: 1px solid #c9a24a;
  box-shadow: inset 0 0 0 1px rgba(232,199,122,.3), 0 2px 3px rgba(60,35,10,.35);
}
.bnk-body-withdraw .bnk-confirm-btn { color: #3a2410; text-shadow: 0 1px 0 rgba(255,245,215,.6); background: linear-gradient(180deg, #f3dd9a, #c99a2e 60%, #a87a1f); border-color: #7a5518; }
.bnk-confirm-btn:hover { filter: brightness(1.1); }
.bnk-confirm-btn.bnk-busy,
.bnk-confirm-btn.bnk-disabled { background: rgba(255,249,232,.6) !important; border-color: #c9a86a !important; color: #9a8463; text-shadow: none; box-shadow: none; cursor: not-allowed; filter: none; }
.bnk-note { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 11px; color: #7a5c3a; text-align: center; margin-top: 8px; }
.bnk-body-withdraw .bnk-note { color: #8a5a00; }
.bnk-loan { display: flex; align-items: center; justify-content: center; margin-top: 8px; padding: 5px 8px; border-radius: 3px; background: rgba(255,236,190,.1); border: 1px solid rgba(232,199,122,.3); font-size: 11px; color: #f6dc8f; text-align: center; }
/* 銀行救濟貸款（corejs/BankLoan.js） */
.bl-body { padding: 14px 16px; font-size: 13px; line-height: 1.7; color: #2b3f57; }
.bl-lead { margin-bottom: 10px; }
.bl-offer { padding: 8px 10px; border-radius: 6px; background: #f2f6fb; border: 1px solid #dfe7f1; }
.bl-offer strong { color: #16365C; }
.bl-rules { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: #6a7f99; }
.bl-warn { margin-top: 10px; font-size: 12px; font-weight: bold; color: #c0392b; }
.bl-ps { margin-top: 10px; font-size: 12px; color: #6a7f99; }
.bl-ps label { display: block; margin-bottom: 4px; }
.bl-input { width: 100%; box-sizing: border-box; padding: 6px 10px; font-size: 14px; border: 1px solid #c8d6e6; border-radius: 6px; outline: none; }
.bl-input:focus { border-color: #2d7fd3; box-shadow: 0 0 0 2px rgba(45,127,211,.15); }
/* 城市債券 */
.bnk-body-bond .bnk-confirm-btn { color: #F6E7C1; background: linear-gradient(180deg, #6f8f3a, #465e20); border-color: #b8c98a; }
.bnk-body-bond .bnk-note { color: #8a5a00; }
.bnd-city { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #7a5c3a; margin-bottom: 8px; }
.bnd-city b { font-size: 14px; color: #3b2412; }
.bnd-city .is-halt { color: #8f1f12; }
.bnd-faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 8px; }
.bnd-faces .bnk-quick-btn { padding: 4px 0; }
.bnd-faces .bnk-quick-btn.is-off { color: #b8a888; border-color: rgba(201,168,106,.4); background: rgba(255,249,232,.5); cursor: not-allowed; }
.bnd-reason {
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 3px;
  background: rgba(246,220,143,.35);
  border: 1px solid #c9a24a;
  font-size: 12px;
  line-height: 1.6;
  color: #5A3412;
}
.bnd-list-title { font-size: 12px; font-weight: bold; color: #5A3412; margin: 10px 0 4px; }
.bnd-list { border: 1px solid #c9a86a; border-radius: 3px; overflow: hidden; background: rgba(255,249,232,.6); }
.bnd-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px; color: #7a5c3a; }
.bnd-item + .bnd-item { border-top: 1px dashed rgba(168,131,63,.45); }
.bnd-item.is-here { background: rgba(163,190,94,.2); }
.bnd-item b { color: #3b2412; }
.bnd-item small { color: #9a8463; margin-left: 6px; }
.bnd-empty { padding: 10px; text-align: center; font-size: 12px; color: #9a8463; }

/* ── 支配權競爭 Dialog（大航海風格：深木城市橫幅、羊皮紙排名與投資表單、金銀銅名次徽章）──────────────── */
#city_invest_dialog {
  background: #E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center top;
  background-size: cover;
  padding: 12px;
  box-sizing: border-box;
  overflow-y: auto;          /* 高度上限由 ACTION.js center() 依視窗計算，超過時在此捲動 */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  color: #2e1d0c;
}
#city_invest_dialog .cp-ic { margin-right: 4px; }
.cid-loading, .cid-error { text-align: center; padding: 40px 0; color: #7a5c3a; font-size: 13px; line-height: 1.8; }
.cid-error { color: #8f1f12; }
.cid-error .cid-err-ic { width: 32px; height: 32px; background-size: 32px 32px; margin: 0; }
/* 城市橫幅 */
.cid-hero {
  border-radius: 6px;
  overflow: hidden;
  color: #e8d6b0;
  background: #1b2a3a url('images/uw_hero_port.jpg') no-repeat 70% center;
  background-size: cover;
  border: 1px solid #8a6a3a;
  border-bottom: 3px solid #b8892e;
  box-shadow: 0 2px 6px rgba(40,22,8,.35);
}
.cid-hero-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 11px 14px 8px; text-shadow: 0 1px 3px rgba(0,0,0,.75); }
.cid-city { font-size: 20px; font-weight: bold; letter-spacing: 2px; color: #FBEFD0; }
.cid-total { font-size: 11px; color: #e8d6b0; margin-top: 1px; }
.cid-total strong { color: #f6dc8f; font-size: 13px; }
.cid-settle { text-align: right; font-size: 10px; color: #e8d6b0; }
.cid-settle strong { display: block; font-size: 14px; color: #f6dc8f; }
.cid-dom-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 14px;
  background: linear-gradient(180deg, rgba(42,23,9,.85), rgba(42,23,9,.95));
  border-top: 1px solid rgba(232,199,122,.35);
  font-size: 12px;
}
.cid-dom-lbl { font-size: 10px; color: #3a2410; font-weight: bold; padding: 0 6px; border-radius: 3px; background: linear-gradient(180deg, #f3dd9a, #c99a2e); }
.cid-dom-name { display: inline-flex; align-items: center; font-weight: bold; color: #FBEFD0; }
.cid-dom-mine .cid-dom-name { color: #f6dc8f; }
.cid-dom-arrow { color: #c9b48a; }
.cid-dom-proj { color: #f0b8a8; font-weight: bold; }
.cid-dom-proj-mine { color: #cfe0a0; }
/* 區塊 */
.cid-sect { margin-top: 10px; }
.cid-sect-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #5A3412;
  padding-bottom: 5px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(168,131,63,.55);
  cursor: pointer;
  user-select: none;
  text-shadow: 0 0 3px rgba(255,248,225,.9);
}
.cid-sect-hd-plain { cursor: default; }
.cid-sect-hd .cp-ic { margin-right: 0; }
.cid-tog { font-size: 9px; color: #9a8463; width: 10px; }
.cid-sect-sub { margin-left: auto; font-size: 11px; font-weight: normal; letter-spacing: 0; color: #7a5c3a; }
.cid-empty { text-align: center; padding: 14px; font-size: 12px; color: #9a8463; background: rgba(255,249,232,.7); border: 1px dashed #a8833f; border-radius: 3px; }
/* 排名（名次徽章：金／銀／銅，其餘為羊皮紙） */
.cid-rrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: rgba(255,249,232,.88);
  border: 1px solid #c9a86a;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.cid-rrow-mine { border-color: #3f7fa6; background: linear-gradient(90deg, rgba(63,127,166,.18) 0%, rgba(255,249,232,.88) 60%); }
.cid-rmedal { width: 20px; text-align: center; flex-shrink: 0; }
.cid-rank { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 10px; font-weight: 900; border-radius: 50%; color: #3a2410; background: radial-gradient(circle at 35% 30%, #fff6d8, #c9b48a 70%); box-shadow: 0 0 0 1px rgba(60,35,10,.55), inset 0 -1px 1px rgba(0,0,0,.2); }
.cid-rank-1 { background: radial-gradient(circle at 35% 30%, #fff3b8, #e0b040 55%, #a8781a); }
.cid-rank-2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c4ccd4 55%, #828d98); }
.cid-rank-3 { color: #fbe9d8; background: radial-gradient(circle at 35% 30%, #f3c39a, #b87440 55%, #7a4420); }
.cid-rnum { font-size: 12px; font-weight: bold; color: #9a8463; }
.cid-rmain { flex: 1; min-width: 0; }
.cid-rline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cid-rname { font-size: 12px; font-weight: bold; color: #3b2412; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cid-rtag { font-size: 9px; font-weight: bold; padding: 0 5px; border-radius: 3px; color: #3a2410; background: linear-gradient(180deg, #f3dd9a, #c99a2e); border: 1px solid #7a5518; vertical-align: 1px; }
.cid-rtag-mine { color: #e8f2f8; background: linear-gradient(180deg, #3f7fa6, #1d4f7a); border-color: #123552; }
.cid-ramt { font-size: 12px; color: #7a5c3a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cid-ramt em { font-style: normal; font-size: 10px; color: #9a8463; margin-left: 5px; }
.cid-bwrap { height: 5px; margin-top: 3px; background: rgba(90,60,25,.18); box-shadow: inset 0 1px 1px rgba(60,35,10,.25); border-radius: 3px; overflow: hidden; }
.cid-bar { height: 100%; border-radius: 3px; }
.cid-bar-1 { background: linear-gradient(90deg, #9a6c1e, #e0b85a 70%, #f6dc8f); }
.cid-bar-2 { background: linear-gradient(90deg, #828d98, #c4ccd4); }
.cid-bar-3 { background: linear-gradient(90deg, #7a4420, #c9875a); }
.cid-bar-4 { background: #b8a888; }
.cid-rrow-mine .cid-bar { background: linear-gradient(90deg, #4f8fae, #1d4f7a); }
/* 我方商會 */
.cid-my {
  background: rgba(255,249,232,.9);
  border: 1px solid #c9a86a;
  border-left: 4px solid #3f7fa6;
  border-radius: 4px;
  padding: 9px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.15);
}
.cid-my-safe  { border-left-color: #b8892e; background: linear-gradient(90deg, rgba(246,220,143,.45) 0%, rgba(255,249,232,.9) 40%); }
.cid-my-alert { border-left-color: #a8463a; background: linear-gradient(90deg, rgba(240,205,190,.85) 0%, rgba(255,249,232,.9) 40%); }
.cid-my-proj  { border-left-color: #5d7a2e; background: linear-gradient(90deg, rgba(163,190,94,.3) 0%, rgba(255,249,232,.9) 40%); }
.cid-my-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cid-my-name { font-size: 14px; font-weight: bold; color: #3b2412; }
.cid-my-tag { margin-left: auto; display: inline-flex; align-items: center; font-size: 11px; font-weight: bold; padding: 1px 9px; border-radius: 3px; white-space: nowrap; }
.cid-my-tag .cp-ic { width: 14px; height: 14px; background-size: 14px 14px; margin-right: 3px; }
.cid-my-tag-safe  { color: #3a2410; background: linear-gradient(180deg, #f3dd9a, #c99a2e); border: 1px solid #7a5518; }
.cid-my-tag-alert { color: #fbe9e4; background: linear-gradient(180deg, #b5543b, #7f2418); border: 1px solid #5a1a10; }
.cid-my-tag-proj  { color: #f3f8e6; background: linear-gradient(180deg, #7a9a3a, #4d6a1e); border: 1px solid #3f5a1a; }
.cid-my-tag-chase { color: #e8f2f8; background: linear-gradient(180deg, #3f7fa6, #1d4f7a); border: 1px solid #123552; }
.cid-my-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.cid-my-stats div { background: rgba(90,60,25,.07); border: 1px solid rgba(138,106,58,.25); border-radius: 3px; padding: 4px 8px; }
.cid-my-stats span { display: block; font-size: 10px; color: #7a5c3a; }
.cid-my-stats strong { font-size: 14px; color: #3b2412; white-space: nowrap; }
.cid-my-txt { font-size: 12px; color: #7a5c3a; }
.cid-my-txt strong { color: #3b2412; }
.cid-my-alert .cid-my-txt strong { color: #8f1f12; }
.cid-info-msg {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 3px;
  font-size: 12px;
  text-align: center;
  color: #4d6a1e;
  background: rgba(163,190,94,.25);
  border: 1px solid rgba(93,122,46,.5);
}
.cid-info-warn { color: #8a5a00; background: rgba(246,220,143,.45); border-color: #c9a24a; }
.cid-noguild { text-align: center; padding: 16px 10px; background: rgba(255,249,232,.88); border: 1px dashed #a8833f; border-radius: 4px; font-size: 12px; color: #7a5c3a; }
.cid-noguild-icon { width: 32px; height: 32px; margin: 0 auto; background: url('images/uw_ic_anchor.png') no-repeat center center / 32px 32px; }
.cid-noguild p { margin: 4px 0 10px; }
.cid-open-guild-btn {
  display: inline-block;
  padding: 4px 18px;
  border-radius: 4px;
  font-weight: bold;
  color: #F6E7C1;
  text-shadow: 1px 1px 2px rgba(20,10,0,.9);
  text-decoration: none;
  background: linear-gradient(180deg, #6a4320, #3b2412);
  border: 1px solid #c9a24a;
}
/* 投資表單 */
.cid-inv {
  margin-top: 8px;
  background: rgba(255,249,232,.9);
  border: 1px solid #c9a86a;
  border-radius: 4px;
  padding: 10px 12px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.15);
}
.cid-inv-hd { display: flex; align-items: center; font-size: 12px; font-weight: bold; letter-spacing: 1px; color: #5A3412; margin-bottom: 6px; }
.cid-quota-line { display: flex; justify-content: space-between; font-size: 11px; color: #7a5c3a; }
.cid-quota-bar { height: 5px; margin: 3px 0 10px; background: rgba(90,60,25,.18); box-shadow: inset 0 1px 1px rgba(60,35,10,.25); border-radius: 3px; overflow: hidden; }
.cid-quota-bar span { display: block; height: 100%; background: linear-gradient(90deg, #e0b85a, #a8463a); }
.cid-amount-row { display: flex; align-items: center; gap: 10px; }
.cid-sb {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #F6E7C1;
  background: radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%);
  border: 1px solid #c9a24a;
  box-shadow: 0 1px 2px rgba(0,0,0,.35);
  text-decoration: none;
  user-select: none;
}
.cid-sb:hover { border-color: #e8c77a; filter: brightness(1.15); }
.cid-amount { flex: 1; text-align: center; }
.cid-adisp { font-size: 22px; font-weight: bold; color: #8a5a00; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cid-arange { font-size: 10px; color: #9a8463; }
#cid-range { width: 100%; margin: 8px 0 4px; accent-color: #b8892e; cursor: pointer; }
.cid-presets { display: flex; gap: 6px; }
.cid-pr {
  flex: 1;
  text-align: center;
  padding: 3px 0;
  font-size: 11px;
  font-weight: bold;
  border-radius: 3px;
  border: 1px solid #c9a86a;
  background: rgba(255,249,232,.9);
  color: #5A3412;
  text-decoration: none;
}
.cid-pr:hover { border-color: #b8892e; color: #3b2412; }
.cid-pr.active { background: linear-gradient(180deg, #6a4320, #3b2412); border-color: #c9a24a; color: #F6E7C1; }
.cid-prev {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
  padding: 7px 8px;
  background: rgba(90,60,25,.06);
  border: 1px dashed #a8833f;
  border-radius: 3px;
}
.cid-prev-col span { display: block; font-size: 10px; color: #7a5c3a; }
.cid-prev-col strong { font-size: 12px; color: #3b2412; white-space: nowrap; }
.cid-up { font-style: normal; font-size: 10px; color: #4d6a1e; font-weight: bold; margin-left: 3px; }
.cid-cfm {
  display: block;
  text-align: center;
  padding: 9px 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #3a2410;
  text-shadow: 0 1px 0 rgba(255,245,215,.6);
  text-decoration: none;
  background: linear-gradient(180deg, #f3dd9a, #c99a2e 60%, #a87a1f);
  border: 1px solid #7a5518;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 3px rgba(60,35,10,.35);
}
.cid-cfm:hover { filter: brightness(1.06); }
.cid-cfm.cid-busy { background: rgba(255,249,232,.6); border-color: #c9a86a; color: #9a8463; text-shadow: none; box-shadow: none; cursor: default; }
.cid-cfm-note { font-size: 10px; color: #7a5c3a; text-align: center; margin-top: 5px; }
/* 近期商戰 */
.cid-acts { background: rgba(255,249,232,.88); border: 1px solid #c9a86a; border-radius: 3px; padding: 4px 10px; }
.cid-act { display: flex; align-items: center; gap: 7px; padding: 4px 0; font-size: 12px; border-bottom: 1px dashed rgba(168,131,63,.45); }
.cid-act:last-child { border-bottom: none; }
.cid-act-dot { width: 6px; height: 6px; border-radius: 50%; background: #b8a888; flex-shrink: 0; }
.cid-act-mine .cid-act-dot { background: #1d4f7a; }
.cid-act-g { flex: 1; min-width: 0; color: #3b2412; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cid-act-mine .cid-act-g { font-weight: bold; }
.cid-act-a { color: #4d6a1e; font-weight: bold; white-space: nowrap; }
.cid-act-t { color: #9a8463; font-size: 11px; white-space: nowrap; }
.cid-rule { margin-top: 10px; font-size: 10px; line-height: 1.6; color: #7a5c3a; padding: 7px 10px; background: rgba(255,249,232,.75); border: 1px dashed #a8833f; border-radius: 3px; }
/* 支配權競爭 RWD：手機寬度由 ACTION.js 設為螢幕寬扣 16px；這裡處理內容排版與觸控尺寸 */
@media (max-width:767px), (max-height:520px) and (pointer:coarse){
  #city_invest_dialog { padding: 10px; }
  .cid-hero-top { gap: 10px; padding: 10px 12px 8px; }
  .cid-hero-top > div:first-child { min-width: 0; }
  .cid-city { font-size: 18px; letter-spacing: 1px; overflow-wrap: anywhere; }
  .cid-settle { flex-shrink: 0; }
  .cid-dom-row { padding: 7px 12px; }
  .cid-sect-hd { min-height: 32px; padding-bottom: 4px; font-size: 13px; }
  .cid-rrow { padding: 7px 9px; }
  .cid-rname, .cid-ramt { font-size: 13px; }
  .cid-my { padding: 9px 10px; }
  .cid-my-hd { flex-wrap: wrap; }
  .cid-my-name { min-width: 0; overflow-wrap: anywhere; }
  .cid-my-stats, .cid-prev { gap: 5px; }
  .cid-my-stats div { min-width: 0; padding: 4px 6px; }
  .cid-my-stats strong { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
  .cid-my-txt { font-size: 13px; line-height: 1.5; }
  .cid-inv { padding: 10px; }
  .cid-sb { width: 44px; height: 44px; font-size: 18px; }
  .cid-adisp { font-size: 20px; overflow-wrap: anywhere; }
  .cid-arange { font-size: 11px; }
  #cid-range { height: 28px; margin: 6px 0 4px; }
  .cid-presets { gap: 8px; }
  .cid-pr { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0; font-size: 13px; }
  .cid-prev { padding: 7px 6px; }
  .cid-prev-col { min-width: 0; }
  .cid-prev-col strong { white-space: normal; overflow-wrap: anywhere; }
  .cid-cfm { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 8px; font-size: 15px; letter-spacing: 1px; }
  .cid-cfm-note { font-size: 11px; }
  .cid-open-guild-btn { padding: 10px 24px; }
  .cid-act { min-height: 30px; font-size: 13px; }
  .cid-rule { font-size: 11px; }
  .cid-sb, .cid-pr, .cid-cfm, .cid-sect-hd, .cid-open-guild-btn { touch-action: manipulation; }
}

/* ── 戰鬥詳細記錄（大航海風格：依勝敗著色的木紋橫幅、羊皮紙戰況卡，我方海藍／敵方暗紅）── */
.bd-dialog{ padding:0; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center top; background-size:cover; }
.bd{ padding:12px 14px 16px; font-size:13px; line-height:1.6; color:#2e1d0c; }
.bd b{ font-weight:700; }
.bd .cp-ic{ margin-right:4px; }
.bd-muted{ color:#7a5c3a; font-size:12px; }
.bd-c-self{ color:#1d4f7a; }
.bd-c-foe{ color:#8f1f12; }
.bd i.bd-c-self, .bd i.bd-c-foe{ font-style:normal; }

.bd-hero{ position:relative; border-radius:6px; padding:14px 16px 12px; color:#FBEFD0; text-align:center; overflow:hidden; border:1px solid #8a6a3a; border-bottom:3px solid #b8892e; box-shadow:inset 0 0 0 1px rgba(232,199,122,.25), 0 2px 6px rgba(40,22,8,.35); }
.bd-hero::after{ content:''; position:absolute; left:0; right:0; bottom:0; height:8px; background:repeating-linear-gradient(90deg,rgba(232,199,122,.22) 0 14px,transparent 14px 28px); }
.bd-hero-win{ background:linear-gradient(135deg,#1d4f7a,#2a6a8c 55%,#b8892e); }
.bd-hero-lose{ background:linear-gradient(135deg,#3a0f08,#6a1e12 55%,#4a2d15); }
.bd-hero-draw{ background:linear-gradient(135deg,#2a1709,#4a2d15 55%,#6a4320); }
.bd-hero-escape{ background:linear-gradient(135deg,#14323f,#1d4f7a 55%,#3f7fa6); }
/* 開場故事（個人履歷第一筆；MainLayout.js renderOpening） */
.bd-hero-opening{ background:linear-gradient(135deg,#2a1709,#5A3412 50%,#1d4f7a); }
.op-story{ margin-top:12px; padding:12px 16px 4px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.15); }
.op .op-text{ margin:0 0 10px; text-indent:2em; line-height:1.95; color:#3b2412; }
.op .op-text b{ color:#5A3412; }
.op .op-note{ margin-top:10px; padding-top:8px; border-top:1px dashed #c9ab7d; color:#7a5c3a; font-size:12px; }
.op-leg{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; padding:4px 0; border-bottom:1px dashed rgba(168,131,63,.45); }
.op-leg:last-of-type{ border-bottom:0; }
.op-leg-route{ font-weight:700; color:#3b2412; }
.op-leg-goods{ color:#5A3412; }
.op-leg-price{ color:#7a5c3a; font-variant-numeric:tabular-nums; }
.bd-hero-tag{ display:inline-block; font-size:11px; letter-spacing:2px; padding:1px 10px; color:#f6dc8f; border:1px solid rgba(232,199,122,.7); border-radius:3px; background:rgba(20,10,0,.2); }
.bd-hero-title{ font-size:24px; font-weight:900; letter-spacing:4px; margin:4px 0 2px; text-shadow:1px 2px 4px rgba(20,10,0,.6); }
.bd-hero-sub{ font-size:12px; color:#e8d6b0; margin-bottom:4px; }
.bd-hero-foe{ font-size:13px; margin:0 0 4px; color:#FBEFD0; }
.bd-hero-foe b{ font-weight:900; letter-spacing:1px; color:#f6dc8f; }

.bd-story{ margin:10px 0 0; padding:10px 14px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-left:4px solid #b8892e; border-radius:0 4px 4px 0; color:#5A3412; font-style:italic; line-height:1.9; }

.bd-versus{ display:flex; align-items:stretch; gap:8px; margin-top:10px; }
.bd-side{ flex:1; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; padding:8px 10px; border-top:4px solid; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.15); }
.bd-side-self{ border-top-color:#1d4f7a; }
.bd-side-foe{ border-top-color:#8f1f12; }
.bd-side-name{ font-weight:900; font-size:14px; margin-bottom:4px; }
.bd-side-self .bd-side-name{ color:#1d4f7a; }
.bd-side-foe .bd-side-name{ color:#8f1f12; }
.bd-vs{ align-self:center; font-weight:900; font-style:italic; color:#b8892e; font-size:16px; text-shadow:1px 1px 0 rgba(60,35,10,.35); }
.bd-stat{ display:flex; justify-content:space-between; padding:2px 0; border-bottom:1px dashed rgba(168,131,63,.45); color:#7a5c3a; }
.bd-stat:last-child{ border-bottom:0; }
.bd-stat b{ color:#9a8463; }
.bd-stat.is-hit b{ color:#3b2412; }
.bd-stat small{ font-weight:400; margin-left:2px; color:#9a8463; }

.bd-card{ margin-top:10px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; padding:8px 12px 10px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.15); }
.bd-card-title{ display:flex; align-items:center; font-weight:900; letter-spacing:1px; color:#5A3412; margin-bottom:6px; }
.bd-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.bd-chip{ display:inline-flex; align-items:baseline; gap:6px; padding:3px 10px; border-radius:3px; background:rgba(90,60,25,.08); border:1px solid rgba(138,106,58,.3); color:#3b2412; font-weight:700; }
.bd-chip em{ font-style:normal; font-weight:400; color:#7a5c3a; font-size:12px; }
.bd-chip-gain{ background:rgba(163,190,94,.25); border-color:rgba(93,122,46,.45); color:#4d6a1e; }
.bd-chip-loss{ background:rgba(240,205,190,.85); border-color:rgba(168,70,58,.5); color:#8f1f12; }
.bd-chip-warn{ background:rgba(246,220,143,.45); border-color:rgba(184,137,46,.5); color:#8a5a00; }
.bd-note{ margin-top:4px; color:#7a5c3a; }
.bd-note-warn{ color:#8f1f12; }
.bd .bd-officer-list li{ display:flex; align-items:center; }
.bd .bd-officer-list li.is-good{ color:#4d6a1e; }
.bd .bd-officer-list li.is-bad{ color:#8f1f12; }

.bd-section-title{ margin:14px 0 2px; font-weight:900; letter-spacing:1px; color:#5A3412; display:flex; align-items:center; gap:8px; text-shadow:0 0 3px rgba(255,248,225,.9); }
.bd-section-title::before{ content:''; flex:none; width:6px; height:6px; transform:rotate(45deg); background:#b8892e; }
.bd-section-title::after{ content:''; flex:1; height:1px; background:linear-gradient(90deg,#a8833f,rgba(168,131,63,0)); }

.bd-round{ margin-top:8px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; padding:8px 12px 10px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.15); }
.bd-round-head{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.bd-round-no{ background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; color:#F6E7C1; font-size:12px; padding:0 8px; border-radius:3px; }
.bd-round-name{ font-weight:700; color:#3b2412; }

.bd-fire{ display:flex; align-items:center; gap:10px; padding:4px 0; }
.bd-fire-label{ width:36px; font-weight:900; text-align:center; }
.bd-fire-self .bd-fire-label{ color:#1d4f7a; }
.bd-fire-foe .bd-fire-label{ color:#8f1f12; }
.bd-fire-main{ flex:1; min-width:0; }
.bd-fire-meta{ font-size:12px; color:#7a5c3a; }
.bd-fire-dmg{ display:flex; flex-direction:column; align-items:flex-end; font-size:12px; color:#7a5c3a; min-width:72px; }
.bd-fire-dmg b{ color:#3b2412; }
.bd-bar{ height:6px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.25); border-radius:3px; overflow:hidden; margin-top:2px; }
.bd-bar i{ display:block; height:100%; border-radius:3px; background:linear-gradient(90deg,#1d4f7a,#3f7fa6); }
.bd-fire-foe .bd-bar i, .bd-c-foe .bd-bar i{ background:linear-gradient(90deg,#8f1f12,#c0604f); }
.bd-c-self .bd-bar i{ background:linear-gradient(90deg,#1d4f7a,#3f7fa6); }
.bd-bar-rtl i{ margin-left:auto; }

.bd-events{ list-style:none; margin:6px 0 0; padding:6px 10px; background:rgba(240,205,190,.55); border-radius:3px; border:1px solid rgba(168,70,58,.35); border-left:3px solid #a8463a; }
.bd-events li{ position:relative; padding-left:14px; color:#6a1e12; }
.bd-events li::before{ content:'✦'; position:absolute; left:0; font-size:10px; top:2px; color:#a8463a; }

.bd-shots-wrap{ display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.bd-shots-wrap .bd-shots{ flex:1 1 240px; }
.bd-shots{ margin-top:4px; }
.bd-shots summary{ cursor:pointer; color:#5A3412; font-size:12px; padding:2px 0; user-select:none; }
.bd-shots summary:hover{ text-decoration:underline; }
.bd-count{ display:inline-block; margin-left:6px; padding:0 6px; border-radius:3px; background:rgba(90,60,25,.1); border:1px solid rgba(138,106,58,.3); font-size:11px; color:#7a5c3a; }
.bd-shots ol{ margin:4px 0 0; padding:6px 8px 6px 28px; background:rgba(90,60,25,.06); border:1px dashed rgba(168,131,63,.45); border-radius:3px; max-height:180px; overflow-y:auto; font-size:12px; }
.bd-shots li.is-miss{ color:#9a8463; }
.bd-shots-self li.is-hit{ color:#1d4f7a; }
.bd-shots-foe li.is-hit{ color:#8f1f12; }

.bd-escape{ margin-top:8px; padding:8px 10px; border:1px solid rgba(29,79,122,.35); background:rgba(63,127,166,.12); border-radius:3px; }
.bd-escape-title{ font-weight:900; color:#1d4f7a; margin-bottom:2px; }
.bd-escape-story{ font-style:italic; color:#3b4a52; margin-bottom:4px; }
.bd-kv{ display:flex; justify-content:space-between; gap:10px; font-size:12px; padding:1px 0; color:#7a5c3a; }
.bd-kv b{ color:#3b2412; font-weight:600; text-align:right; }
.bd-verdict{ margin-top:6px; padding:3px 10px; border-radius:3px; font-weight:900; text-align:center; background:rgba(90,60,25,.08); border:1px solid rgba(138,106,58,.3); color:#7a5c3a; }
.bd-verdict.is-good{ background:rgba(163,190,94,.25); border-color:rgba(93,122,46,.45); color:#4d6a1e; }
.bd-verdict.is-bad{ background:rgba(240,205,190,.85); border-color:rgba(168,70,58,.5); color:#8f1f12; }

.bd-duo{ display:flex; gap:8px; margin-top:8px; }
.bd-duo-col{ flex:1; text-align:center; background:rgba(90,60,25,.07); border:1px solid rgba(138,106,58,.25); border-radius:3px; padding:4px; }
.bd-duo-col span{ display:block; font-size:12px; color:#7a5c3a; }
.bd-duo-col b{ font-size:18px; }
.bd-melee{ padding:6px 4px 2px; background:rgba(90,60,25,.06); border:1px dashed rgba(168,131,63,.45); border-radius:3px; margin-top:4px; max-height:200px; overflow-y:auto; }
.bd-melee-row{ display:flex; align-items:center; gap:8px; padding:2px 0; }
.bd-melee-no{ width:22px; height:22px; line-height:22px; text-align:center; border-radius:50%; background:radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); box-shadow:0 0 0 1px #c9a24a; color:#F6E7C1; font-size:11px; flex:none; }
.bd-melee-side{ flex:1; min-width:0; }
.bd-melee-side small{ display:block; font-size:11px; }
.bd-melee-side.bd-c-self small{ text-align:right; }

.bd-capture{ display:flex; align-items:center; gap:8px; padding:4px 8px; margin-top:4px; border-radius:3px; background:rgba(90,60,25,.07); border-left:3px solid #9a8463; }
.bd-capture b{ flex:1; }
.bd-capture em{ font-style:normal; font-weight:900; color:#9a8463; }
.bd-capture.is-good{ border-left-color:#5d7a2e; }
.bd-capture.is-good em{ color:#4d6a1e; }
.bd-capture.is-bad{ border-left-color:#a8463a; }
.bd-capture.is-bad em{ color:#8f1f12; }

/* ── 海上襲擊：戰鬥結果面板（精簡版戰報） ── */
.bd-panel{ text-align:left; height:330px; overflow-y:auto; background:rgba(239,226,193,.92); border:1px solid #8a6a3a; border-radius:6px; box-shadow:inset 0 0 0 1px rgba(232,199,122,.45), 0 2px 8px rgba(60,35,10,.3); animation:bd-pop .35s ease-out; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
@keyframes bd-pop{ from{ opacity:0; transform:translateY(8px) scale(.98); } to{ opacity:1; transform:none; } }
.bd-compact{ padding:8px 10px 10px; font-size:12px; line-height:1.5; }
.bd-compact .bd-hero{ padding:8px 12px 10px; }
.bd-compact .bd-hero-title{ font-size:20px; margin:0; }
.bd-compact .bd-hero-sub{ margin-bottom:2px; }
.bd-compact .bd-story{ margin-top:8px; padding:6px 10px; line-height:1.7; }
.bd-compact .bd-versus{ margin-top:8px; gap:6px; }
.bd-compact .bd-side{ padding:4px 8px; }
.bd-compact .bd-side-name{ font-size:13px; margin-bottom:0; }
.bd-compact .bd-stat{ padding:1px 0; }
.bd-compact .bd-vs{ font-size:14px; }
.bd-compact .bd-card{ margin-top:8px; padding:6px 10px 8px; }
.bd-compact .bd-card-title{ margin-bottom:4px; }
.bd-compact .bd-chips{ gap:4px; }
.bd-compact .bd-chip{ padding:1px 8px; }
.bd-highlights{ list-style:none; margin:8px 0 0; padding:0; }
.bd-highlights li{ display:flex; align-items:center; padding:3px 8px; margin-top:4px; border-radius:3px; background:rgba(255,249,232,.9); border:1px solid rgba(201,168,106,.6); border-left:3px solid #9a8463; color:#5A3412; }
.bd-highlights li.is-good{ border-left-color:#5d7a2e; color:#3f5a1a; }
.bd-highlights li.is-bad{ border-left-color:#a8463a; color:#8f1f12; }
.bd-actions{ margin-top:10px; text-align:center; }
.bd-btn{ display:inline-block; padding:5px 22px; border-radius:4px; background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; color:#F6E7C1 !important; font-weight:700; letter-spacing:1px; text-shadow:1px 1px 2px rgba(20,10,0,.9); text-decoration:none !important; box-shadow:inset 0 0 0 1px rgba(232,199,122,.3), 0 2px 4px rgba(60,35,10,.35); transition:transform .15s, filter .15s; }
.bd-btn:hover{ transform:translateY(-1px); filter:brightness(1.12); }
.bd-panel .bd-actions{ position:sticky; bottom:-10px; margin:10px -10px -10px; padding:8px 0 10px; background:linear-gradient(to bottom,rgba(239,226,193,0),rgba(239,226,193,.97) 35%); }

/* ── 被襲擊通知 ── */
#attack_notice_wrap{ position:fixed; top:48px; left:50%; transform:translateX(-50%); z-index:9999; display:flex; flex-direction:column; gap:8px; width:340px; max-width:calc(100vw - 32px); pointer-events:none; }
.an-card{ position:relative; pointer-events:auto; overflow:hidden; background:#fff; border-radius:10px; padding:10px 14px 12px 18px; font-size:13px; line-height:1.5; color:#1d2a3a; box-shadow:0 6px 20px rgba(10,25,50,.35); animation:an-in .35s cubic-bezier(.2,.9,.3,1.2); }
.an-card::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:6px; background:#5d6b7c; }
.an-card.an-win::before{ background:linear-gradient(#1d6fb8,#c99a2e); }
.an-card.an-lose::before{ background:linear-gradient(#b3261e,#5a1414); }
.an-card.an-escape::before{ background:linear-gradient(#1f8392,#0d4a55); }
.an-card.is-leaving{ animation:an-out .26s ease-in forwards; }
@keyframes an-in{ from{ opacity:0; transform:translateY(-14px) scale(.96); } to{ opacity:1; transform:none; } }
@keyframes an-out{ to{ opacity:0; transform:translateY(-10px) scale(.96); } }
.an-head{ display:flex; align-items:center; gap:8px; font-size:12px; }
.an-alert{ font-weight:900; color:#b3261e; letter-spacing:1px; }
.an-time{ color:#7a8796; }
.an-close{ margin-left:auto; cursor:pointer; color:#9aa6b4; font-size:18px; line-height:1; text-decoration:none !important; }
.an-close:hover{ color:#1d2a3a; }
.an-title{ font-size:18px; font-weight:900; letter-spacing:2px; margin-top:2px; }
.an-win .an-title{ color:#1f5fa8; }
.an-lose .an-title{ color:#b3261e; }
.an-escape .an-title{ color:#0d4a55; }
.an-draw .an-title{ color:#4c5a6b; }
.an-sub{ color:#5c6b7d; font-size:12px; margin-bottom:6px; }
.an-card .bd-chips{ gap:4px; }
.an-card .bd-chip{ padding:1px 8px; font-size:12px; }
.an-calm{ color:#1d7a33; font-size:12px; }
.an-foot{ margin-top:8px; text-align:right; }
.an-link{ cursor:pointer; color:#1f5fa8 !important; font-weight:700; font-size:12px; text-decoration:none !important; }
.an-link:hover{ text-decoration:underline !important; }
.an-more{ font-size:12px; color:#4c5a6b; padding:8px 14px 10px 18px; }
.an-timer{ position:absolute; left:0; right:0; bottom:0; height:3px; background:rgba(0,0,0,.05); }
.an-timer i{ display:block; height:100%; background:rgba(8,57,140,.35); transform-origin:left; animation:an-timer 15s linear forwards; }
.an-card:hover .an-timer i{ animation-play-state:paused; }
@keyframes an-timer{ from{ transform:scaleX(1); } to{ transform:scaleX(0); } }

/* ── 搜索周圍艦隊：搜索結果（大航海風格：羊皮紙海圖底、雙方羊皮紙艦隊卡（我方海藍／敵方暗紅）、黃銅框）── */
#Search_Dialog{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; }
.ss-wrap{ display:flex; gap:10px; padding:10px; height:100%; box-sizing:border-box; background:transparent; color:#2e1d0c; font-size:12px; }
.ss-self{ color:#1d4f7a; }
.ss-foe{ color:#8f1f12; }
.ss-fleet{ flex:none; width:262px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; padding:6px; box-sizing:border-box; border-top:4px solid; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 2px 4px rgba(60,35,10,.25); display:flex; flex-direction:column; }
.ss-fleet-self{ border-top-color:#1d4f7a; }
.ss-fleet-foe{ border-top-color:#8f1f12; }
.ss-fleet-head{ display:flex; align-items:center; gap:8px; padding:0 2px 6px; }
.ss-avatar{ width:40px; height:40px; border-radius:50%; box-sizing:border-box; background:#2a1709; border:2px solid #c9a24a; box-shadow:0 0 0 1px rgba(20,10,0,.55), 0 1px 3px rgba(0,0,0,.35); object-fit:cover; }
.ss-fleet-foe .ss-avatar{ filter:sepia(.3) grayscale(.25); }
.ss-fleet-id{ min-width:0; }
.ss-fleet-tag{ font-size:11px; letter-spacing:1px; font-weight:700; }
.ss-fleet-self .ss-fleet-tag{ color:#1d4f7a; }
.ss-fleet-foe .ss-fleet-tag{ color:#8f1f12; }
.ss-fleet-name{ font-size:15px; font-weight:900; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ss-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:3px; margin-bottom:6px; }
.ss-stat{ background:rgba(90,60,25,.07); border:1px solid rgba(138,106,58,.25); border-radius:3px; padding:2px 6px; line-height:1.35; }
.ss-stat span{ display:block; font-size:10px; color:#7a5c3a; }
.ss-stat b{ display:block; font-size:12px; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ss-fleet .battle_ship_img_area{ border-radius:4px; overflow:hidden; box-shadow:0 0 0 1px #5a3a1c, 0 0 0 3px #c9a24a; margin:2px; }

.ss-center{ flex:1; min-width:0; display:flex; flex-direction:column; }
.ss-center .bd-panel{ flex:1; height:auto; min-height:0; }
.ss-prelude{ flex:1; display:flex; flex-direction:column; justify-content:center; gap:10px; animation:bd-pop .35s ease-out; }
.ss-encounter{ text-align:center; text-shadow:0 0 4px rgba(255,248,225,.95); }
.ss-encounter-icon{ width:52px; height:52px; margin:0 auto; border-radius:50%; box-sizing:border-box; border:2px solid #c9a24a; background:url('images/uw_ic_anchor.png') no-repeat center center / 32px 32px, radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); box-shadow:0 0 0 1px rgba(20,10,0,.55), 0 2px 5px rgba(0,0,0,.4); }
.ss-encounter-title{ font-size:20px; font-weight:900; letter-spacing:3px; color:#3b2412; margin-top:6px; }
.ss-encounter-sub{ color:#5A3412; }
.ss-cmp-card{ background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; padding:8px 14px 10px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.4), 0 2px 4px rgba(60,35,10,.2); }
.ss-cmp-head{ display:flex; justify-content:space-between; font-weight:900; color:#5A3412; letter-spacing:1px; margin-bottom:4px; padding-bottom:3px; border-bottom:1px solid rgba(168,131,63,.45); }
.ss-cmp{ display:flex; align-items:center; gap:10px; padding:3px 0; }
.ss-cmp-val{ width:56px; font-size:13px; color:#9a8463; }
.ss-cmp-val.ss-self{ text-align:right; }
.ss-cmp-val.ss-foe{ text-align:left; }
.ss-cmp-val.is-lead{ font-weight:900; }
.ss-cmp-val.ss-self.is-lead{ color:#1d4f7a; }
.ss-cmp-val.ss-foe.is-lead{ color:#8f1f12; }
.ss-cmp-mid{ flex:1; }
.ss-cmp-label{ text-align:center; font-size:11px; line-height:14px; margin-bottom:2px; color:#7a5c3a; }
.ss-cmp-bar{ height:7px; border-radius:4px; background:linear-gradient(90deg,#a8463a,#8f1f12); box-shadow:inset 0 1px 1px rgba(0,0,0,.25); overflow:hidden; }
.ss-cmp-bar i{ display:block; height:100%; background:linear-gradient(90deg,#1d4f7a,#3f7fa6); border-right:2px solid #f6ead0; }
.ss-tactics{ text-align:center; color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.95); }
.ss-tactics b{ color:#3b2412; }
.ss-attack{ text-align:center; }
#Battle_ATK.l-btn{ border:1px solid #c9a24a; border-radius:4px; background:linear-gradient(180deg,#9a3a28,#6a1e12); box-shadow:inset 0 0 0 1px rgba(232,199,122,.3), 0 3px 8px rgba(80,20,10,.45); transition:transform .15s, box-shadow .15s, filter .15s; }
#Battle_ATK.l-btn .l-btn-text{ color:#F6E7C1; font-size:16px; font-weight:900; letter-spacing:3px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
#Battle_ATK.l-btn .cp-ic{ width:20px; height:20px; background-size:20px 20px; margin-right:6px; vertical-align:-4px; filter:drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
#Battle_ATK.l-btn:hover{ transform:translateY(-1px); filter:brightness(1.1); box-shadow:inset 0 0 0 1px rgba(232,199,122,.45), 0 5px 12px rgba(80,20,10,.5); }
#Battle_ATK.l-btn-disabled, #Battle_ATK.l-btn-disabled:hover{ opacity:.55; transform:none; box-shadow:none; filter:grayscale(.4); }

.ss-empty{ height:100%; min-height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.95); }
.ss-empty-icon{ width:56px; height:56px; background:url('images/uw_ic_wave.png') no-repeat center center / 56px 56px; animation:ss-bob 2.4s ease-in-out infinite; }
.ss-empty-title{ font-size:20px; font-weight:900; letter-spacing:3px; color:#3b2412; }
.ss-empty-sub{ font-size:13px; }
@keyframes ss-bob{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-6px); } }

/* ── 行動結果／錯誤卡片（打撈、搜索、出航共用 #action_card_dlg；大航海風格：木紋上半部、羊皮紙內文、黃銅框）── */
/* 視窗外框、標題列與底部按鈕列（EasyUI dialog，只限本對話框） */
.window:has(> #action_card_dlg){ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#8a6a3a; box-shadow:0 6px 18px rgba(30,15,0,.5); }
.window:has(> #action_card_dlg) > .window-header{ background:transparent; border-color:#8a6a3a; }
.window:has(> #action_card_dlg) > .window-header .panel-title{ color:#F6E7C1; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
.window:has(> #action_card_dlg) > .window-header .panel-tool a{ filter:invert(1) sepia(1) saturate(.6) brightness(1.4); opacity:.85; }
.window:has(> #action_card_dlg) > .dialog-button{ background:#efe2c1; border-color:#c9a86a; }
.window:has(> #action_card_dlg) > .dialog-button .l-btn{ border-radius:4px; border:1px solid #c9a24a; background:linear-gradient(180deg,#6a4320,#3b2412); box-shadow:inset 0 0 0 1px rgba(232,199,122,.3); }
.window:has(> #action_card_dlg) > .dialog-button .l-btn:hover{ filter:brightness(1.12); }
.window:has(> #action_card_dlg) > .dialog-button .l-btn .l-btn-text{ color:#F6E7C1; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
.sv-has-actions > .dialog-button{ display:none; } /* 卡片自帶操作按鈕時隱藏「確定」列 */
#action_card_dlg{ padding:0; background:#efe2c1 url('images/uw_bg_chart.jpg') no-repeat center bottom; background-size:cover; }
.sv{ color:#2e1d0c; font-size:13px; }
.sv-hero{ position:relative; overflow:hidden; text-align:center; padding:14px 12px 30px; color:#FBEFD0; background:linear-gradient(170deg,#1d4f7a 0%,#2a6a8c 55%,#4f8fae 100%); box-shadow:inset 0 -2px 0 rgba(232,199,122,.35); }
.sv-tag{ display:inline-block; font-size:11px; letter-spacing:2px; padding:1px 10px; color:#f6dc8f; border:1px solid rgba(232,199,122,.75); border-radius:3px; background:rgba(20,10,0,.2); }
.sv-item{ position:relative; z-index:1; width:64px; height:64px; margin:10px auto 6px; border-radius:50%; box-sizing:border-box; background:radial-gradient(circle at 40% 35%, #fbf3df, #e8d6b0 70%); border:3px solid #c9a24a; box-shadow:0 0 0 1px rgba(20,10,0,.5), 0 4px 10px rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; animation:sv-float 2.6s ease-in-out infinite; }
.sv-item img{ max-width:44px; max-height:44px; border-radius:3px; }
.sv-item.sv-noimg::before{ content:''; width:36px; height:36px; background:url('images/uw_ic_specialty.png') no-repeat center center / 36px 36px; }
.sv-item.sv-has-ic .cp-ic{ width:38px; height:38px; margin:0; background-size:38px 38px; vertical-align:0; }
.sv-name{ position:relative; z-index:1; font-size:18px; font-weight:900; letter-spacing:2px; text-shadow:1px 1px 3px rgba(20,10,0,.6); }
.sv-qty{ position:relative; z-index:1; font-size:22px; font-weight:900; color:#f6dc8f; text-shadow:1px 1px 3px rgba(20,10,0,.6); }
.sv-qty small{ font-size:12px; font-weight:400; color:#FBEFD0; }
.sv-waves{ position:absolute; left:0; right:0; bottom:-1px; height:16px; background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='16' viewBox='0 0 80 16'><path d='M0 8 Q20 0 40 8 T80 8 V16 H0Z' fill='%23efe2c1'/></svg>") 0 0/80px 16px repeat-x; animation:sv-wave 4s linear infinite; }
.sv-waves::before{ content:''; position:absolute; left:0; right:0; bottom:4px; height:16px; opacity:.35; background:inherit; background-position:40px 0; animation:sv-wave 7s linear infinite reverse; }
@keyframes sv-float{ 0%,100%{ transform:translateY(0) rotate(-3deg); } 50%{ transform:translateY(-5px) rotate(3deg); } }
@keyframes sv-wave{ from{ background-position-x:0; } to{ background-position-x:80px; } }
.sv-rows{ margin:6px 12px 0; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; padding:4px 12px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.4), 0 1px 3px rgba(60,35,10,.15); }
.sv-row{ display:flex; justify-content:space-between; padding:5px 0; border-bottom:1px dashed rgba(168,131,63,.45); color:#7a5c3a; }
.sv-row:last-child{ border-bottom:0; }
.sv-row b{ color:#3b2412; }
.sv-row b.sv-good{ color:#4d6a1e; }
.sv-row b.sv-bad{ color:#8f1f12; }
.sv-row b.sv-muted{ color:#9a8463; font-weight:400; }
.sv-note{ margin:8px 12px 0; padding:6px 10px; border-radius:3px; background:rgba(246,220,143,.45); border:1px solid #c9a24a; color:#6a4a0a; font-size:12px; }
.sv-note-bad{ background:rgba(240,205,190,.85); border-color:#a8463a; color:#8f1f12; }
.sv{ padding-bottom:10px; }
/* 錯誤卡片：依情境切換上半部色調（木紋／海藍／暗紅） */
.sv-err .sv-hero{ padding-bottom:28px; }
.sv-tone-warn .sv-hero{ background:linear-gradient(170deg,#3b2412 0%,#6a4320 55%,#9a6c2e 100%); }
.sv-tone-info .sv-hero{ background:linear-gradient(170deg,#1d4f7a 0%,#2a6a8c 55%,#4f8fae 100%); }
.sv-tone-calm .sv-hero{ background:linear-gradient(170deg,#14323f 0%,#1d4f7a 55%,#3f7fa6 100%); }
.sv-tone-bad  .sv-hero{ background:linear-gradient(170deg,#3a0f08 0%,#6a1e12 55%,#9a3a28 100%); }
.sv-item.sv-emoji{ font-size:32px; line-height:1; color:#8f1f12; animation:sv-float 2.6s ease-in-out infinite; }
.sv-msg{ position:relative; z-index:1; margin-top:2px; font-size:13px; opacity:.95; }
.sv-note-tip{ background:rgba(255,249,232,.9); color:#5A3412; border:1px solid #c9a86a; border-left:3px solid #9a8463; box-shadow:0 1px 3px rgba(60,35,10,.12); }
.sv-tone-warn .sv-note-tip{ border-left-color:#b8892e; }
.sv-tone-calm .sv-note-tip{ border-left-color:#2a6a8c; }
.sv-tone-bad  .sv-note-tip{ border-left-color:#a8463a; }
.sv-countdown{ font-variant-numeric:tabular-nums; }
.sv-hpbar{ position:relative; height:8px; margin:2px 0 6px; border-radius:4px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.25); overflow:hidden; }
.sv-hpbar i{ display:block; height:100%; border-radius:4px; background:linear-gradient(90deg,#8f1f12,#c0604f); }
.sv-hpbar em{ position:absolute; top:-2px; bottom:-2px; left:50%; border-left:2px dashed #4d6a1e; }
/* 物資不足：詢問是否購買 */
.sv-ask{ margin:10px 12px 0; text-align:center; font-size:14px; font-weight:bold; color:#3b2412; }
.sv-ask b{ color:#8f1f12; font-size:16px; margin:0 2px; }
.sv-actions{ display:flex; gap:8px; margin:10px 12px 0; }
.sv-btn{ flex:1; display:block; padding:8px 4px; text-align:center; border-radius:4px; font-size:13px; font-weight:bold; letter-spacing:1px; text-decoration:none !important; cursor:pointer; box-sizing:border-box; transition:filter .12s; }
.sv-btn-yes{ flex:1.6; color:#F6E7C1 !important; text-shadow:1px 1px 2px rgba(20,10,0,.9); background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; box-shadow:inset 0 0 0 1px rgba(232,199,122,.3), 0 2px 3px rgba(60,35,10,.35); }
.sv-btn-no{ color:#5A3412 !important; background:rgba(255,249,232,.9); border:1px solid #c9a86a; }
.sv-btn:hover{ filter:brightness(1.1); }
.sv-btn.is-disabled{ cursor:not-allowed; color:#9a8463 !important; text-shadow:none; background:rgba(255,249,232,.6); border-color:#c9a86a; box-shadow:none; filter:none; }
.sv-btn.is-busy{ opacity:.65; pointer-events:none; }

/* ── 冒險歷練 ── */
#advenlog_Dialog{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center; background-size:cover; border-color:#8a6a3a; color:#3b2412; }
#advenlog_Tabs > .tabs-header{ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#b8892e; padding-top:5px; }
#advenlog_Tabs > .tabs-header .tabs{ border-color:#b8892e; padding-left:10px; }
#advenlog_Tabs > .tabs-header .tabs-inner{ border-color:#8a6a3a; border-radius:3px 3px 0 0; background:rgba(255,236,190,.08); color:#F6E7C1; text-shadow:1px 1px 1px rgba(20,10,0,.8); }
#advenlog_Tabs > .tabs-header .tabs-inner:hover{ background:rgba(232,199,122,.2); }
#advenlog_Tabs > .tabs-header .tabs-selected .tabs-inner{ background:linear-gradient(180deg,#f6ead0,#e3cf9f); border-color:#c9a24a; border-bottom-color:#e3cf9f; color:#5A3412; text-shadow:none; }
#advenlog_Tabs .tabs-inner:focus-visible{ outline:2px solid #f6dc8f; outline-offset:-3px; }
#advenlog_Tabs > .tabs-panels, #advenlog_Tabs > .tabs-panels > .panel > .panel-body{ background:transparent; border-color:#c9a86a; }
#advenlog_Dialog ::selection{ background:#c9a86a; color:#2a1709; }
.adl-hero{ display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; min-height:66px; box-sizing:border-box; padding:10px 14px; color:#F6E7C1; background:linear-gradient(180deg,#6a4320,#3b2412); border-bottom:2px solid #b8892e; }
.adl-hero-title{ flex:1; display:flex; align-items:center; gap:10px; }
.adl-hero-icon{ flex:none; display:flex; align-items:center; justify-content:center; width:38px; height:38px; border:1px solid #c9a24a; border-radius:50%; background:rgba(255,249,232,.9); }
.adl-hero-icon .cp-ic{ width:28px; height:28px; background-size:contain; margin:0; }
.adl-hero-title b{ display:block; font-size:17px; letter-spacing:3px; color:#f6dc8f; }
.adl-hero-title small{ font-size:11px; color:#e8d6b0; }
.adl-hero-stat{ text-align:right; }
.adl-hero-stat span{ display:block; font-size:11px; color:#e8d6b0; }
.adl-hero-stat b{ font-size:18px; color:#f6dc8f; }
.adl-hero-stat small{ font-size:12px; color:#F6E7C1; font-weight:400; }
.adl-hero-progress{ width:130px; }
.adl-bar{ height:5px; border-radius:3px; background:rgba(0,0,0,.25); overflow:hidden; margin-top:3px; }
.adl-bar i{ display:block; height:100%; border-radius:3px; background:linear-gradient(90deg,#b8892e,#f6dc8f); }

.adl-pane{ height:100%; display:flex; flex-direction:column; background:transparent; }
#advenlog_card{ flex:0 1 auto; max-height:52%; overflow-y:auto; box-sizing:border-box; padding:10px 12px 0; }
.adl-card{ background:rgba(255,249,232,.92); border:1px solid #c9a86a; border-radius:3px; padding:8px 12px 10px; box-shadow:0 1px 3px rgba(60,35,10,.18); }
.adl-card-empty{ display:flex; align-items:center; gap:12px; color:#7a5c3a; }
.adl-empty-icon{ flex:none; }
.adl-empty-icon .cp-ic{ width:32px; height:32px; background-size:contain; margin:0; }
.adl-card-empty b{ display:block; color:#5A3412; }
.adl-card-empty small{ font-size:12px; }
.adl-card-head{ display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; }
.adl-card-tag{ flex:none; font-size:11px; padding:1px 8px; border-radius:3px; background:#5A3412; color:#f6dc8f; }
.adl-card-topic{ flex:1; min-width:120px; font-size:14px; color:#5A3412; overflow-wrap:anywhere; }
.adl-cancel{ flex:none; cursor:pointer; font:inherit; font-size:11px; color:#8f1f12 !important; background:rgba(240,205,190,.25); padding:4px 8px; border:1px solid #a8463a; border-radius:3px; text-decoration:none !important; }
.adl-cancel:hover{ background:#8f1f12; color:#F6E7C1 !important; }
.adl-cancel:focus-visible{ outline:2px solid #5A3412; outline-offset:2px; }
.adl-route{ display:flex; align-items:center; overflow-x:auto; padding:3px 0; margin:5px 0; }
.adl-route-node{ flex:none; width:22px; height:22px; line-height:18px; text-align:center; border-radius:50%; font-size:11px; font-weight:700; border:2px solid #c9a86a; color:#7a5c3a; background:#fff9e8; box-sizing:border-box; }
.adl-route-node.is-done{ background:#4d6a1e; border-color:#4d6a1e; color:#F6E7C1; }
.adl-route-node.is-next{ border-color:#b8892e; color:#755016; background:#f6dc8f; }
@keyframes adl-pulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(201,154,46,.5); } 50%{ box-shadow:0 0 0 5px rgba(201,154,46,0); } }
.adl-route-line{ flex:1 0 6px; max-width:46px; height:2px; background:repeating-linear-gradient(90deg,#c9a86a 0 4px,transparent 4px 7px); }
.adl-route-line.is-done{ background:#4d6a1e; }
.adl-route-label{ flex:none; margin-left:10px; font-size:12px; color:#7a5c3a; }
.adl-clue{ padding:6px 10px; border-left:3px solid #b8892e; background:rgba(232,214,176,.45); border-radius:0 3px 3px 0; color:#5A3412; line-height:1.6; overflow-wrap:anywhere; }
.adl-clue span{ display:block; font-style:normal; font-size:10px; letter-spacing:1px; color:#7a5c3a; }

.adl-log{ flex:1; min-height:0; overflow-y:auto; padding:4px 12px 12px; }
.adl-log-empty{ padding:30px 12px; margin-top:10px; text-align:center; color:#5A3412; background:rgba(255,249,232,.88); border:1px solid #c9a86a; border-radius:3px; }
.adl-day{ margin:10px 0 4px; padding:2px 0; font-size:11px; font-weight:700; letter-spacing:1px; color:#5A3412; display:flex; align-items:center; gap:8px; }
.adl-day::after{ content:''; flex:1; height:1px; background:#c9a86a; }
.adl-entry{ position:relative; display:flex; gap:10px; padding:6px 0 6px; }
.adl-entry::before{ content:''; position:absolute; left:14px; top:30px; bottom:-6px; width:2px; background:#c9a86a; }
.adl-entry:last-child::before{ display:none; }
.adl-entry-icon{ flex:none; display:flex; align-items:center; justify-content:center; box-sizing:border-box; width:30px; height:30px; border-radius:50%; background:radial-gradient(circle at 40% 35%,#fbf3df,#e8d6b0 75%); border:2px solid #c9a24a; box-shadow:0 1px 2px rgba(60,35,10,.25); position:relative; z-index:1; }
.adl-entry-icon .cp-ic{ width:18px; height:18px; background-size:contain; margin:0; }
.adl-entry-body{ flex:1; min-width:0; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:3px; padding:5px 10px 6px; }
.adl-entry-meta{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:3px 8px; font-size:11px; color:#7a5c3a; }
.adl-entry-meta b{ color:#5A3412; }
.adl-entry-text{ color:#3b2412; line-height:1.6; word-break:break-all; }
.adl-entry-chips{ display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.adl-chip{ display:inline-flex; align-items:center; padding:0 7px; border-radius:3px; font-size:11px; line-height:18px; font-weight:700; }
.adl-chip .cp-ic{ flex:none; width:14px; height:14px; background-size:contain; }
.adl-chip-cost{ background:rgba(240,205,190,.6); color:#8f1f12; border:1px solid rgba(168,70,58,.4); }
.adl-chip-treasure{ background:rgba(246,220,143,.45); color:#755016; border:1px solid #c9a86a; }
.adl-e-accept   .adl-entry-icon{ border-color:#1d4f7a; }
.adl-e-complete .adl-entry-icon{ border-color:#b8892e; background:#fff3d0; }
.adl-e-complete .adl-entry-body{ border-color:#e9c96a; background:linear-gradient(135deg,#fffaf0,#fff3d0); }
.adl-e-complete .adl-entry-meta b{ color:#755016; }
.adl-e-cancel   .adl-entry-meta b{ color:#8f1f12; }
.adl-e-cancel   .adl-entry-text{ text-decoration:line-through; color:#7a5c3a; }

.adl-quests{ height:100%; overflow-y:auto; padding:6px 12px 12px; box-sizing:border-box; background:transparent; }
.adl-area{ margin-top:8px; }
.adl-area-head{ display:flex; align-items:center; gap:8px; margin-bottom:6px; padding:6px 10px; background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; border-radius:3px; }
.adl-area-head b{ color:#F6E7C1; font-size:13px; }
.adl-area-head span{ font-size:11px; color:#e8d6b0; }
.adl-area-head .adl-bar{ flex:1; max-width:160px; margin:0; background:#c9a86a; }
.adl-tiles{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.adl-tile{ position:relative; border-radius:3px; padding:6px 10px 7px; min-height:38px; }
.adl-tile.is-done{ background:rgba(255,249,232,.9); border:1px solid #c9a86a; box-shadow:0 1px 2px rgba(60,35,10,.15); padding-right:28px; }
.adl-tile-badge{ position:absolute; top:6px; right:8px; width:16px; height:16px; line-height:16px; text-align:center; border-radius:50%; background:#4d6a1e; color:#F6E7C1; font-size:10px; }
.adl-tile-title{ color:#3b2412; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
.adl-tile.is-locked{ border:1px dashed #a8833f; background:rgba(255,249,232,.5); color:#7a5c3a; display:flex; align-items:center; gap:8px; }
.adl-tile.is-locked .adl-tile-title{ color:#7a5c3a; letter-spacing:3px; }
.adl-tile.is-locked small{ margin-left:auto; font-size:11px; }
.adl-tile-lock{ display:flex; flex:none; }
#advenlog_card, .adl-log, .adl-quests, .adl-route{ scrollbar-width:thin; scrollbar-color:#8a6a3a transparent; }
@media (max-width:600px){
  .adl-hero{ padding:8px 10px; gap:6px 16px; }
  .adl-hero-title{ flex-basis:100%; }
  .adl-hero-title b{ font-size:15px; }
  .adl-hero-stat{ text-align:left; }
  .adl-hero-progress{ flex:1; text-align:right; }
  .adl-hero-progress .adl-bar{ max-width:150px; margin-left:auto; }
  #advenlog_card{ padding:8px 8px 0; }
  .adl-card{ padding:8px; }
  .adl-card-topic{ min-width:100%; order:3; }
  .adl-cancel{ margin-left:auto; }
  .adl-log, .adl-quests{ padding-left:8px; padding-right:8px; }
  .adl-tiles{ grid-template-columns:1fr; }
}

/* 大頭像（艦長面板 50px、艦長資料 68px）用 96x96 半身像，以原尺寸取臉部區域。 */
#ppd_avatar:not([src$="icon0.png"]){ object-fit:none; object-position:50% 23%; image-rendering:auto; }
.cp-avatar img:not([src$="icon0.png"]){ object-fit:none; object-position:50% 23%; image-rendering:auto; }
/* 小頭像（排行、聊天、商會、出航）用 styles/avatar/face/ 的 48x48 臉部裁切，整張縮放顯示。 */
img[src*="styles/avatar/face/"]{ object-fit:cover; image-rendering:auto; }

/* ── 履歷紀錄（大航海風格：深木篩選列、羊皮紙海圖底、黃銅圓框時間軸、羊皮紙紀錄卡；事件紀錄共用 hl-*）── */
#historylog_Dialog{ overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; }
.hl-wrap{ height:100%; display:flex; flex-direction:column; color:#2e1d0c; }
.hl-filters{ flex:none; display:flex; flex-wrap:wrap; gap:6px; padding:8px 14px; background:linear-gradient(180deg,#4a2d15,#2a1709); border-bottom:2px solid #b8892e; min-height:26px; }
.hl-filter{ cursor:pointer; display:inline-flex; align-items:center; gap:6px; padding:2px 12px; border-radius:3px; font-size:12px; font-weight:700; color:#e8d6b0 !important; text-shadow:1px 1px 1px rgba(20,10,0,.8); background:rgba(255,236,190,.08); border:1px solid rgba(232,199,122,.35); text-decoration:none !important; transition:background .15s; }
.hl-filter .cp-ic{ margin-right:-2px; }
.hl-filter:hover{ background:rgba(232,199,122,.2); }
.hl-filter span{ font-size:11px; padding:0 6px; border-radius:3px; background:rgba(0,0,0,.3); }
.hl-filter.is-active{ background:linear-gradient(180deg,#f6ead0,#e3cf9f); color:#5A3412 !important; text-shadow:none; border-color:#c9a24a; box-shadow:0 1px 2px rgba(0,0,0,.35); }
.hl-filter.is-active span{ background:rgba(90,60,25,.15); }
.hl-list{ flex:1; min-height:0; overflow-y:auto; padding:4px 14px 14px; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
.hl-empty{ padding:50px 0; text-align:center; color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.9); }
.hl-day{ margin:10px 0 4px; font-size:11px; font-weight:700; letter-spacing:1px; color:#5A3412; display:flex; align-items:center; gap:8px; text-shadow:0 0 3px rgba(255,248,225,.9); }
.hl-day::before{ content:''; flex:none; width:5px; height:5px; transform:rotate(45deg); background:#b8892e; }
.hl-day::after{ content:''; flex:1; height:1px; background:linear-gradient(90deg,#a8833f,rgba(168,131,63,0)); }
.hl-entry{ position:relative; display:flex; gap:10px; padding:4px 0; }
.hl-entry::before{ content:''; position:absolute; left:14px; top:28px; bottom:-4px; width:2px; background:rgba(168,131,63,.55); }
.hl-entry:last-child::before{ display:none; }
.hl-icon{ flex:none; position:relative; z-index:1; width:30px; height:30px; line-height:26px; text-align:center; border-radius:50%; background:radial-gradient(circle at 40% 35%, #fbf3df, #e8d6b0 75%); border:2px solid #c9a24a; box-shadow:0 0 0 1px rgba(60,35,10,.45), 0 1px 2px rgba(0,0,0,.25); font-size:14px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; }
.hl-icon .cp-ic{ width:18px; height:18px; margin:0; background-size:18px 18px; vertical-align:0; }
.hl-body{ flex:1; min-width:0; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-left:3px solid #9a8463; border-radius:3px; padding:5px 10px 6px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15); }
.hl-meta{ display:flex; align-items:center; gap:8px; font-size:11px; color:#7a5c3a; }
.hl-meta b{ color:#3b2412; }
.hl-meta span{ margin-left:auto; white-space:nowrap; }
.hl-result{ font-style:normal; font-weight:700; padding:0 8px; border-radius:3px; background:rgba(90,60,25,.1); border:1px solid rgba(138,106,58,.3); color:#7a5c3a; }
.hl-foe{ font-style:normal; font-weight:700; color:#8f1f12; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.hl-msg{ color:#2e1d0c; line-height:1.6; word-break:break-all; }
.hl-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; }
.hl-foot .bd-chip{ padding:0 8px; font-size:12px; }
.hl-detail{ cursor:pointer; flex:none; font-size:12px; font-weight:700; letter-spacing:1px; color:#F6E7C1 !important; text-shadow:1px 1px 1px rgba(20,10,0,.85); padding:2px 12px; border-radius:3px; background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; text-decoration:none !important; transition:filter .15s; }
.hl-detail:hover{ filter:brightness(1.15); }
/* 類別色：交易黃銅、航海海藍、港口設施深木、其他與海戰灰褐；海戰依結果著色 */
.hl-g-trade .hl-body{ border-left-color:#b8892e; }
.hl-g-sea   .hl-body{ border-left-color:#2a6a8c; }  .hl-g-sea   .hl-icon{ border-color:#7fa6bd; }
.hl-g-port  .hl-body{ border-left-color:#6a4320; }  .hl-g-port  .hl-icon{ border-color:#a8833f; }
.hl-g-other .hl-body{ border-left-color:#9a8463; }
.hl-g-battle .hl-body{ border-left-color:#7a5c3a; }
.hl-t-win    .hl-body{ border-left-color:#1d4f7a; }  .hl-t-win    .hl-icon{ border-color:#1d4f7a; }  .hl-t-win    .hl-result{ background:rgba(63,127,166,.18); border-color:rgba(29,79,122,.4); color:#1d4f7a; }
.hl-t-lose   .hl-body{ border-left-color:#8f1f12; }  .hl-t-lose   .hl-icon{ border-color:#8f1f12; }  .hl-t-lose   .hl-result{ background:rgba(240,205,190,.85); border-color:rgba(168,70,58,.5); color:#8f1f12; }
.hl-t-escape .hl-body{ border-left-color:#14323f; }  .hl-t-escape .hl-icon{ border-color:#2a6a8c; }  .hl-t-escape .hl-result{ background:rgba(42,106,140,.15); border-color:rgba(20,50,63,.4); color:#14323f; }
/* 履歷紀錄 RWD（比照事件紀錄）：篩選鈕為 <button>、資訊列可換行；窄螢幕縮小間距，時間地點獨立一行、戰報鈕靠右 */
#historylog_Dialog .hl-filter{ font-family:inherit; line-height:20px; min-height:28px; }
#historylog_Dialog .hl-filter:focus-visible{ outline:2px solid #f6dc8f; outline-offset:2px; }
#historylog_Dialog .hl-meta{ flex-wrap:wrap; gap:4px 8px; }
#historylog_Dialog .hl-meta > span{ font-variant-numeric:tabular-nums; }
#historylog_Dialog .hl-foot{ flex-wrap:wrap; }
#historylog_Dialog .hl-detail{ margin-left:auto; }
#historylog_Dialog ::selection{ background:#c9a86a; color:#2a1709; }
@media (max-width:600px){
  #historylog_Dialog .hl-filters{ padding:8px; gap:5px; }
  #historylog_Dialog .hl-filter{ padding:2px 8px; }
  #historylog_Dialog .hl-list{ padding-right:8px; padding-left:8px; }
  #historylog_Dialog .hl-entry{ gap:8px; }
  #historylog_Dialog .hl-meta > span{ flex-basis:100%; margin-left:0; }
}

/* ── 物價調查紀錄：深木工具列、羊皮紙海圖與黃銅報價簿 ── */
#tradenote_Dialog{ overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center; background-size:cover; border-color:#8a6a3a; color:#3b2412; }
.tn-wrap{ height:100%; display:flex; flex-direction:column; }
.tn-toolbar{ flex:none; display:flex; align-items:center; gap:8px; padding:10px 14px; background:linear-gradient(180deg,#4a2d15,#2a1709); border-bottom:2px solid #b8892e; }
.tn-search{ flex:1; min-width:0; height:30px; padding:0 10px 0 32px; border:1px solid #c9a86a; border-radius:3px; font:inherit; font-size:13px; color:#3b2412; background:#fff9e8 url('images/uw_ic_spyglass.png') 9px center / 16px 16px no-repeat; box-sizing:border-box; caret-color:#5A3412; }
.tn-search::placeholder{ color:#7a5c3a; opacity:1; }
.tn-select{ height:30px; max-width:100%; padding:0 6px; border:1px solid #c9a86a; border-radius:3px; font:inherit; font-size:12px; color:#3b2412; background:#fff9e8; cursor:pointer; }
.tn-search:focus-visible, .tn-select:focus-visible{ outline:2px solid #f6dc8f; outline-offset:2px; }
.tn-count{ flex:none; font-size:12px; color:#F6E7C1; white-space:nowrap; }
.tn-list{ flex:1; min-height:0; overflow-y:auto; padding:10px 14px 14px; scrollbar-width:thin; scrollbar-color:#8a6a3a transparent; }
.tn-empty{ padding:45px 16px; margin:12px 0; text-align:center; color:#5A3412; line-height:1.8; background:rgba(255,249,232,.88); border:1px solid #c9a86a; border-radius:3px; }
.tn-empty small{ color:#7a5c3a; }

.tn-card{ background:rgba(255,249,232,.92); border:1px solid #c9a86a; border-radius:3px; margin-bottom:10px; box-shadow:0 1px 3px rgba(60,35,10,.18); overflow:hidden; }
.tn-card-head{ width:100%; box-sizing:border-box; display:flex; align-items:center; gap:7px; flex-wrap:wrap; padding:8px 10px; border:0; border-bottom:1px solid #c9a86a; border-radius:0; font:inherit; text-align:left; color:#3b2412; background:linear-gradient(180deg,#f6ead0,#e8d6b0); cursor:pointer; }
.tn-card-head:hover{ background:linear-gradient(180deg,#fff4d9,#e3cc99); }
.tn-card-head:focus-visible{ outline:2px solid #5A3412; outline-offset:-3px; }
.tn-card.is-collapsed .tn-card-head{ border-bottom:0; }
.tn-card.is-collapsed .tn-cols{ display:none; }
.tn-toggle{ flex:none; width:12px; text-align:center; }
.tn-toggle::before{ content:''; display:inline-block; width:6px; height:6px; border-right:2px solid #7a5c3a; border-bottom:2px solid #7a5c3a; transform:rotate(45deg); vertical-align:3px; }
.tn-card.is-collapsed .tn-toggle::before{ transform:rotate(-45deg); vertical-align:1px; }
.tn-sum{ font-size:11px; color:#5A3412; background:rgba(255,249,232,.6); border:1px solid #c9a86a; border-radius:3px; padding:1px 7px; }
.tn-icon{ width:30px; height:30px; flex:none; border-radius:3px; background:#fff9e8 url('images/uw_ic_cargolist.png') center / 22px 22px no-repeat; border:1px solid #b8892e; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.tn-icon img{ max-width:26px; max-height:26px; }
.tn-icon:has(img:not([style*="display: none"])){ background-image:none; }
.tn-name{ font-size:14px; color:#3b2412; overflow-wrap:anywhere; }
.tn-base{ font-size:11px; color:#7a5c3a; }
.tn-spread{ margin-left:auto; font-size:12px; font-weight:700; padding:2px 8px; border:1px solid #c9a86a; border-radius:3px; font-variant-numeric:tabular-nums; }
.tn-spread.is-gain{ background:rgba(163,190,94,.24); border-color:#879b50; color:#40591a; }
.tn-spread.is-flat{ background:rgba(90,60,25,.08); color:#7a5c3a; }
.tn-route{ flex-basis:100%; text-align:right; font-size:11px; color:#5A3412; }
.tn-cols{ display:flex; }
.tn-col{ flex:1; min-width:0; padding:8px 10px 10px; }
.tn-col + .tn-col{ border-left:1px dashed #c9a86a; }
.tn-col-title{ display:flex; align-items:center; flex-wrap:wrap; font-size:12px; font-weight:700; margin-bottom:5px; }
.tn-col-title small{ margin-left:6px; font-weight:400; font-size:10px; color:#7a5c3a; }
.tn-col-buy .tn-col-title{ color:#1d4f7a; }
.tn-col-sell .tn-col-title{ color:#755016; }
.tn-q{ display:grid; grid-template-columns:minmax(64px,1fr) 32px minmax(60px,max-content) 74px; align-items:center; gap:6px; padding:5px; border-radius:3px; font-size:12px; }
.tn-q + .tn-q{ border-top:1px solid rgba(138,106,58,.2); }
.tn-port{ min-width:0; overflow-wrap:anywhere; color:#3b2412; }
.tn-port small{ display:block; font-size:10px; color:#7a5c3a; }
.tn-pct{ grid-column:2; font-size:10px; color:#7a5c3a; text-align:right; cursor:help; }
.tn-price{ grid-column:3; text-align:right; white-space:nowrap; color:#3b2412; font-variant-numeric:tabular-nums; }
.tn-price small{ font-size:10px; font-weight:400; margin-left:1px; }
.tn-age{ grid-column:4; text-align:right; font-size:10px; color:#7a5c3a; font-variant-numeric:tabular-nums; }
.tn-age::before{ content:''; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:4px; background:#8a6a3a; vertical-align:1px; }
.tn-age.is-fresh::before{ background:#4d6a1e; }
.tn-age.is-stale::before{ background:#8a6a3a; }
.tn-q.is-old .tn-port, .tn-q.is-old .tn-price, .tn-q.is-old .tn-age{ color:#7a5c3a; }
.tn-age.is-stale::after{ content:'舊週'; display:block; font-size:10px; }
.tn-col-buy .tn-q.is-best{ background:rgba(63,127,166,.12); }
.tn-col-buy .tn-q.is-best .tn-price{ color:#1d4f7a; }
.tn-col-sell .tn-q.is-best{ background:rgba(246,220,143,.4); }
.tn-col-sell .tn-q.is-best .tn-price{ color:#755016; }
.tn-q.is-best .tn-port::after{ content:'最佳'; display:inline-block; padding:0 5px; border-radius:2px; font-size:10px; font-weight:700; color:#F6E7C1; background:#1d4f7a; }
.tn-col-sell .tn-q.is-best .tn-port::after{ background:#755016; }
.tn-none{ font-size:12px; color:#7a5c3a; padding:8px 5px; }
#tradenote_Dialog ::selection{ background:#c9a86a; color:#2a1709; }
@media (max-width:600px){
  .tn-toolbar{ flex-wrap:wrap; padding:8px; gap:6px; }
  .tn-search{ flex-basis:100%; }
  .tn-count{ margin-left:auto; }
  .tn-list{ padding:8px; }
  .tn-cols{ flex-direction:column; }
  .tn-col + .tn-col{ border-left:0; border-top:1px dashed #c9a86a; }
  .tn-route{ text-align:left; }
}

/* ── 載運中的交易品（大航海風格：羊皮紙海圖底、深木船艙概況、羊皮紙貨物卡、黃銅選取框、木製按鈕列與暗紅棄置鈕）── */
#goods_Dialog{ overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; color:#3b2412; }
.cg-wrap{ height:100%; display:flex; flex-direction:column; }
.cg-summary{ flex:none; padding:10px 14px 8px; color:#e8d6b0; background:radial-gradient(ellipse at 90% -30%, rgba(201,154,46,.3), transparent 60%), linear-gradient(135deg,#2a1709,#4a2d15 55%,#6a4320); border-bottom:3px solid #b8892e; box-shadow:inset 0 -1px 0 rgba(255,236,190,.3); }
.cg-hold-head{ display:flex; justify-content:space-between; align-items:baseline; font-size:12px; }
.cg-hold-head b{ display:inline-flex; align-items:center; color:#f6dc8f; letter-spacing:2px; text-shadow:1px 1px 1px rgba(20,10,0,.8); }
.cg-hold-head b .cp-ic{ margin-right:4px; vertical-align:0; }
.cg-hold-head span{ font-size:14px; font-weight:700; color:#FBEFD0; font-variant-numeric:tabular-nums; text-shadow:1px 1px 1px rgba(20,10,0,.8); }
.cg-hold-head small{ font-size:11px; font-weight:400; color:#c9b48a; }
.cg-hold{ display:flex; height:10px; margin:5px 0 4px; border-radius:5px; overflow:hidden; background:rgba(20,10,0,.35); box-shadow:inset 0 1px 2px rgba(0,0,0,.4), 0 0 0 1px rgba(232,199,122,.3); }
.cg-hold i{ display:block; height:100%; }
.cg-seg-goods{ background:linear-gradient(90deg,#b8892e,#f3dd9a); }
.cg-seg-food{ background:linear-gradient(90deg,#5d7a2e,#a3be5e); }
.cg-hold.is-full{ box-shadow:inset 0 1px 2px rgba(0,0,0,.4), 0 0 0 1px #d9a08f; }
.cg-legend{ display:flex; gap:12px; font-size:11px; color:#c9b48a; }
.cg-legend i{ display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:4px; }
.cg-dot-goods{ background:#e0b85a; } .cg-dot-food{ background:#a3be5e; } .cg-dot-free{ background:rgba(232,214,176,.35); }
.cg-stats{ display:flex; gap:16px; margin-top:6px; padding-top:6px; border-top:1px dashed rgba(232,199,122,.3); font-size:11px; color:#c9b48a; }
.cg-stats b{ margin-left:6px; font-size:13px; color:#f6dc8f; }
.cg-list{ flex:1; min-height:0; overflow-y:auto; padding:8px 10px 10px; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
.cg-empty{ padding:40px 0; text-align:center; color:#5A3412; line-height:1.8; text-shadow:0 0 3px rgba(255,248,225,.9); }
.cg-empty span{ display:block; }
.cg-empty span .cp-ic{ width:30px; height:30px; margin:0; background-size:30px 30px; }
.cg-empty small{ display:block; color:#7a5c3a; }
.cg-item{ display:flex; align-items:center; gap:10px; padding:6px 10px; margin-bottom:6px; background:rgba(255,249,232,.92); border-radius:4px; border:1px solid #c9a86a; border-left:3px solid #b8892e; box-shadow:inset 0 0 0 1px rgba(255,255,255,.4), 0 1px 2px rgba(60,35,10,.12); cursor:pointer; transition:box-shadow .15s, border-color .15s; }
.cg-item:hover{ border-color:#b8892e; box-shadow:inset 0 0 0 1px rgba(255,255,255,.4), 0 2px 6px rgba(60,35,10,.22); }
.cg-item.is-selected{ border-color:#b8892e; border-left-color:#8a5a00; background:#fbf0d2; box-shadow:0 0 0 2px rgba(201,162,74,.55), 0 2px 6px rgba(60,35,10,.22); }
.cg-item.is-damaged{ border-left-color:#a8463a; }
.cg-icon{ flex:none; width:34px; height:34px; border-radius:4px; background:#f3e6c4; border:1px solid #c9a86a; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.cg-icon img{ max-width:30px; max-height:30px; }
.cg-info{ flex:1; min-width:0; }
.cg-name{ font-weight:700; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cg-badge{ font-style:normal; margin-left:6px; padding:0 6px; border-radius:3px; font-size:10px; font-weight:700; color:#fbe9e4; background:#a8463a; vertical-align:1px; }
.cg-sub{ font-size:11px; color:#7a5c3a; }
.cg-sub span{ color:#9a8463; }
.cg-amount{ flex:none; text-align:right; line-height:1.3; }
.cg-amount b{ display:block; font-size:15px; color:#3b2412; font-variant-numeric:tabular-nums; }
.cg-amount small{ font-size:11px; color:#8a5a00; }
/* 棄置數量列（注入於 dialog 按鈕列）：深木底、黃銅邊 */
.cg-footer{ display:flex !important; align-items:center; gap:6px; padding:6px 10px !important; }
.window:has(> #goods_Dialog) > .dialog-button.cg-footer,
.window:has(> #onlinelist_Dialog) > .dialog-button.cg-footer,
.window:has(> #guild_info_dialog) > .dialog-button.cg-footer{ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#8a6a3a; border-top:2px solid #b8892e; }
.cg-qty{ flex:1; align-items:center; gap:4px; white-space:nowrap; }
.cg-qty-label{ font-size:12px; color:#e8d6b0; margin-right:2px; }
.cg-step, .cg-all{ cursor:pointer; display:inline-block; min-width:22px; height:24px; line-height:22px; text-align:center; border:1px solid #c9a24a; border-radius:4px; background:linear-gradient(180deg,#6a4320,#3b2412); color:#F6E7C1 !important; font-weight:700; text-decoration:none !important; box-sizing:border-box; }
.cg-all{ padding:0 6px; font-size:11px; font-weight:400; }
.cg-step:hover, .cg-all:hover{ filter:brightness(1.15); border-color:#e0b85a; }
.cg-qty input{ width:54px; height:24px; text-align:center; border:1px solid #8a6a3a; border-radius:4px; font-size:13px; font-weight:bold; color:#3b2412; background:#fbf3df; box-sizing:border-box; }
.cg-qty-hint{ font-size:11px; color:#c9b48a; margin-left:2px; }
/* 棄置鈕：暗紅；圖示與文字一起置中（原本保留 26px 圖示空位而偏右） */
#goods_discard_btn{ margin-left:auto; color:#fbe9e4; text-shadow:1px 1px 1px rgba(20,10,0,.8); background:linear-gradient(180deg,#9a3a28,#6a1e12); border:1px solid #c9876a; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(255,220,200,.2); }
#goods_discard_btn:hover{ background:linear-gradient(180deg,#ad4430,#7a2416); border-color:#e0a088; }
#goods_discard_btn .l-btn-left{ display:flex; align-items:center; justify-content:center; gap:5px; height:100%; padding:0 12px; }
#goods_discard_btn .l-btn-icon{ order:-1; position:static; margin:0; width:16px; height:16px; background:url('images/uw_ic_jettison.png') no-repeat center center / 16px 16px; }
#goods_discard_btn .l-btn-text{ margin:0; padding:0; line-height:normal; color:inherit; font-weight:bold; letter-spacing:2px; }
#goods_discard_btn.l-btn-disabled, #goods_discard_btn.l-btn-disabled:hover{ opacity:1; color:#9a8463; text-shadow:none; background:rgba(255,249,232,.7); border-color:#c9a86a; box-shadow:none; }
#goods_discard_btn.l-btn-disabled .l-btn-icon{ opacity:.45; }

/* ── 持有船艦列表（大航海風格：深木側欄、羊皮紙海圖主區、羊皮紙船艦卡，同造船廠船艦對話框）── */
#shiplist_Dialog{ overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; color:#2e1d0c; }
.sl-wrap{ height:100%; display:flex; }
.sl-side{ flex:0 0 270px; display:flex; flex-direction:column; background:linear-gradient(170deg,#4a2d15,#3b2412 60%,#2a1709); color:#e8d6b0; border-right:3px solid #b8892e; box-shadow:inset -1px 0 0 rgba(232,199,122,.25); }
.sl-side-title{ display:flex; align-items:baseline; justify-content:space-between; padding:8px 10px 6px; }
.sl-side-title b{ color:#f6dc8f; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.8); }
.sl-side-title small{ font-size:10px; color:#c9b48a; }
.sl-formation{ flex:none; width:250px; height:250px; margin:0 auto; background:url("ship/sea.gif"); border-radius:6px; overflow:hidden; box-shadow:0 0 0 1px #5a3a1c, 0 0 0 3px #c9a24a, 0 2px 6px rgba(0,0,0,.45); }
#shiplist_formation_table{ border-collapse:collapse; width:250px; }
#shiplist_formation_table td{ width:50px; height:50px; padding:0; border:0; text-align:center; vertical-align:middle; }
.sl-cell-void{ width:50px; height:50px; }
.ship_formation_cell{ position:relative; width:50px; height:50px; display:flex; align-items:center; justify-content:center; border-radius:6px; transition:background .15s, box-shadow .15s; }
.ship_formation_cell:not(.has-ship)::before{ content:''; width:6px; height:6px; border-radius:50%; background:rgba(255,236,190,.3); }
.ship_formation_cell img{ width:50px; max-width:50px; cursor:grab; }
.ship_formation_cell.is-hl{ background:rgba(246,220,143,.28); box-shadow:inset 0 0 0 2px #f6dc8f; }
.ship_formation_cell.is-drop{ box-shadow:inset 0 0 0 2px #e0b85a; background:rgba(224,184,90,.25); }
.sl-cell-hp{ position:absolute; left:6px; right:6px; bottom:2px; height:4px; border-radius:2px; background:rgba(20,10,0,.5); overflow:hidden; pointer-events:none; }
.sl-cell-hp i{ display:block; height:100%; }
.sl-cell-flag{ position:absolute; top:0; left:2px; font-size:11px; color:#f6dc8f; text-shadow:0 0 3px rgba(0,0,0,.8); pointer-events:none; }
.sl-summary{ flex:1; padding:8px 10px 10px; }
.sl-sum-grid{ display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.sl-sum{ background:rgba(255,236,190,.08); border:1px solid rgba(232,199,122,.15); border-radius:3px; padding:2px 8px; }
.sl-sum span{ display:block; font-size:10px; color:#c9b48a; }
.sl-sum b{ font-size:14px; color:#FBEFD0; }
.sl-sum small{ font-size:10px; font-weight:400; color:#c9b48a; }
.sl-sum.is-bad b{ color:#f0a89a; }
.sl-sum-hp{ display:flex; align-items:center; gap:8px; margin-top:6px; font-size:11px; color:#c9b48a; }
.sl-sum-hp .sl-bar{ flex:1; background:rgba(255,236,190,.15); }
.sl-sum-hp b{ color:#FBEFD0; font-size:12px; }
.sl-bar{ height:6px; border-radius:3px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.25); overflow:hidden; }
.sl-bar i{ display:block; height:100%; border-radius:3px; }

.sl-list{ flex:1; min-width:0; overflow-y:auto; padding:8px 10px 10px; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
.sl-empty{ padding:60px 0; text-align:center; color:#5A3412; line-height:1.8; text-shadow:0 0 3px rgba(255,248,225,.9); }
.sl-empty span{ display:block; font-size:30px; }
.sl-empty-ic{ width:40px; height:40px; margin:0 auto 4px; background:url('images/uw_ic_anchor.png') no-repeat center center / 40px 40px; }
.sl-empty small{ display:block; color:#7a5c3a; }
.sl-card{ position:relative; display:flex; align-items:center; gap:10px; padding:6px 10px 6px 30px; margin-bottom:6px; background:rgba(255,249,232,.88); border-radius:4px; border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.2); transition:box-shadow .15s, border-color .15s; }
.sl-card.is-hl, .sl-card:hover{ border-color:#b8892e; box-shadow:inset 0 0 0 1px #e8c77a, 0 2px 6px rgba(60,35,10,.28); }
.sl-card.is-critical{ border-left:3px solid #a8463a; }
.sl-no{ position:absolute; left:6px; top:50%; transform:translateY(-50%); width:18px; height:18px; line-height:18px; text-align:center; border-radius:50%; background:radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); box-shadow:0 0 0 1px #c9a24a; color:#F6E7C1; font-size:10px; font-weight:700; }
.sl-img{ flex:none; width:52px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:3px; background:url("ship/sea.gif") repeat left top; /* 海面以原尺寸拼貼，不延展 */ box-shadow:0 0 0 1px #5a3a1c, 0 0 0 2px #c9a24a; overflow:hidden; }
.sl-img img{ max-width:48px; max-height:40px; }
.sl-main{ flex:1; min-width:0; }
.sl-name{ font-weight:700; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sl-flag{ font-style:normal; margin-left:6px; padding:0 6px; border-radius:3px; font-size:10px; color:#3a2410; background:linear-gradient(180deg,#f3dd9a,#c99a2e); border:1px solid #7a5518; vertical-align:1px; }
.sl-hp{ display:flex; align-items:center; gap:8px; margin:2px 0 3px; font-size:11px; }
.sl-hp .sl-bar{ flex:1; max-width:180px; }
.sl-hp-num{ color:#7a5c3a; font-variant-numeric:tabular-nums; }
.sl-dmg{ font-style:normal; font-size:10px; padding:0 6px; border-radius:3px; background:rgba(163,190,94,.25); color:#4d6a1e; border:1px solid rgba(93,122,46,.4); }
.sl-dmg.is-warn{ background:rgba(246,220,143,.45); color:#8a5a00; border-color:rgba(184,137,46,.5); }
.sl-dmg.is-bad{ background:rgba(240,205,190,.85); color:#8f1f12; border-color:rgba(168,70,58,.5); }
.sl-stats{ display:flex; flex-wrap:wrap; gap:4px; }
.sl-stats span{ font-size:11px; color:#3b2412; background:rgba(90,60,25,.08); border:1px solid rgba(138,106,58,.25); border-radius:3px; padding:0 7px; line-height:17px; }
.sl-stats em{ font-style:normal; color:#7a5c3a; margin-right:4px; }
.sl-stats small{ color:#9a8463; margin-left:1px; }
.sl-stats span.is-slowest{ background:rgba(246,220,143,.45); border-color:rgba(184,137,46,.5); }
.sl-stats span.is-slowest small{ margin-left:4px; color:#8a5a00; font-weight:700; }
/* 點選交換：已選取的第一艘 */
.ship_formation_cell.has-ship{ cursor:pointer; }
.ship_formation_cell.is-picked{ background:rgba(246,220,143,.4); box-shadow:inset 0 0 0 2px #fff3b8, 0 0 8px rgba(246,220,143,.8); }
.sl-side{ overflow-y:auto; }

/* 持有船艦列表 RWD：手機改為上下排列（陣形＋概況在上、船艦卡片在下），整個對話框內捲動；尺寸由 shiplist_fit() 設定 */
@media (max-width:767px){
  #shiplist_Dialog{ overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
  .sl-wrap{ height:auto; min-height:100%; flex-direction:column; }
  .sl-side{ flex:none; overflow:visible; border-right:0; border-bottom:3px solid #b8892e; box-shadow:inset 0 -1px 0 rgba(232,199,122,.25); padding-bottom:2px; }
  .sl-side-title{ padding:8px 12px 6px; }
  .sl-side-title small{ font-size:11px; }
  .sl-summary{ padding:8px 10px 10px; }
  .sl-sum-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sl-sum{ min-width:0; padding:3px 8px; }
  .sl-sum b{ overflow-wrap:anywhere; }
  .sl-list{ flex:none; overflow:visible; padding:8px 8px 12px; }
  .sl-card{ align-items:flex-start; gap:8px; padding:8px 8px 8px 30px; }
  .sl-no{ top:22px; transform:none; }
  .sl-img{ margin-top:2px; }
  .sl-hp{ flex-wrap:wrap; gap:4px 8px; }
  .sl-hp .sl-bar{ flex:1 1 100%; max-width:none; order:-1; }
  .sl-stats{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
  .sl-stats span{ min-width:0; font-size:12px; line-height:22px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ship_formation_cell img{ cursor:pointer; }
  .ship_formation_cell{ touch-action:manipulation; }
}
@media (max-width:767px) and (pointer:coarse){
  .sl-card:hover{ border-color:#c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.2); }
}

/* ── 造船廠：主選單（沿用酒館 bar-pane／bar-card 的羊皮紙卡與牛皮紙遮罩）── */
.yd-menu-grid{ flex:1; display:grid; grid-template-columns:1fr 1fr; gap:7px; }
a.yd-card{ position:relative; }
.yd-card-badge{ position:absolute; top:4px; right:4px; padding:0 6px; border-radius:3px; font-size:10px; font-weight:700; line-height:16px; color:#fbe9e4; background:linear-gradient(180deg,#b5543b,#7f2418); border:1px solid #5a1a10; box-shadow:0 1px 3px rgba(0,0,0,.3); }

/* ── 造船廠：船艦對話框（大航海風格：深木側欄、羊皮紙海圖主區、羊皮紙船艦卡、黃銅框）── */
/* 所有對話框統一深木色標題列（2026-11-05）：取代 EasyUI color.css 的 c2 灰色與 metro-blue 預設藍色，
   新增的對話框（含 $.messager 提示框）不必再逐一加進下方清單。body .window.window 的權重（0,2,1）高於 .c2:hover（0,2,0）；
   下方以 :has(> #id) 指定的個別規則權重更高，仍以其為準 */
body .window.window{ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#8a6a3a; box-shadow:0 6px 18px rgba(30,15,0,.5); }
body .window.window > .window-header{ background:transparent; border-color:#8a6a3a; }
body .window.window > .window-header .panel-title{ color:#F6E7C1; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
body .window.window > .window-header .panel-tool a{ filter:invert(1) sepia(1) saturate(.6) brightness(1.4); opacity:.85; }
body .window.window > .window-header .panel-tool a:hover{ opacity:1; }
body .window.window > .window-body,
body .window.window > .dialog-toolbar,
body .window.window > .dialog-button{ border-color:#8a6a3a; }

/* 視窗外框與標題列（EasyUI window；造船廠船艦、持有船艦列表、銀行、支配權競爭四個對話框共用） */
.window:has(> #YARD_SHIP_Dialog),
.window:has(> #shiplist_Dialog),
.window:has(> #city_bank_dialog),
.window:has(> #city_invest_dialog),
.window:has(> #Search_Dialog),
.window:has(> #battle_detail_dlg),
.window:has(> #eventlog_Dialog),
.window:has(> #tradenote_Dialog),
.window:has(> #ranklist_Dialog),
.window:has(> #advenlog_Dialog),
.window:has(> #historylog_Dialog),
.window:has(> #officer_Dialog),
.window:has(> #guild_Dialog),
.window:has(> #Drop_Dialog),
.window:has(> #goods_Dialog),
.window:has(> #onlinelist_Dialog),
.window:has(> #guild_info_dialog){ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#8a6a3a; box-shadow:0 6px 18px rgba(30,15,0,.5); }
.window:has(> #YARD_SHIP_Dialog) > .window-header,
.window:has(> #shiplist_Dialog) > .window-header,
.window:has(> #city_bank_dialog) > .window-header,
.window:has(> #city_invest_dialog) > .window-header,
.window:has(> #Search_Dialog) > .window-header,
.window:has(> #battle_detail_dlg) > .window-header,
.window:has(> #eventlog_Dialog) > .window-header,
.window:has(> #tradenote_Dialog) > .window-header,
.window:has(> #ranklist_Dialog) > .window-header,
.window:has(> #advenlog_Dialog) > .window-header,
.window:has(> #historylog_Dialog) > .window-header,
.window:has(> #officer_Dialog) > .window-header,
.window:has(> #guild_Dialog) > .window-header,
.window:has(> #Drop_Dialog) > .window-header,
.window:has(> #goods_Dialog) > .window-header,
.window:has(> #onlinelist_Dialog) > .window-header,
.window:has(> #guild_info_dialog) > .window-header{ background:transparent; border-color:#8a6a3a; }
.window:has(> #YARD_SHIP_Dialog) > .window-header .panel-title,
.window:has(> #shiplist_Dialog) > .window-header .panel-title,
.window:has(> #city_bank_dialog) > .window-header .panel-title,
.window:has(> #city_invest_dialog) > .window-header .panel-title,
.window:has(> #Search_Dialog) > .window-header .panel-title,
.window:has(> #battle_detail_dlg) > .window-header .panel-title,
.window:has(> #eventlog_Dialog) > .window-header .panel-title,
.window:has(> #tradenote_Dialog) > .window-header .panel-title,
.window:has(> #ranklist_Dialog) > .window-header .panel-title,
.window:has(> #advenlog_Dialog) > .window-header .panel-title,
.window:has(> #historylog_Dialog) > .window-header .panel-title,
.window:has(> #officer_Dialog) > .window-header .panel-title,
.window:has(> #guild_Dialog) > .window-header .panel-title,
.window:has(> #Drop_Dialog) > .window-header .panel-title,
.window:has(> #goods_Dialog) > .window-header .panel-title,
.window:has(> #onlinelist_Dialog) > .window-header .panel-title,
.window:has(> #guild_info_dialog) > .window-header .panel-title{ color:#F6E7C1; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
.window:has(> #YARD_SHIP_Dialog) > .window-header .panel-tool a,
.window:has(> #shiplist_Dialog) > .window-header .panel-tool a,
.window:has(> #city_bank_dialog) > .window-header .panel-tool a,
.window:has(> #city_invest_dialog) > .window-header .panel-tool a,
.window:has(> #Search_Dialog) > .window-header .panel-tool a,
.window:has(> #battle_detail_dlg) > .window-header .panel-tool a,
.window:has(> #eventlog_Dialog) > .window-header .panel-tool a,
.window:has(> #tradenote_Dialog) > .window-header .panel-tool a,
.window:has(> #ranklist_Dialog) > .window-header .panel-tool a,
.window:has(> #advenlog_Dialog) > .window-header .panel-tool a,
.window:has(> #historylog_Dialog) > .window-header .panel-tool a,
.window:has(> #officer_Dialog) > .window-header .panel-tool a,
.window:has(> #guild_Dialog) > .window-header .panel-tool a,
.window:has(> #Drop_Dialog) > .window-header .panel-tool a,
.window:has(> #goods_Dialog) > .window-header .panel-tool a,
.window:has(> #onlinelist_Dialog) > .window-header .panel-tool a,
.window:has(> #guild_info_dialog) > .window-header .panel-tool a{ filter:invert(1) sepia(1) saturate(.6) brightness(1.4); opacity:.85; }
.window:has(> #YARD_SHIP_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #shiplist_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #city_bank_dialog) > .window-header .panel-tool a:hover,
.window:has(> #city_invest_dialog) > .window-header .panel-tool a:hover,
.window:has(> #Search_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #battle_detail_dlg) > .window-header .panel-tool a:hover,
.window:has(> #eventlog_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #tradenote_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #ranklist_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #advenlog_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #historylog_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #officer_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #guild_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #Drop_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #goods_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #onlinelist_Dialog) > .window-header .panel-tool a:hover,
.window:has(> #guild_info_dialog) > .window-header .panel-tool a:hover{ opacity:1; }
#YARD_SHIP_Dialog{ overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; border-color:#8a6a3a; color:#2e1d0c; }
#YARD_SHIP_Dialog .cp-ic{ margin-right:4px; }
.yd-wrap{ height:100%; display:flex; }
.yd-side{ flex:0 0 272px; display:flex; flex-direction:column; background:linear-gradient(170deg,#4a2d15,#3b2412 60%,#2a1709); color:#e8d6b0; border-right:3px solid #b8892e; box-shadow:inset -1px 0 0 rgba(232,199,122,.25); }
.yd-side-title{ padding:8px 11px 6px; }
.yd-side-title b{ color:#f6dc8f; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.8); }
.yd-formation{ flex:none; width:250px; margin:0 auto; border-radius:6px; overflow:hidden; box-shadow:0 0 0 1px #5a3a1c, 0 0 0 3px #c9a24a, 0 2px 6px rgba(0,0,0,.45); }
.yd-status{ flex:1; padding:8px 11px 10px; overflow:hidden; }
.yd-money{ display:flex; justify-content:space-between; align-items:baseline; padding:4px 8px; border-radius:3px; background:rgba(232,199,122,.14); border:1px solid rgba(232,199,122,.45); }
.yd-money > span{ font-size:11px; color:#f6dc8f; }
.yd-money .yd-val{ font-size:16px; font-weight:700; color:#f6dc8f; }
.yd-stat-grid{ display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-top:6px; }
.yd-stat{ background:rgba(255,236,190,.08); border:1px solid rgba(232,199,122,.15); border-radius:3px; padding:2px 8px; }
.yd-stat-wide{ grid-column:1 / -1; }
.yd-stat > span{ display:block; font-size:10px; color:#c9b48a; }
.yd-stat .yd-val{ font-size:13px; font-weight:700; color:#FBEFD0; }
.yd-val span{ color:#f6dc8f; }

.yd-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.yd-tabs{ flex:none; display:flex; align-items:center; gap:4px; padding:8px 12px 0; background:linear-gradient(180deg, rgba(90,58,28,.22), rgba(90,58,28,.1)); border-bottom:2px solid #b8892e; }
.yd-tab{ cursor:pointer; display:inline-flex; align-items:center; padding:5px 14px 6px; border-radius:4px 4px 0 0; font-size:13px; font-weight:700; color:#F6E7C1 !important; text-decoration:none !important; text-shadow:1px 1px 1px rgba(20,10,0,.8); background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #8a6a3a; border-bottom:0; margin-bottom:0; }
.yd-tab:hover{ filter:brightness(1.15); }
.yd-tab.is-active{ background:linear-gradient(180deg,#fbf3df,#f0e2bd); color:#5A3412 !important; text-shadow:none; border-color:#b8892e; box-shadow:inset 0 2px 0 #c9a24a; }
.yd-fleet-count{ margin-left:auto; font-size:12px; color:#5A3412; padding-bottom:4px; text-shadow:0 0 3px rgba(255,248,225,.9); }
.yd-fleet-count b{ color:#3b2412; }
.yd-summary-toggle{ display:none; }
.yd-list{ flex:1; min-height:0; overflow-y:auto; padding:10px 12px 12px; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
.yd-empty{ padding:80px 0; text-align:center; color:#5A3412; line-height:1.8; text-shadow:0 0 3px rgba(255,248,225,.9); }
.yd-empty span{ display:block; font-size:32px; }
.yd-empty-ic{ width:40px; height:40px; margin:0 auto 4px; background-repeat:no-repeat; background-position:center; background-size:40px 40px; }
.yd-notice{ margin-bottom:8px; padding:6px 10px; border-radius:3px; background:rgba(255,249,232,.9); border:1px solid #a8463a; color:#8f1f12; font-size:12px; }
.yd-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.yd-card-ship{ display:flex; gap:10px; align-items:stretch; padding:8px 10px; background:rgba(255,249,232,.88); border-radius:4px; border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(60,35,10,.2); transition:box-shadow .15s, border-color .15s; }
.yd-card-ship:hover{ border-color:#b8892e; box-shadow:inset 0 0 0 1px #e8c77a, 0 3px 8px rgba(60,35,10,.28); }
.yd-card-ship.is-disabled{ opacity:.65; }
.yd-ship-img{ flex:none; width:64px; display:flex; align-items:center; justify-content:center; border-radius:3px; background:url("ship/sea.gif") repeat left top; /* 海面以原尺寸拼貼，不延展 */ box-shadow:0 0 0 1px #5a3a1c, 0 0 0 2px #c9a24a; }
.yd-ship-img img{ max-width:58px; max-height:52px; }
.yd-ship-main{ flex:1; min-width:0; }
.yd-ship-name{ font-weight:700; font-size:14px; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:3px; }
.yd-ship-stats{ display:flex; flex-wrap:wrap; gap:3px 4px; }
.yd-ship-stats span{ font-size:11px; color:#3b2412; background:rgba(90,60,25,.08); border:1px solid rgba(138,106,58,.25); border-radius:3px; padding:0 6px; line-height:17px; }
.yd-ship-stats em{ font-style:normal; color:#7a5c3a; margin-right:4px; }
.yd-up{ color:#4d6a1e; }
.yd-down{ color:#8f1f12; }
.yd-hp{ display:flex; align-items:center; gap:8px; margin-bottom:4px; font-size:11px; color:#7a5c3a; }
.yd-bar{ flex:1; height:6px; border-radius:3px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.25); overflow:hidden; }
.yd-bar i{ display:block; height:100%; border-radius:3px; }
.yd-bar-repair{ background:repeating-linear-gradient(45deg, rgba(90,60,25,.15) 0 4px, rgba(163,190,94,.3) 4px 8px); }
.yd-warn{ display:flex; align-items:center; flex-wrap:wrap; gap:4px; margin-top:3px; font-size:10px; color:#8f1f12; }
.yd-sw{ display:inline-flex; align-items:center; color:#4d6a1e; font-weight:700; }
.yd-sw .cp-ic{ width:13px; height:13px; background-size:13px 13px; margin-right:2px; }
.yd-pips{ display:flex; flex-wrap:wrap; gap:2px; margin-bottom:4px; }
.yd-pips i{ width:9px; height:9px; border-radius:2px; background:rgba(90,60,25,.12); border:1px solid rgba(138,106,58,.45); box-sizing:border-box; }
.yd-pips i.is-on{ background:#3b2412; border-color:#3b2412; }
.yd-pips i.is-next{ background:#f6dc8f; border-color:#b8892e; animation:adl-pulse 1.8s ease-in-out infinite; }
.yd-ship-act{ flex:none; width:96px; display:flex; flex-direction:column; align-items:flex-end; justify-content:space-between; gap:6px; }
.yd-price{ text-align:right; font-size:14px; font-weight:700; color:#8a5a00; line-height:1.2; }
.yd-price small{ display:block; font-size:10px; font-weight:400; color:#9a8463; }
.yd-price.is-income{ color:#4d6a1e; }
.yd-price.is-lack{ color:#8f1f12; }
/* 操作按鈕：深木黃銅為底，依動作分色（販售暗紅、修理橄欖綠、武裝／商會黃銅） */
.yd-act-btn{ cursor:pointer; display:block; width:100%; padding:5px 0; text-align:center; border-radius:4px; font-size:13px; font-weight:700; letter-spacing:1px; color:#F6E7C1 !important; text-decoration:none !important; text-shadow:1px 1px 2px rgba(20,10,0,.85); background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; box-shadow:inset 0 0 0 1px rgba(232,199,122,.3), 0 1px 3px rgba(60,35,10,.35); box-sizing:border-box; }
.yd-act-btn:hover{ filter:brightness(1.12); }
.yd-act-sell{ background:linear-gradient(180deg,#9a3a28,#6a1e12); border-color:#c9876a; }
.yd-act-repair{ background:linear-gradient(180deg,#6f8f3a,#465e20); border-color:#b8c98a; }
.yd-act-atkup{ color:#3a2410 !important; text-shadow:0 1px 0 rgba(255,245,215,.6); background:linear-gradient(180deg,#f3dd9a,#c99a2e 60%,#a87a1f); border-color:#7a5518; }
.yd-act-btn.is-disabled{ cursor:not-allowed; background:rgba(255,249,232,.7); border-color:#c9a86a; color:#9a8463 !important; text-shadow:none; box-shadow:none; filter:none; }
/* 武裝：一次增設多門炮 */
.yd-grid.yd-grid-1{ grid-template-columns:1fr; }
.yd-m-atkup .yd-ship-act{ width:120px; }
.yd-up-line{ font-size:12px; color:#7a5c3a; margin-bottom:2px; }
.yd-up-line b{ font-size:14px; }
.yd-up-line small{ margin-left:6px; color:#8a5a00; font-weight:700; }
.yd-up-ctl{ display:flex; align-items:center; gap:8px; max-width:420px; }
.yd-up-sb{ cursor:pointer; flex:none; width:24px; height:24px; line-height:22px; text-align:center; border-radius:50%; border:1px solid #c9a24a; background:radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); color:#F6E7C1 !important; font-weight:700; text-decoration:none !important; box-sizing:border-box; user-select:none; box-shadow:0 1px 2px rgba(0,0,0,.35); }
.yd-up-sb:hover{ border-color:#e8c77a; filter:brightness(1.15); }
.yd-up-range{ flex:1; min-width:0; margin:0; accent-color:#b8892e; cursor:pointer; }
.yd-up-presets{ display:flex; gap:6px; margin-top:4px; max-width:420px; }
.yd-up-pr{ cursor:pointer; flex:1; text-align:center; padding:1px 0; border-radius:3px; border:1px solid #c9a86a; background:rgba(255,249,232,.85); font-size:11px; font-weight:700; color:#5A3412 !important; text-decoration:none !important; white-space:nowrap; }
.yd-up-pr:hover{ border-color:#b8892e; color:#3b2412 !important; }
.yd-up-pr.is-active{ background:linear-gradient(180deg,#6a4320,#3b2412); border-color:#c9a24a; color:#F6E7C1 !important; }
.yd-up-pr.is-off{ cursor:not-allowed; opacity:.5; }
.yd-m-atkup.is-disabled{ opacity:1; }
.yd-m-atkup.is-disabled .yd-ship-img, .yd-m-atkup.is-disabled .yd-ship-name{ opacity:.65; }
/* 商會船艦 */
.yd-tab-guild:not(.is-active){ color:#f6dc8f !important; }
.yd-gwallet{ display:flex; align-items:center; flex-wrap:wrap; margin-bottom:8px; padding:6px 10px; border-radius:3px; background:rgba(255,244,214,.92); border:1px solid #b8892e; font-size:12px; color:#5A3412; }
.yd-gwallet b{ margin-left:4px; color:#8a5a00; font-variant-numeric:tabular-nums; }
.yd-gwallet small{ display:block; flex-basis:100%; font-size:10px; color:#7a5c3a; }
.yd-gbase{ font-size:10px; color:#7a5c3a; margin:-2px 0 3px; }
.yd-gcoin{ margin-top:3px; font-size:10px; color:#8a5a00; }
.yd-act-guild{ color:#3a2410 !important; text-shadow:0 1px 0 rgba(255,245,215,.6); background:linear-gradient(180deg,#f3dd9a,#c99a2e 60%,#a87a1f); border-color:#7a5518; }
.yd-gs-form{ margin-top:8px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.yd-gs-form input{ width:130px; height:24px; text-align:right; font-weight:700; color:#3b2412; background:#fbf3df; border:1px solid #8a6a3a; border-radius:3px; }
.yd-gs-form small{ color:#7a5c3a; }
.yd-gs-split{ margin-top:6px; font-size:12px; color:#5A3412; line-height:1.6; }

/* ── 交易所（page.Action.Trade.php；大航海風格）：清單與交易面板皆保留 TRADE.png 商店背景與遮罩，
   以 ::before 重繪背景並用 luminosity 混合成牛皮紙色調（同海上介面），濾鏡不影響上層內容 ── */
.tr-bg{ position:relative; width:297px; height:250px; border-radius:6px; overflow:hidden; background:#b39a6a; }
.tr-bg::before,
#TRADE_TAB_BG_O::before{ content:''; position:absolute; left:0; top:0; right:0; bottom:0; background:url('images/TRADE.png') center/cover no-repeat, #dcc28c; background-blend-mode:luminosity; filter:brightness(1.3) contrast(.9) saturate(.75); }
.tr-pane{ position:relative; box-sizing:border-box; height:100%; display:flex; flex-direction:column; gap:5px; padding:6px 7px 7px; border-radius:6px; background:radial-gradient(ellipse at center, rgba(90,58,28,0) 45%, rgba(90,58,28,.28) 100%), rgba(240,228,196,.55); box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6); }
.tr-seg{ flex:none; display:flex; gap:2px; padding:2px; border-radius:4px; background:linear-gradient(180deg,#4a2d15,#2a1709); border:1px solid #8a6a3a; }
.tr-seg-btn{ cursor:pointer; flex:1; display:flex; align-items:center; justify-content:center; padding:3px 0; border-radius:3px; font-size:13px; font-weight:700; color:#e8d6b0 !important; text-decoration:none !important; text-shadow:1px 1px 1px rgba(20,10,0,.8); transition:background .15s; }
.tr-seg-btn .cp-ic{ margin-right:4px; }
.tr-seg-btn:hover{ background:rgba(232,199,122,.18); }
.tr-seg-btn.is-active{ background:linear-gradient(180deg,#f6ead0,#e3cf9f); color:#5A3412 !important; text-shadow:none; box-shadow:inset 0 0 0 1px #c9a24a, 0 1px 2px rgba(0,0,0,.35); }
.tr-notice{ flex:none; font-size:11px; color:#8f1f12; padding:3px 8px; border-radius:3px; background:rgba(255,249,232,.85); border:1px solid #a8463a; }
.tr-list{ flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:4px; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
.tr-list::-webkit-scrollbar{ width:4px; }
.tr-list::-webkit-scrollbar-thumb{ background:rgba(138,106,58,.6); border-radius:2px; }
.tr-empty{ margin:auto; text-align:center; color:#5A3412; font-size:12px; line-height:1.8; text-shadow:0 0 3px rgba(255,248,225,.9); }
.tr-empty span{ display:block; font-size:24px; }
.tr-empty-ic{ width:28px; height:28px; margin:0 auto 2px; background-repeat:no-repeat; background-position:center; background-size:28px 28px; }
.tr-row{ cursor:pointer; flex:none; display:flex; align-items:center; gap:7px; padding:4px 7px; border-radius:3px; background:rgba(255,249,232,.82); border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); transition:background .12s, border-color .12s; }
.tr-row:hover{ background:rgba(255,251,240,.95); }
.tr-row.is-selected{ background:rgba(255,246,220,.98); border-color:#b8892e; box-shadow:0 0 0 1px #c9a24a inset, 0 1px 4px rgba(120,80,20,.35); }
.tr-icon{ flex:none; width:28px; height:28px; border-radius:3px; background:#fbf3df; border:1px solid #c9a86a; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.tr-icon img{ max-width:26px; max-height:26px; }
.tr-info{ flex:1; min-width:0; }
.tr-name{ font-size:12px; font-weight:700; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tr-tag{ font-style:normal; margin-left:4px; padding:0 5px; border-radius:3px; font-size:9px; font-weight:700; color:#fff; vertical-align:1px; }
.tr-tag-need{ background:#b8892e; }
.tr-tag-dmg{ background:#a8463a; }
.tr-tag-oversupply{ background:#7d7468; cursor:help; }
.tr-sub{ font-size:10px; color:#7a5c3a; }
.tr-bad{ color:#8f1f12; }
.tr-right{ flex:none; text-align:right; line-height:1.2; }
.tr-right b{ display:block; font-size:13px; color:#8a5a00; font-variant-numeric:tabular-nums; }
.tr-right b small{ font-size:9px; font-weight:400; margin-left:1px; }
.tr-idx{ font-size:9px; color:#7a5c3a; }
.tr-idx.is-cheap{ color:#4d6a1e; font-weight:700; }
.tr-idx.is-dear{ color:#8f1f12; font-weight:700; }
.tr-idx.is-bond{ color:#4d6a1e; font-weight:700; }
.tr-idx s{ color:#9a8463; font-weight:400; }
.tr-bond{ flex:none; display:flex; align-items:center; font-size:11px; color:#4d6a1e; padding:3px 8px; border-radius:3px; background:rgba(255,249,232,.85); border:1px solid rgba(93,122,46,.55); }
.tr-bond .cp-ic{ margin-right:4px; }
.tr-bond b{ margin:0 2px; font-variant-numeric:tabular-nums; }
/* 商會採購：任務摘要 */
.tr-gt{ flex:none; padding:4px 8px 5px; border-radius:3px; background:rgba(255,249,232,.85); border:1px solid #b8892e; }
.tr-gt-top{ display:flex; justify-content:space-between; align-items:baseline; gap:6px; font-size:11px; color:#7a5c3a; }
.tr-gt-top b{ display:inline-flex; align-items:center; font-size:12px; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tr-gt-top b .cp-ic{ margin-right:3px; }
.tr-gt-top span{ flex:none; }
.tr-gt-bar{ height:6px; margin:3px 0 2px; border-radius:3px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.25); overflow:hidden; }
.tr-gt-bar i{ display:block; height:100%; border-radius:3px; background:linear-gradient(90deg,#9a6c1e,#e0b85a 70%,#f6dc8f); }
.tr-gt-sub{ display:flex; justify-content:space-between; gap:6px; font-size:10px; color:#7a5c3a; }
.tr-gt-sub span:last-child{ color:#8a5a00; font-weight:700; }
.tr-gt-note{ margin-top:1px; font-size:10px; color:#7a5c3a; }
.tr-tag-base{ background:#7a5c3a; }
.tr-row.is-off{ opacity:.6; }

/* 交易面板：沿用 #TRADE_TAB_BG_O（TRADE.png）與 .TAB_BG_I 遮罩；遮罩改為牛皮紙色只限交易所（酒館的 .TAB_BG_I 不受影響） */
#TRADE_TAB_BG_O{ position:relative; margin-top:6px; border-radius:6px; overflow:hidden; background:#b39a6a; }
#TRADE_TAB_BG_O > .TAB_BG_I{ position:relative; border-radius:6px; background:radial-gradient(ellipse at center, rgba(90,58,28,0) 45%, rgba(90,58,28,.28) 100%), rgba(240,228,196,.55); box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6); }
.tr-panel{ box-sizing:border-box; display:flex; flex-direction:column; gap:6px; padding:8px 9px; }
.tr-panel-empty{ margin:auto; text-align:center; color:#5A3412; font-size:12px; line-height:1.8; text-shadow:0 0 3px rgba(255,248,225,.9); }
.tr-panel-empty span{ display:block; font-size:24px; }
.tr-panel-warn{ color:#8f1f12; }
.tr-sel{ flex:none; display:flex; align-items:center; gap:8px; padding-bottom:5px; border-bottom:1px solid rgba(168,131,63,.55); }
.tr-sel .tr-icon{ width:32px; height:32px; }
.tr-sel-info{ flex:1; min-width:0; line-height:1.25; text-shadow:0 0 3px rgba(255,248,225,.95), 0 0 1px rgba(255,248,225,.95); }
.tr-sel-info b{ display:block; font-size:14px; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tr-sel-info small{ font-size:11px; color:#8a5a00; font-weight:700; }
.tr-sel-max{ flex:none; font-size:10px; color:#5A3412; padding:1px 7px; border-radius:3px; background:rgba(255,249,232,.85); border:1px solid #c9a86a; }
.tr-qty-row{ flex:none; display:flex; align-items:center; gap:8px; }
.tr-sb{ cursor:pointer; flex:none; width:26px; height:26px; line-height:24px; text-align:center; border-radius:50%; border:1px solid #c9a24a; background:radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); color:#F6E7C1 !important; font-weight:700; text-decoration:none !important; box-sizing:border-box; user-select:none; box-shadow:0 1px 2px rgba(0,0,0,.35); }
.tr-sb:hover{ border-color:#e8c77a; filter:brightness(1.15); }
#TRADE_QTY_RANGE{ flex:1; min-width:0; margin:0; accent-color:#b8892e; cursor:pointer; }
.tr-presets{ flex:none; display:flex; gap:6px; }
#TRADE_QTY{ flex:1; min-width:0; height:24px; text-align:center; font-size:14px; font-weight:700; color:#3b2412; border:1px solid #8a6a3a; border-radius:3px; background:#fbf3df; box-shadow:inset 0 1px 2px rgba(60,35,10,.25); box-sizing:border-box; }
.tr-pr{ cursor:pointer; flex:none; padding:0 12px; line-height:22px; border-radius:3px; border:1px solid #c9a86a; background:rgba(255,249,232,.85); font-size:11px; font-weight:700; color:#5A3412 !important; text-decoration:none !important; }
.tr-pr:hover{ border-color:#b8892e; color:#3b2412 !important; }
.tr-pr.is-active{ background:linear-gradient(180deg,#6a4320,#3b2412); border-color:#c9a24a; color:#F6E7C1 !important; }
.tr-buy-row{ display:flex; align-items:center; gap:8px; margin-top:auto; }
/* 總金額卡：羊皮紙卡片，避免文字直接疊在商店背景上看不清 */
.tr-total{ flex:1; min-width:0; line-height:1.2; padding:3px 8px 4px; border-radius:3px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-left:3px solid #b8892e; box-shadow:inset 0 0 0 1px rgba(255,255,255,.4), 0 1px 2px rgba(60,35,10,.2); }
.tr-total > span{ display:block; font-size:10px; color:#7a5c3a; }
.tr-total strong{ display:block; font-size:16px; color:#8a5a00; white-space:nowrap; }
.tr-total small{ display:block; font-size:10px; color:#7a5c3a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tr-total small.is-gain{ color:#4d6a1e; font-weight:700; }
.tr-total small.is-loss{ color:#8f1f12; font-weight:700; }
a.tr-btn{ min-width:118px; cursor:pointer; }

/* ── 啟航（page.Action.Move.php）：港口／海域航線清單（大航海風格：羊皮紙海圖底、黃銅框、羊皮紙航線卡）── */
.mv-section{ box-sizing:border-box; width:297px; height:366px; border-radius:6px; overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; border:1px solid #8a6a3a; box-shadow:inset 0 0 0 1px rgba(232,199,122,.45), 0 2px 4px rgba(60,35,10,.3); }
.mv-pane{ box-sizing:border-box; height:100%; display:flex; flex-direction:column; gap:6px; padding:7px 8px 8px; background-color:transparent; }
.mv-head{ flex:none; display:flex; align-items:center; justify-content:space-between; padding-bottom:4px; border-bottom:1px solid rgba(168,131,63,.55); }
.mv-head b{ display:inline-flex; align-items:center; font-size:13px; letter-spacing:1px; color:#5A3412; }
.mv-head span{ font-size:10px; color:#7a5c3a; }
.mv-list{ flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:4px; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
.mv-list::-webkit-scrollbar{ width:4px; }
.mv-list::-webkit-scrollbar-thumb{ background:rgba(138,106,58,.6); border-radius:2px; }
.mv-empty{ margin:auto; text-align:center; color:#7a5c3a; font-size:12px; line-height:1.8; }
.mv-empty-ic{ display:block; width:28px; height:28px; margin:0 auto 2px; background:url('images/uw_ic_sailtime.png') no-repeat center center / 28px 28px; opacity:.85; }
.mv-row{ cursor:pointer; flex:none; padding:5px 8px 6px; border-radius:3px; background:rgba(255,249,232,.78); border:1px solid #c9a86a; border-left:3px solid #2a6a8c; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); transition:background .12s, border-color .12s, box-shadow .12s; }
.mv-row:hover{ background:rgba(255,251,240,.95); }
.mv-row.is-warn{ border-left-color:#a8463a; }
.mv-row.is-selected{ background:rgba(255,246,220,.98); border-color:#b8892e; border-left-color:#b8892e; box-shadow:0 0 0 1px #c9a24a inset, 0 1px 4px rgba(120,80,20,.35); }
.mv-row-main{ display:flex; align-items:center; justify-content:space-between; gap:6px; }
.mv-name{ font-size:13px; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mv-food{ flex:none; font-size:10px; font-weight:700; padding:0 7px; border-radius:3px; line-height:16px; background:rgba(90,60,25,.1); color:#7a5c3a; border:1px solid rgba(138,106,58,.35); }
.mv-food.is-ok{ background:rgba(163,190,94,.25); color:#4d6a1e; border-color:rgba(93,122,46,.45); }
.mv-food.is-bad{ background:rgba(240,205,190,.85); color:#8f1f12; border-color:rgba(168,70,58,.55); }
.mv-row-sub{ display:flex; align-items:center; gap:8px; margin-top:3px; }
.mv-survey{ flex:none; display:inline-flex; align-items:center; font-size:10px; font-weight:700; padding:0 6px 0 3px; border-radius:3px; line-height:15px; background:#f6e7c1; color:#8a5a00; border:1px solid #c9a24a; }
.mv-time{ flex:none; display:inline-flex; align-items:center; font-size:11px; color:#7a5c3a; font-variant-numeric:tabular-nums; }
.mv-row .cp-ic{ width:14px; height:14px; margin-right:3px; vertical-align:-3px; background-size:14px 14px; }
.mv-dist{ flex:1; height:4px; border-radius:2px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.2); overflow:hidden; }
.mv-dist i{ display:block; height:100%; border-radius:2px; background:linear-gradient(90deg,#4f8fae,#1d4f7a); }
.mv-row.is-selected .mv-dist i{ background:linear-gradient(90deg,#9a6c1e,#e0b85a 70%,#f6dc8f); }
.mv-foot{ flex:none; display:flex; flex-direction:column; gap:6px; }
.mv-captcha{ display:flex; align-items:center; gap:6px; }
.mv-captcha img{ flex:none; width:100px; height:30px; border-radius:3px; cursor:pointer; border:1px solid #8a6a3a; }
.mv-captcha .textbox{ flex:1; border-radius:3px; border-color:#8a6a3a; }
.mv-captcha .textbox .textbox-text{ background:#fbf3df; color:#2e1d0c; }
a.mv-go{ display:block; width:100%; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* 啟航按鈕沿用共用 a.bar-btn（深木黃銅），這裡只調整圖示間距 */
.mv-foot a.bar-btn .cp-ic{ margin-right:5px; vertical-align:-3px; }
/* ── 海上航行中（page.Action.Sea.php）：目的地、航線、預計抵達（大航海風格；進度與倒數由中間欄航行動畫呈現）── */
.voy{ box-sizing:border-box; width:297px; border-radius:6px; overflow:hidden; color:#2e1d0c; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; border:1px solid #8a6a3a; box-shadow:inset 0 0 0 1px rgba(232,199,122,.45), 0 2px 4px rgba(60,35,10,.3); }
.voy .cp-ic{ margin-right:4px; }
.voy-hero{ display:flex; align-items:center; gap:10px; padding:12px 12px; color:#FBEFD0; background:#1b2a3a url('images/uw_hero_port.jpg') no-repeat 70% center; background-size:cover; border-bottom:3px solid #b8892e; box-shadow:inset 0 -1px 0 rgba(255,236,190,.35); }
.voy.is-area .voy-hero{ background-color:#14323f; background-image:url('images/uw_hero_sea.jpg'); }
.voy-badge{ flex:none; width:44px; height:44px; border-radius:50%; box-sizing:border-box; display:flex; align-items:center; justify-content:center; border:2px solid #c9a24a; background:radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); box-shadow:0 0 0 1px rgba(20,10,0,.6), 0 2px 4px rgba(0,0,0,.45); }
.voy-badge .cp-ic{ width:28px; height:28px; margin:0; background-size:28px 28px; vertical-align:0; }
.voy-to{ flex:1; min-width:0; text-shadow:0 1px 3px rgba(0,0,0,.75); }
.voy-to small{ display:block; font-size:11px; letter-spacing:2px; color:#e8d6b0; }
.voy-dest-row{ display:flex; align-items:center; gap:8px; }
.voy-dest{ font-size:22px; font-weight:900; letter-spacing:3px; color:#FBEFD0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.voy-kind{ flex:none; font-size:10px; font-weight:700; padding:0 8px; line-height:16px; border-radius:3px; color:#3a2410; text-shadow:none; background:linear-gradient(180deg,#f3dd9a,#c99a2e); box-shadow:0 1px 2px rgba(0,0,0,.4); }
.voy.is-area .voy-kind{ background:linear-gradient(180deg,#cfe6e6,#8fbcc4); color:#0d3a4a; }
.voy-body{ padding:10px 12px 12px; display:flex; flex-direction:column; gap:10px; }
.voy-route{ display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.9); }
.voy-route span{ flex:none; max-width:42%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.voy-route-line{ flex:1; height:0; border-top:2px dashed #a8833f; position:relative; }
.voy-route-line::after{ content:''; position:absolute; right:-2px; top:-6px; border:5px solid transparent; border-left:7px solid #a8833f; }
.voy-rows{ background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-radius:4px; padding:3px 10px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.4); }
.voy-row{ display:flex; justify-content:space-between; align-items:center; padding:5px 0; border-bottom:1px dashed rgba(168,131,63,.45); font-size:12px; color:#7a5c3a; }
.voy-row:last-child{ border-bottom:0; }
.voy-row span{ display:inline-flex; align-items:center; }
.voy-row b{ font-size:14px; color:#3b2412; font-variant-numeric:tabular-nums; }
.voy-idle{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:18px 0 14px; text-align:center; color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.9); }
.voy-idle .cp-ic{ width:36px; height:36px; margin:0 0 2px; background-size:36px 36px; }
.voy-idle b{ font-size:14px; letter-spacing:1px; color:#3b2412; }
.voy-idle small{ font-size:11px; color:#7a5c3a; }
.voy-tip{ font-size:11px; line-height:1.5; color:#5A3412; padding:6px 8px; border-radius:3px; background:rgba(255,249,232,.8); border:1px dashed #a8833f; }

/* 啟航（港口／海域）、海上、海上航行中、城鎮、交易所、造船廠、酒館頁標題：木板黃銅名牌；僅作用在後面接著這些面板的 #ACTION_TITLE，其他行動頁標題維持原樣 */
#ACTION_TITLE:has(+ .mv-section),
#ACTION_TITLE:has(+ .Battle_out_bg),
#ACTION_TITLE:has(+ #city_dom_panel),
#ACTION_TITLE:has(+ #TRADE_LIST_BG),
#ACTION_TITLE:has(+ #YARD_MAIN_DIV),
#ACTION_TITLE:has(+ #BAR_Tab),
#ACTION_TITLE:has(+ #sea_voyage){
  box-sizing:border-box;
  width:297px;
  height:35px;
  margin:15px 0 4px;
  padding:0;
  border:8px solid transparent;
  border-image:url('images/uw_plate_captain.png') 24 fill / 12px stretch;
  background:none;
  font-size:19px;
  line-height:19px;
  letter-spacing:8px;
  color:#F6E7C1;
  text-shadow:1px 1px 2px rgba(20,10,0,.9);
}

/* ── 主畫面左側：艦長 / 名聲經驗面板（大航海風格：木製黃銅名牌、羊皮紙格、黃銅進度條）── */
.cp-card{ box-sizing:border-box; width:200px; padding:6px 6px 4px; font-size:12px; color:#2e1d0c; }
/* 名牌用九宮格切片：四角黃銅包角維持比例，只拉伸邊與木紋（圖檔 400×95，角約 24px，以 2 倍解析度顯示為 12px） */
.cp-head{ display:flex; align-items:center; gap:8px; padding:0 2px; border:10px solid transparent; border-image:url('images/uw_plate_captain.png') 24 fill / 12px stretch; filter:drop-shadow(0 2px 2px rgba(60,35,10,.4)); }
.cp-avatar{ flex:none; padding:2px; border-radius:5px; background:linear-gradient(145deg,#f3dd9a,#b8892e 55%,#7a5518); box-shadow:0 1px 2px rgba(0,0,0,.5); }
.cp-avatar img{ display:block; width:50px; height:50px; border-radius:3px; background:#2a1709; }
.cp-name{ flex:1; min-width:0; display:block; text-decoration:none !important; cursor:pointer; border-radius:4px; padding:2px 4px; transition:background .15s; }
.cp-name:hover{ background:rgba(255,236,190,.12); }
.cp-name-text{ font-size:15px; font-weight:700; color:#FBEFD0; text-shadow:1px 1px 2px rgba(20,10,0,.9); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cp-name-hint{ display:inline-block; margin-top:2px; font-size:10px; color:#E8C77A; opacity:.8; text-shadow:1px 1px 1px rgba(20,10,0,.8); transition:opacity .15s; }
.cp-name:hover .cp-name-hint{ opacity:1; text-decoration:underline; }
.cp-rows{ margin-top:5px; display:flex; flex-direction:column; gap:3px; }
.cp-row{ display:flex; align-items:center; justify-content:space-between; gap:6px; padding:3px 7px; border-radius:4px; background:rgba(255,249,232,.72); border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); }
.cp-row > span{ flex:none; font-size:11px; color:#7a5c3a; }
/* 名聲列圖示（取代 emoji；圖檔 32×32，2 倍解析度顯示為 16px） */
.cp-ic{ display:inline-block; width:16px; height:16px; margin-right:4px; vertical-align:-4px; background:no-repeat center center; background-size:16px 16px; }
.cp-ic-profit  { background-image:url('images/uw_ic_profit.png'); }
.cp-ic-piracy  { background-image:url('images/uw_ic_piracy.png'); }
.cp-ic-sailtime{ background-image:url('images/uw_ic_sailtime.png'); }
.cp-ic-adven   { background-image:url('images/uw_ic_adven.png'); }
.cp-ic-money   { background-image:url('images/uw_ic_money.png'); }
.cp-ic-bounty  { background-image:url('images/uw_ic_bounty.png'); }
.cp-ic-officer { background-image:url('images/uw_ic_officer.png'); }
.cp-row-pair .cp-ic{ margin-right:0; }
.cp-ic-wave     { background-image:url('images/uw_ic_wave.png'); }
.cp-ic-specialty{ background-image:url('images/uw_ic_specialty.png'); }
.cp-ic-news     { background-image:url('images/uw_ic_news.png'); }
.cp-ic-guns     { background-image:url('images/uw_ic_guns.png'); }
.cp-ic-evade    { background-image:url('images/uw_ic_evade.png'); }
.cp-ic-anchor   { background-image:url('images/uw_ic_anchor.png'); }
.cp-ic-hourglass{ background-image:url('images/uw_ic_hourglass.png'); }
.cp-ic-survey   { background-image:url('images/uw_ic_cargolist.png'); }
.cp-ic-cityhall { background-image:url('images/uw_ic_cityhall.png'); }
.cp-ic-crown    { background-image:url('images/uw_ic_crown.png'); }
.cp-ic-town     { background-image:url('images/uw_ic_town.png'); }
.cp-ic-swords   { background-image:url('images/uw_ic_swords.png'); }
.cp-ic-bank     { background-image:url('images/uw_ic_bank.png'); }
.cp-ic-tankard  { background-image:url('images/uw_ic_tankard.png'); }
.cp-ic-rum      { background-image:url('images/uw_ic_rum.png'); }
.cp-ic-spyglass { background-image:url('images/uw_ic_spyglass.png'); }
.cp-ic-map      { background-image:url('images/uw_ic_map.png'); }
.cp-ic-pricetag { background-image:url('images/uw_ic_pricetag.png'); }
.cp-ic-tools    { background-image:url('images/uw_ic_tools.png'); }
.cp-ic-jettison { background-image:url('images/uw_ic_jettison.png'); }
.cp-ic-dismiss  { background-image:url('images/uw_ic_dismiss.png'); }
.cp-ic-cargolist{ background-image:url('images/uw_ic_cargolist.png'); }
.cp-row-pair{ display:grid; grid-template-columns:1fr 1fr; gap:3px; }
.cp-row-pair .cp-row{ min-width:0; gap:3px; padding:3px 5px; }
.cp-row-pair .cp-row > span{ font-size:10px; }
.cp-row-pair .cp-val{ font-size:12px; letter-spacing:-.5px; }
.cp-val{ min-width:0; font-weight:700; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:right; }
.cp-gold{ color:#8a5a00; font-size:13px; }
.cp-bounty.is-wanted{ background:rgba(240,205,190,.85); border-color:#a8463a; }
.cp-bounty.is-wanted .cp-val{ color:#8f1f12; }
.cp-sec{ margin:7px 0 4px; font-size:11px; font-weight:700; letter-spacing:2px; color:#5A3412; display:flex; align-items:center; gap:6px; }
.cp-sec::before{ content:''; flex:none; width:5px; height:5px; transform:rotate(45deg); background:#b8892e; }
.cp-sec::after{ content:''; flex:1; height:1px; background:linear-gradient(90deg,#a8833f,rgba(168,131,63,0)); }
.cp-sec-first{ margin-top:2px; }
.cp-lvs{ display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.cp-lv{ padding:4px 6px 5px; border-radius:4px; background:rgba(255,249,232,.78); border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15); cursor:default; }
/* 四個等級卡：各自的插畫背景（主體在右側），左側疊一層羊皮紙漸層讓文字清楚；圖檔 184×108，2 倍解析度 */
.cp-lv[data-k]{ position:relative; min-height:44px; background-color:#EADBB4; background-repeat:no-repeat; background-position:center center, right center; background-size:100% 100%, cover; }
.cp-lv[data-k='trade'] { background-image:linear-gradient(90deg, rgba(240,228,196,.92) 0%, rgba(240,228,196,.6) 38%, rgba(240,228,196,0) 62%), url('images/uw_skill_trade.jpg'); }
.cp-lv[data-k='nav']   { background-image:linear-gradient(90deg, rgba(240,228,196,.92) 0%, rgba(240,228,196,.6) 38%, rgba(240,228,196,0) 62%), url('images/uw_skill_nav.jpg'); }
.cp-lv[data-k='attack']{ background-image:linear-gradient(90deg, rgba(240,228,196,.92) 0%, rgba(240,228,196,.6) 38%, rgba(240,228,196,0) 62%), url('images/uw_skill_attack.jpg'); }
.cp-lv[data-k='blade'] { background-image:linear-gradient(90deg, rgba(240,228,196,.92) 0%, rgba(240,228,196,.6) 38%, rgba(240,228,196,0) 62%), url('images/uw_skill_blade.jpg'); }
.cp-lv-lb{ display:block; font-size:11px; font-weight:700; letter-spacing:1px; color:#5A3412; text-shadow:0 0 2px rgba(255,248,225,.9); }
.cp-lv-num{ display:block; font-size:10px; color:#8f7553; line-height:1.2; }
.cp-lv-num div{ display:inline; margin-left:2px; font-size:17px; font-weight:900; color:#3b2412; text-shadow:0 0 3px rgba(255,248,225,.95); }
.cp-bar{ height:4px; margin-top:3px; border-radius:2px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.25); overflow:hidden; }
.cp-bar i{ display:block; width:0; height:100%; border-radius:2px; background:linear-gradient(90deg,#9a6c1e,#e0b85a 70%,#f6dc8f); transition:width .4s; }
.cp-exps{ display:flex; flex-direction:column; gap:5px; }
.cp-exp{ cursor:default; }
.cp-exp-top{ display:flex; align-items:baseline; justify-content:space-between; gap:6px; }
.cp-exp-top > span{ flex:none; font-size:11px; color:#7a5c3a; }
.cp-exp-top b{ color:#5A3412; font-size:10px; }
.cp-exp-top .cp-val{ font-size:11px; }
.cp-exp .cp-bar{ margin-top:2px; }
#cp_officer_list .cp-of-none{ color:#9a8463; }

/* ── 主畫面：艦隊概況 / 貨艙 / 水手面板（.ship_info_area 240×275；大航海風格：羊皮紙底、黃銅框）── */
.fi-card{ box-sizing:border-box; height:275px; padding:6px 8px 8px; border-radius:6px; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; border:1px solid #8a6a3a; box-shadow:inset 0 0 0 1px rgba(232,199,122,.55), 0 2px 4px rgba(60,35,10,.25); font-size:12px; color:#2e1d0c; display:flex; flex-direction:column; gap:4px; }
.fi-sec{ display:flex; align-items:center; gap:6px; font-size:11px; font-weight:700; letter-spacing:2px; color:#5A3412; }
.fi-sec::before{ content:''; flex:none; width:5px; height:5px; transform:rotate(45deg); background:#b8892e; }
.fi-sec::after{ content:''; flex:1; height:1px; background:linear-gradient(90deg,#a8833f,rgba(168,131,63,0)); order:1; }
.fi-sec-sub{ order:2; font-size:10px; font-weight:400; letter-spacing:0; color:#7a5c3a; white-space:nowrap; }
.fi-sec-sub div{ display:inline; font-weight:700; color:#3b2412; }
.fi-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:4px; }
.fi-stat{ text-align:center; padding:3px 2px 4px; border-radius:4px; background:rgba(255,249,232,.78); border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15); }
.fi-stat span{ display:flex; align-items:center; justify-content:center; font-size:10px; color:#7a5c3a; }
.fi-stat .cp-ic{ margin-right:2px; }
.fi-num{ font-size:15px; font-weight:900; color:#3b2412; line-height:1.2; }
.fi-bar{ position:relative; display:flex; height:7px; border-radius:4px; background:rgba(90,60,25,.18); box-shadow:inset 0 1px 1px rgba(60,35,10,.25); overflow:hidden; }
.fi-bar i{ display:block; height:100%; transition:width .4s; }
.fi-seg-goods{ background:linear-gradient(90deg,#9a6c1e,#e0b85a 70%,#f6dc8f); }
.fi-seg-food{ background:linear-gradient(90deg,#5d7a2e,#a3be5e); }
.fi-cargo-bar.is-full{ box-shadow:0 0 0 1px #a8463a; }
.fi-rows{ display:flex; flex-direction:column; gap:3px; }
.fi-row{ display:flex; align-items:center; gap:6px; min-height:24px; padding:0 4px 0 8px; border-radius:4px; background:rgba(255,249,232,.72); border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); }
.fi-row > span:first-child{ flex:1; min-width:0; display:flex; align-items:center; gap:5px; font-size:11px; color:#7a5c3a; white-space:nowrap; }
.fi-val{ font-weight:700; color:#3b2412; white-space:nowrap; font-variant-numeric:tabular-nums; }
.fi-val span{ color:#8a5a00; }
.fi-dot{ display:inline-block; width:8px; height:8px; border-radius:2px; }
.fi-dot-food{ background:#a3be5e; } .fi-dot-goods{ background:#e0b85a; } .fi-dot-free{ background:rgba(90,60,25,.12); border:1px solid #c9a86a; box-sizing:border-box; }
.fi-row .trashcan_icon, .fi-row .List_icon, .fi-row .PersonRemove_icon{ float:none; flex:none; margin:0; width:22px; height:22px; border-radius:4px; background-size:18px; transition:background-color .15s; }
.fi-row .trashcan_icon:hover, .fi-row .List_icon:hover, .fi-row .PersonRemove_icon:hover{ background-color:rgba(184,137,46,.22); }
.fi-row .trashcan_icon    { background-image:url('images/uw_ic_jettison.png'); }
.fi-row .List_icon        { background-image:url('images/uw_ic_cargolist.png'); }
.fi-row .PersonRemove_icon{ background-image:url('images/uw_ic_dismiss.png'); }
.fi-icon-space{ flex:none; width:22px; }
.fi-sailor-bar{ overflow:visible; margin-top:2px; }
.fi-sailor-bar i{ border-radius:4px; background:linear-gradient(90deg,#2a6a8c,#1d4f7a); }
.fi-sailor-bar.is-short i{ background:linear-gradient(90deg,#c0604f,#8f1f12); }
.fi-sailor-bar em{ position:absolute; top:-3px; bottom:-3px; width:0; border-left:2px solid #3b2412; }

/* ── 主畫面：所在地資訊（大航海風格：港口／外海黃昏橫幅、黃銅徽章、羊皮紙內文）── */
.loc-card{ box-sizing:border-box; width:500px; margin-top:15px; margin-bottom:4px; /* 與左右兩側標題列頂端對齊 */ border-radius:6px; overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center 70%; background-size:cover; border:1px solid #8a6a3a; box-shadow:inset 0 0 0 1px rgba(232,199,122,.45), 0 2px 4px rgba(60,35,10,.3); }
.loc-hero{ display:flex; align-items:center; gap:12px; padding:10px 14px; color:#fff; background:#1b2a3a url('images/uw_hero_port.jpg') no-repeat center center; background-size:cover; border-bottom:3px solid #b8892e; box-shadow:inset 0 -1px 0 rgba(255,236,190,.35); }
.loc-card.is-sea .loc-hero{ background-color:#14323f; background-image:url('images/uw_hero_sea.jpg'); }
.loc-badge{ flex:none; width:44px; height:44px; border-radius:50%; box-sizing:border-box; border:2px solid #c9a24a; background:url('images/uw_ic_anchor.png') no-repeat center center / 28px 28px, radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); box-shadow:0 0 0 1px rgba(20,10,0,.6), 0 2px 4px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,236,190,.35); }
.loc-card.is-sea .loc-badge{ background-image:url('images/uw_ic_wave.png'), radial-gradient(circle at 40% 35%, #6a4320, #2a1709 75%); }
.loc-names{ flex:1; min-width:0; }
.loc-port-row{ display:flex; align-items:center; gap:8px; }
.loc-port{ font-size:24px; font-weight:900; letter-spacing:3px; color:#FBEFD0; text-shadow:0 2px 4px rgba(0,0,0,.7); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.loc-tag{ flex:none; font-size:10px; font-weight:700; padding:0 8px; line-height:16px; border-radius:3px; color:#3a2410; background:linear-gradient(180deg,#f3dd9a,#c99a2e); box-shadow:0 1px 2px rgba(0,0,0,.4); }
.loc-card.is-sea .loc-tag{ background:linear-gradient(180deg,#cfe6e6,#8fbcc4); color:#0d3a4a; }
.loc-area{ display:flex; align-items:center; gap:6px; margin-top:2px; font-size:12px; color:#e8d6b0; text-shadow:0 1px 2px rgba(0,0,0,.7); }
.loc-area span{ display:inline-flex; align-items:center; opacity:.9; }
.loc-area div{ font-weight:700; color:#FBEFD0; }
.loc-price{ flex:none; width:128px; padding:5px 8px 6px; border-radius:4px; background:rgba(20,12,5,.55); border:1px solid rgba(232,199,122,.5); box-shadow:inset 0 0 0 1px rgba(0,0,0,.3); cursor:default; }
.loc-price-top{ display:flex; align-items:baseline; justify-content:space-between; }
.loc-price-top span{ font-size:10px; color:#e8d6b0; }
.loc-price-val{ font-size:17px; font-weight:900; color:#FBEFD0; }
.loc-price-bar{ position:relative; height:5px; margin:3px 0 2px; border-radius:3px; background:rgba(255,236,190,.2); overflow:visible; }
.loc-price-bar i{ display:block; height:100%; border-radius:3px; background:#c9b48a; transition:width .4s; }
.loc-price-bar em{ position:absolute; left:50%; top:-2px; bottom:-2px; border-left:2px solid rgba(255,236,190,.8); }
.loc-price-lb{ font-size:10px; color:#e8d6b0; text-align:right; }
.loc-price.is-low  .loc-price-bar i{ background:#7fc1c9; }  .loc-price.is-low  .loc-price-lb{ color:#a8dde3; }
.loc-price.is-mid  .loc-price-bar i{ background:#a3be5e; }  .loc-price.is-mid  .loc-price-lb{ color:#cfe0a0; }
.loc-price.is-high .loc-price-bar i{ background:#e0b85a; }  .loc-price.is-high .loc-price-lb{ color:#f6dc8f; }
.loc-price.is-halt .loc-price-bar i{ background:#d9705f; }  .loc-price.is-halt .loc-price-lb{ color:#f0a89a; font-weight:700; }
.loc-body{ padding:6px 12px 8px; display:flex; flex-direction:column; gap:5px; }
.loc-line{ display:flex; align-items:flex-start; gap:10px; }
.loc-lb{ flex:none; width:58px; display:flex; align-items:center; font-size:12px; font-weight:700; color:#5A3412; line-height:22px; }
.loc-goods{ flex:1; min-width:0; display:flex; flex-wrap:wrap; gap:4px; }
.loc-chip{ display:inline-flex; align-items:center; gap:4px; padding:1px 8px 1px 3px; border-radius:3px; background:rgba(255,249,232,.85); border:1px solid #c9a86a; font-size:12px; color:#3b2412; line-height:18px; }
.loc-chip img{ width:16px; height:16px; border-radius:2px; }
.loc-msg{ flex:1; min-width:0; font-size:12px; line-height:22px; color:#2e1d0c; padding:0 8px; border-radius:3px; background:rgba(255,249,232,.8); border:1px solid #c9a86a; border-left:3px solid #b8892e; }
.loc-msg img{ vertical-align:-3px; margin:0 1px; }
.loc-none{ font-size:12px; color:#9a8463; line-height:22px; }

/* ── 事件紀錄：深木篩選列、羊皮紙海圖與黃銅時間軸 ── */
#eventlog_Dialog{ overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; border-color:#8a6a3a; color:#3b2412; }
#eventlog_Dialog .hl-filter{ font-family:inherit; line-height:20px; min-height:28px; }
#eventlog_Dialog .cp-ic-fleetlist{ background-image:url('images/uw_ic_fleetlist.png'); }
#eventlog_Dialog .hl-filter:focus-visible{ outline:2px solid #f6dc8f; outline-offset:2px; }
#eventlog_Dialog .hl-meta{ flex-wrap:wrap; gap:4px 8px; }
#eventlog_Dialog .hl-meta > span{ font-variant-numeric:tabular-nums; }
#eventlog_Dialog .ev-tag{ font-style:normal; font-weight:700; padding:0 7px; border-radius:3px; border:1px solid rgba(138,106,58,.35); background:rgba(90,60,25,.1); color:#5A3412; }
#eventlog_Dialog .ev-new{ font-style:normal; font-size:9px; font-weight:700; letter-spacing:1px; padding:0 5px; border-radius:3px; border:1px solid #6a1e12; color:#F6E7C1; background:#8f1f12; }
#eventlog_Dialog .ev-t-gold .hl-body{ border-left-color:#b8892e; }
#eventlog_Dialog .ev-t-gold .ev-tag{ background:rgba(246,220,143,.45); color:#755016; }
#eventlog_Dialog .ev-t-blue .hl-body{ border-left-color:#1d4f7a; }
#eventlog_Dialog .ev-t-blue .ev-tag{ background:rgba(63,127,166,.14); color:#1d4f7a; }
#eventlog_Dialog .ev-t-red .hl-body{ border-left-color:#8f1f12; }
#eventlog_Dialog .ev-t-red .ev-tag{ background:rgba(240,205,190,.7); color:#8f1f12; }
#eventlog_Dialog .ev-t-teal .hl-body{ border-left-color:#2a6a6a; }
#eventlog_Dialog .ev-t-teal .ev-tag{ background:rgba(80,125,115,.14); color:#285650; }
#eventlog_Dialog .ev-t-purple .hl-body{ border-left-color:#6a4320; }
#eventlog_Dialog .ev-t-purple .ev-tag{ background:rgba(168,131,63,.18); color:#5A3412; }
#eventlog_Dialog .ev-t-green .hl-body{ border-left-color:#4d6a1e; }
#eventlog_Dialog .ev-t-green .ev-tag{ background:rgba(163,190,94,.22); color:#40591a; }
#eventlog_Dialog .ev-t-gray .hl-body{ border-left-color:#7a5c3a; }
#eventlog_Dialog ::selection{ background:#c9a86a; color:#2a1709; }
@media (max-width:600px){
  #eventlog_Dialog .hl-filters{ padding:8px; gap:5px; }
  #eventlog_Dialog .hl-filter{ padding:2px 8px; }
  #eventlog_Dialog .hl-list{ padding-right:8px; padding-left:8px; }
  #eventlog_Dialog .hl-entry{ gap:8px; }
}
/* ── 排名：羊皮紙海圖、木質名次牌與黃銅框飾 ── */
#ranklist_Dialog{ overflow:hidden; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center; background-size:cover; border-color:#8a6a3a; color:#3b2412; }
.rk-wrap{ height:100%; display:flex; flex-direction:column; }
.rk-head{ flex:none; display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 14px; background:linear-gradient(180deg,#4a2d15,#2a1709); border-bottom:2px solid #b8892e; }
.rk-tabs{ display:flex; gap:5px; flex-wrap:wrap; }
.rk-tab{ display:inline-flex; align-items:center; cursor:pointer; min-height:30px; padding:3px 10px; border-radius:3px; font:inherit; font-size:12px; font-weight:700; color:#F6E7C1 !important; text-shadow:1px 1px 1px rgba(20,10,0,.8); background:rgba(255,236,190,.08); border:1px solid rgba(232,199,122,.35); text-decoration:none !important; }
.rk-tab:hover{ background:rgba(232,199,122,.2); }
.rk-tab.is-active{ background:linear-gradient(180deg,#f6ead0,#e3cf9f); color:#5A3412 !important; border-color:#c9a24a; text-shadow:none; }
.rk-tab:focus-visible{ outline:2px solid #f6dc8f; outline-offset:2px; }
.rk-week{ margin-left:auto; font-size:11px; color:#F6E7C1; white-space:nowrap; }
.rk-body{ flex:1; min-height:0; overflow-y:auto; padding:10px 14px 14px; scrollbar-width:thin; scrollbar-color:#8a6a3a transparent; }
.rk-empty{ padding:45px 16px; margin:12px 0; text-align:center; color:#5A3412; line-height:1.8; background:rgba(255,249,232,.88); border:1px solid #c9a86a; border-radius:3px; }
.rk-empty .cp-ic{ display:block; width:36px; height:36px; background-size:contain; margin:0 auto 10px; }
.rk-empty small{ display:block; color:#7a5c3a; }
.rk-label{ display:flex; align-items:center; justify-content:center; gap:12px; font-size:12px; font-weight:700; color:#5A3412; margin:2px 0 12px; }
.rk-label::before, .rk-label::after{ content:''; width:60px; height:1px; background:#b8892e; }
.rk-podium{ display:flex; align-items:flex-end; justify-content:center; gap:12px; margin-bottom:14px; }
.rk-pod{ position:relative; flex:0 1 150px; min-width:0; box-sizing:border-box; padding:8px 8px 0; text-align:center; cursor:pointer; background:rgba(255,249,232,.88); border:1px solid #c9a86a; border-radius:3px; box-shadow:0 2px 4px rgba(60,35,10,.18); }
.rk-pod:hover{ background:#fff9e8; border-color:#8a6a3a; }
.rk-pod:focus-visible, .rk-row:focus-visible{ outline:2px solid #5A3412; outline-offset:2px; }
.rk-pod.is-empty{ visibility:hidden; cursor:default; }
.rk-medal{ line-height:1; margin-bottom:5px; }
.rk-medal .cp-ic{ width:24px; height:24px; background-size:contain; margin:0; }
.rk-pod-2 .rk-medal .cp-ic{ filter:grayscale(1) sepia(.15); }
.rk-pod-3 .rk-medal .cp-ic{ filter:sepia(.7) saturate(.7) brightness(.8); }
.rk-pod-avatar{ display:inline-block; padding:3px; border-radius:50%; background:linear-gradient(145deg,#e2dfce,#8c8c79); box-shadow:0 2px 4px rgba(60,35,10,.25); }
.rk-pod-avatar img{ display:block; width:52px; height:52px; border-radius:50%; background:#3b2412; }
.rk-pod-1 .rk-pod-avatar{ background:linear-gradient(145deg,#f3dd9a,#b8892e); }
.rk-pod-1 .rk-pod-avatar img{ width:64px; height:64px; }
.rk-pod-3 .rk-pod-avatar{ background:linear-gradient(145deg,#d7b18a,#966039); }
.rk-pod-name{ margin-top:4px; font-weight:700; color:#3b2412; overflow-wrap:anywhere; line-height:1.5; }
.rk-pod-val{ margin:3px 0 6px; font-size:13px; font-weight:700; color:#755016; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.rk-pod-sub{ font-size:11px; color:#7a5c3a; overflow-wrap:anywhere; }
.rk-pod-sub .cp-ic{ width:12px; height:12px; background-size:contain; margin-right:2px; }

/* 商會資訊卡（排行榜點擊） */
/* ── 商會資訊卡（排行榜點擊；大航海風格：深木黃銅標頭、羊皮紙海圖內文、羊皮紙成員卡）── */
#guild_info_dialog{ max-height:calc(100vh - 70px); overflow-y:auto; color:#3b2412; background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center top; background-size:cover; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
#guild_info_dialog.gid-loading .gid-bd{ opacity:.45; transition:opacity .15s; }
.gid-hd{ display:flex; align-items:center; gap:14px; padding:14px 16px; color:#e8d6b0; background:radial-gradient(ellipse at 85% -40%, rgba(201,154,46,.35) 0%, rgba(201,154,46,0) 60%), linear-gradient(135deg,#2a1709 0%,#4a2d15 55%,#6a4320 100%); border-bottom:3px solid #b8892e; box-shadow:inset 0 -1px 0 rgba(255,236,190,.3); }
.gid-lv{ flex:none; width:60px; height:60px; border-radius:8px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#3b2410; background:linear-gradient(145deg,#f3dd9a,#c99a2e 60%,#a87a1f); border:1px solid #7a5518; box-shadow:inset 0 0 0 2px rgba(255,245,215,.35), 0 2px 6px rgba(0,0,0,.45); }
.gid-lv span{ font-size:10px; font-weight:700; line-height:1; }
.gid-lv b{ font-size:26px; line-height:1.1; }
.gid-id{ flex:1; min-width:0; }
#gid_name{ font-size:20px; font-weight:bold; letter-spacing:1px; color:#FBEFD0; text-shadow:1px 1px 2px rgba(20,10,0,.9); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#gid_tags{ display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
#gid_tags span{ display:inline-flex; align-items:center; font-size:11px; padding:1px 8px; border-radius:3px; color:#e8d6b0; background:rgba(20,10,0,.3); border:1px solid rgba(232,199,122,.35); }
#gid_tags .cp-ic{ margin-right:4px; vertical-align:0; }
.gid-rank{ flex:none; align-self:flex-start; text-align:right; font-size:14px; font-weight:900; color:#f6dc8f; text-shadow:1px 1px 2px rgba(20,10,0,.8); }
.gid-rank small{ display:block; font-size:10px; font-weight:normal; color:#c9b48a; }
.gid-bd{ padding:12px 14px 14px; }
.gid-growth #gid_growth_lb{ display:flex; justify-content:space-between; font-size:12px; color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.9); }
.gid-growth #gid_growth_lb b{ color:#8a5a00; font-size:14px; }
.gid-gbar{ height:7px; margin-top:4px; border-radius:4px; background:rgba(90,60,25,.22); border:1px solid #a8833f; box-shadow:inset 0 1px 1px rgba(60,35,10,.25); overflow:hidden; }
.gid-gbar i{ display:block; height:100%; width:0; background:linear-gradient(90deg,#f3dd9a,#c99a2e); transition:width .3s; }
.gid-intro{ margin-top:10px; padding:8px 10px; border-radius:4px; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-left:3px solid #b8892e; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); font-size:12px; color:#3b2412; line-height:1.6; word-break:break-all; }
.gid-none{ color:#9a8463; }
.gid-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:10px; }
.gid-cities{ display:flex; flex-wrap:wrap; gap:4px; }
.gid-cities span{ display:inline-flex; align-items:center; font-size:12px; padding:2px 8px; border-radius:3px; background:rgba(255,249,232,.92); border:1px solid #c9a86a; color:#3b2412; box-shadow:0 1px 2px rgba(60,35,10,.12); }
.gid-cities .cp-ic{ margin-right:4px; vertical-align:0; }
.gid-members{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.gid-mem{ text-align:center; padding:6px 4px; border-radius:4px; background:rgba(255,249,232,.92); border:1px solid #c9a86a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.12); cursor:pointer; transition:border-color .15s, box-shadow .15s; }
.gid-mem:hover{ border-color:#b8892e; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 2px 6px rgba(60,35,10,.25); }
.gid-mem.is-leader{ border-color:#b8892e; background:#fbf0d2; box-shadow:0 0 0 1px rgba(201,162,74,.55), 0 1px 2px rgba(60,35,10,.12); }
.gid-mem img{ width:40px; height:40px; border-radius:50%; background:#2a1709; border:2px solid #c9a24a; box-sizing:border-box; }
.gid-mem-name{ display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#3b2412; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gid-mem-name .cp-ic{ flex:none; margin-right:3px; vertical-align:0; }
.gid-mem-on{ font-size:10px; color:#9a8463; }
.gid-mem-on.gid-on-on{ color:#4d6a1e; font-weight:700; }
.gid-mem-on.gid-on-recent{ color:#7a5c3a; }
.gid-msg{ padding:40px 16px; text-align:center; color:#5A3412; }
.rk-pod-base{ margin:4px -8px 0; border-top:2px solid #9d9b85; border-radius:0 0 2px 2px; color:#F6E7C1; font-size:20px; font-weight:700; text-shadow:1px 1px 2px rgba(20,10,0,.85); background:linear-gradient(180deg,#6a4320,#3b2412); height:38px; line-height:38px; }
.rk-pod-1 .rk-pod-base{ height:56px; line-height:56px; border-color:#c9a24a; color:#f6dc8f; }
.rk-pod-3 .rk-pod-base{ height:28px; line-height:28px; border-color:#a87345; }
.rk-pod.is-me{ border-color:#8a6a3a; background:#f6e7c1; }
.rk-list{ display:flex; flex-direction:column; gap:6px; }
.rk-row{ display:grid; grid-template-columns:26px 36px minmax(80px,1fr) auto minmax(90px,max-content); align-items:center; gap:8px; padding:7px 10px; border-radius:3px; background:rgba(255,249,232,.92); border:1px solid #c9a86a; cursor:pointer; }
.rk-row:hover{ border-color:#8a6a3a; background:#fff9e8; }
.rk-row.is-me{ border-color:#8a6a3a; background:#f6e7c1; }
.rk-no{ text-align:center; font-weight:700; color:#5A3412; font-size:14px; }
.rk-avatar{ width:32px; height:32px; border-radius:50%; background:#3b2412; border:2px solid #c9a86a; }
.rk-row-main{ flex:1; min-width:0; }
.rk-row-name{ font-weight:700; color:#3b2412; overflow-wrap:anywhere; }
.rk-bar{ height:4px; margin-top:4px; border-radius:2px; background:rgba(90,60,25,.15); overflow:hidden; max-width:260px; }
.rk-bar i{ display:block; height:100%; border-radius:2px; background:#b8892e; }
.rk-row.is-me .rk-bar i{ background:#4d6a1e; }
.rk-subs{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; max-width:260px; }
.rk-subs span{ font-size:11px; color:#3b2412; background:rgba(90,60,25,.07); border:1px solid rgba(138,106,58,.25); border-radius:3px; padding:0 6px; line-height:18px; overflow-wrap:anywhere; }
.rk-subs em{ font-style:normal; color:#7a5c3a; margin-right:4px; }
.rk-val{ grid-column:5; text-align:right; font-size:14px; color:#755016; font-variant-numeric:tabular-nums; }
.rk-you{ font-style:normal; margin-left:5px; padding:0 5px; border:1px solid #879b50; border-radius:3px; font-size:10px; font-weight:700; color:#40591a; background:#e2e6bf; vertical-align:1px; }
.rk-me{ flex:none; display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; padding:8px 14px; background:linear-gradient(180deg,#4a2d15,#2a1709); border-top:2px solid #b8892e; font-size:12px; }
.rk-me-lb{ color:#e8d6b0; font-weight:700; }
.rk-me-no{ font-size:15px; color:#F6E7C1; }
.rk-me-name{ flex:1; min-width:60px; color:#F6E7C1; overflow-wrap:anywhere; }
.rk-me-val{ color:#f6dc8f; font-size:14px; font-variant-numeric:tabular-nums; }
.rk-me-tip{ color:#e8d6b0; }
#ranklist_Dialog ::selection{ background:#c9a86a; color:#2a1709; }
@media (max-width:600px){
  .rk-head{ padding:8px; }
  .rk-tabs{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
  .rk-tab{ justify-content:center; padding:4px 6px; }
  .rk-body{ padding:10px 8px; }
  .rk-podium{ gap:6px; }
  .rk-pod{ padding:6px 5px 0; }
  .rk-pod-avatar img{ width:40px; height:40px; }
  .rk-pod-1 .rk-pod-avatar img{ width:50px; height:50px; }
  .rk-pod-name{ font-size:12px; }
  .rk-pod-val{ font-size:12px; }
  .rk-pod-base{ margin-left:-5px; margin-right:-5px; }
  .rk-row{ grid-template-columns:20px 36px minmax(0,1fr) auto; gap:6px; padding:7px; }
  .rk-subs{ grid-column:3 / -1; grid-row:2; justify-content:flex-start; max-width:none; }
  .rk-val{ grid-column:4; grid-row:1; font-size:12px; }
  .rk-me{ padding:8px; }
}

/* ── 私掠艦隊攔截（docs/privateer_spec.md）────────────────────── */
#privateer_dialog { background: #f4f7fb; padding: 12px; box-sizing: border-box; }
.pv-loading { text-align: center; padding: 36px 0; color: #9aabbf; font-size: 13px; line-height: 1.8; }
.pv-hero {
  display: flex; align-items: center; gap: 10px;
  border-radius: 8px; padding: 11px 14px; color: #f3dede;
  background:
    radial-gradient(ellipse at 90% -40%, rgba(230,120,120,.35) 0%, rgba(230,120,120,0) 60%),
    linear-gradient(135deg, #2a0f14 0%, #4a1620 55%, #6a1f2a 100%);
  border-bottom: 3px solid #c9a44c;
  box-shadow: 0 2px 6px rgba(42,15,20,.3);
}
.pv-hero-icon { font-size: 28px; line-height: 1; }
.pv-hero-title { font-size: 16px; font-weight: bold; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pv-hero-sub { font-size: 11px; color: #e3bcbc; margin-top: 3px; line-height: 1.5; }
.pv-body { background: #fff; border: 1px solid #dfe7f1; border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.pv-row { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: #6a7f99; line-height: 2; }
.pv-row span { min-width: 72px; }
.pv-row b { color: #16365C; font-size: 13px; }
.pv-row em { font-style: normal; font-size: 11px; color: #9aabbf; }
.pv-row-toll b { font-size: 18px; color: #1f63ad; font-variant-numeric: tabular-nums; }
.pv-row-risk b { color: #a8342d; }
.pv-note { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #d6e1ee; font-size: 11px; color: #8a6a1c; }
.pv-actions { display: flex; gap: 8px; }
.pv-actions-col { flex-direction: column; }
.pv-btn {
  flex: 1; display: block; box-sizing: border-box; text-align: center;
  padding: 9px 0; border-radius: 7px; font-size: 14px; font-weight: bold;
  color: #fff; text-decoration: none; cursor: pointer;
}
.pv-btn:hover { filter: brightness(1.08); }
.pv-btn-pay { background: linear-gradient(180deg, #3a8be0, #1f63ad); border: 1px solid #1a5596; }
.pv-btn-fight { background: linear-gradient(180deg, #c8463c, #962a22); border: 1px solid #84231c; }
.pv-btn.pv-busy { background: #e3e8ee !important; border-color: #d0d8e2 !important; color: #9aabbf; cursor: not-allowed; filter: none; }
/* 右側攔截面板 */
.pv-panel { padding: 10px; }
.pv-panel-msg { text-align: center; padding: 30px 0; color: #6a7f99; font-size: 13px; }
.pv-panel-hero {
  text-align: center; border-radius: 8px; padding: 14px 10px 12px; color: #f3dede;
  background: linear-gradient(135deg, #2a0f14 0%, #4a1620 55%, #6a1f2a 100%);
  border-bottom: 3px solid #c9a44c;
}
.pv-panel-icon { font-size: 30px; line-height: 1.2; }
.pv-panel-title { font-size: 16px; font-weight: bold; color: #fff; margin-top: 2px; }
.pv-panel-sub { font-size: 11px; color: #e3bcbc; margin-top: 3px; }
.pv-panel-body { background: #fff; border: 1px solid #dfe7f1; border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.pv-panel-note { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #d6e1ee; font-size: 11px; color: #6a7f99; line-height: 1.6; }
/* 攔截戰結算 */
.pv-result { margin: 10px 0 0; padding: 10px 14px; border-radius: 6px; border-left: 4px solid #2e7a49; background: #eef7f1; }
.pv-result-bad  { border-left-color: #a8342d; background: #fbeeee; }
.pv-result-draw { border-left-color: #c99a2e; background: #fbf6ea; }
.pv-result-title { font-size: 14px; font-weight: bold; color: #16365C; margin-bottom: 4px; }
.pv-result-line { font-size: 12px; color: #4a6380; line-height: 1.8; }
.pv-result-depart { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(22,54,92,.18); font-size: 13px; font-weight: bold; color: #1f63ad; }
.pv-result-depart-fail { color: #a8342d; }

/* 交易品圖示：png 為透明底，補回原 gif 的深棕漸層底與灰框 */
img[src*="styles/trade/"] {
  background: linear-gradient(#4A2B2A 0%, #331C1B 30%, #1B0C0B 52%, #0B0504 68%, #050303 100%);
  border: 1px solid #B3B3B3;
  box-sizing: border-box;
}

/* ── 討伐海盜怨靈（docs/guild_ghost_spec.md）── */
.Battle_menu.has-ghost a{ margin-top:10px; }
.ghost-fleet .ship_img, .ghost-fleet img{ filter:grayscale(1) brightness(.8); opacity:.85; }
.gh-wrap .ss-fleet-foe{ background:linear-gradient(#e9ebee,#d3d7dd); }
.gh-avatar{ display:flex; align-items:center; justify-content:center; font-size:22px; background:#d9dde3 !important; box-shadow:0 0 0 2px #b9bfc8 !important; filter:none !important; }
.gh-hp{ margin:6px 0; font-size:11px; color:#4c5a6b; }
.gh-hp-foe{ padding:0 8px; }
.gh-hp-bar{ height:10px; border-radius:5px; background:#e1e5ea; overflow:hidden; margin-bottom:2px; }
.gh-hp-bar i{ display:block; height:100%; background:linear-gradient(90deg,#5b6472,#2e3440); transition:width .6s ease; }
.gh-card{ border-left:4px solid #5b6472; }
.gh-after{ display:flex; justify-content:center; gap:8px; margin:10px 0 4px; }
.gh-again{ background:#2e3440 !important; }
/* 商會任務分頁：怨靈區塊 */
.gg{ margin-top:14px; padding-top:10px; border-top:1px dashed #c9a86a; }
.gg-head{ display:flex; align-items:center; gap:6px; margin-bottom:8px; }
.gg-icon{ font-size:18px; line-height:0; }
.gg-title{ font-size:13px; font-weight:900; color:#3b2412; }
.gg-loading{ padding:10px; font-size:12px; color:#9a8463; }
.gg-card{ margin-bottom:10px; padding:8px 10px; border-radius:8px; background:linear-gradient(#fbf3df,#efe2c2); border:1px solid #c9a86a; }
.gg-card.is-slain{ background:linear-gradient(#eef2df,#e1e8c8); border-color:#b8c98a; }
.gg-name{ font-size:14px; font-weight:900; color:#3b2412; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.gg-where{ font-size:11px; font-weight:normal; color:#7a5c3a; }
.gg-where .cp-ic{ margin-right:2px; vertical-align:-3px; }
.gg-badge{ font-size:11px; padding:1px 8px; border-radius:9px; background:#4d6a1e; color:#F6E7C1; }
.gg-sub{ font-size:11px; color:#5A3412; margin-top:4px; }
.gg-ships{ display:flex; flex-wrap:wrap; gap:3px; margin:6px 0; }
.gg-ship{ position:relative; width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; background:#fbf3df; border:1px solid #c9a86a; border-radius:4px; }
.gg-ship img{ max-width:28px; max-height:28px; }
.gg-ship.is-sunk img{ opacity:.25; }
.gg-ship i{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-style:normal; font-weight:900; color:#8f1f12; }
.gg-tries{ font-size:12px; color:#3b2412; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.gg-here{ font-size:11px; padding:1px 8px; border-radius:9px; background:#fff3d6; color:#9a6400; }
.gg-rank{ width:100%; border-collapse:collapse; font-size:12px; background:rgba(255,249,232,.9); margin-bottom:8px; }
.gg-rank th{ text-align:left; font-weight:normal; color:#7a5c3a; border-bottom:1px solid #d8c39b; padding:3px 6px; }
.gg-rank td{ padding:4px 6px; border-bottom:1px solid #e6d6b0; color:#3b2412; font-variant-numeric:tabular-nums; }
.gg-rank tr.is-me td{ background:#fffaf0; font-weight:bold; }
.gg-rank tr.is-left td{ color:#b8a888; }

/* ── 提示框 $.messager alert／confirm／prompt／show 浮動通知（大航海風格：深木框、羊皮紙海圖內文、木製按鈕列；主按鈕黃銅、次按鈕羊皮紙）── */
body:has(#MainLayout) .window:has(> .messager-body){ background:linear-gradient(180deg,#4a2d15,#2a1709); border:1px solid #8a6a3a; border-radius:6px; box-shadow:0 6px 18px rgba(30,15,0,.5); overflow:hidden; }
body:has(#MainLayout) .window:has(> .messager-body) + .window-shadow{ border-radius:6px; box-shadow:none; background:transparent; }
body:has(#MainLayout) .window:has(> .messager-body) > .window-header{ background:transparent; border-color:#8a6a3a; }
body:has(#MainLayout) .window:has(> .messager-body) > .window-header .panel-title{ color:#F6E7C1; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
body:has(#MainLayout) .window:has(> .messager-body) > .window-header .panel-tool a{ filter:invert(1) sepia(1) saturate(.6) brightness(1.4); opacity:.85; }
body:has(#MainLayout) .window:has(> .messager-body) > .window-header .panel-tool a:hover{ opacity:1; }
body:has(#MainLayout) .window:has(> .messager-body) > .messager-body{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size:cover; border-color:#8a6a3a; color:#3b2412; font-size:13px; line-height:1.6; text-shadow:0 0 3px rgba(255,248,225,.8); }
body:has(#MainLayout) .window:has(> .messager-body) .messager-icon{ filter:sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.82); }
body:has(#MainLayout) .window:has(> .messager-body) .messager-icon.messager-error{ filter:sepia(1) saturate(3) hue-rotate(-40deg) brightness(.72); }
body:has(#MainLayout) .window:has(> .messager-body) .messager-input{ border:1px solid #8a6a3a; border-radius:3px; background:#fbf3df; color:#3b2412; }
body:has(#MainLayout) .window:has(> .messager-body) > .messager-button{ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#8a6a3a; border-top:2px solid #b8892e; }
body:has(#MainLayout) .window:has(> .messager-body) > .messager-button a.l-btn{ color:#3a2410; font-weight:bold; letter-spacing:2px; text-shadow:0 1px 0 rgba(255,245,215,.6); background:linear-gradient(180deg,#f3dd9a,#c99a2e 60%,#a87a1f); border:1px solid #7a5518; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(255,245,215,.35), 0 1px 3px rgba(0,0,0,.35); filter:none; }
body:has(#MainLayout) .window:has(> .messager-body) > .messager-button a.l-btn:hover{ filter:brightness(1.08); border-color:#5a3a10; }
body:has(#MainLayout) .window:has(> .messager-body) > .messager-button a.l-btn .l-btn-text{ color:inherit; }
body:has(#MainLayout) .window:has(> .messager-body) > .messager-button a.l-btn + a.l-btn{ color:#5A3412; text-shadow:none; background:linear-gradient(180deg,#fbf3df,#e6d6b0); border-color:#c9a86a; }

/* ── 艦長面板：名稱下方兩個圖示鈕（艦長室、個人資訊） ── */
.cp-name{ cursor:default; }
.cp-name:hover{ background:transparent; }
.cp-name-btns{ display:flex; gap:5px; margin-top:4px; }
a.cp-icbtn{ display:inline-flex; align-items:center; justify-content:center; width:26px; height:24px; box-sizing:border-box; border-radius:4px; text-decoration:none !important;
  background:linear-gradient(180deg,#6a4320,#3b2412); border:1px solid #c9a24a; box-shadow:inset 0 0 0 1px rgba(232,199,122,.25), 0 1px 2px rgba(0,0,0,.45); transition:filter .12s, border-color .12s; }
a.cp-icbtn:hover{ filter:brightness(1.18); border-color:#f3dd9a; }
a.cp-icbtn:focus-visible{ outline:2px solid #f3dd9a; outline-offset:1px; }
a.cp-icbtn .cp-ic{ margin:0; vertical-align:0; width:18px; height:18px; background-size:18px 18px; }
.cp-ic-cabin  { background-image:url('images/uw_ic_cabin.png'); }
.cp-ic-profile{ background-image:url('images/uw_ic_profile.png'); }

/* ── 艦長室 dialog（同酒館：分頁 300×253、CAPTAIN.png 以 luminosity 混成牛皮紙色調） ── */
.window:has(> #captain_room_Dialog){ background:linear-gradient(180deg,#4a2d15,#2a1709); border-color:#8a6a3a; box-shadow:0 6px 18px rgba(30,15,0,.5); }
.window:has(> #captain_room_Dialog) > .window-header{ background:transparent; border-color:#8a6a3a; }
.window:has(> #captain_room_Dialog) > .window-header .panel-title{ color:#F6E7C1; font-weight:bold; letter-spacing:2px; text-shadow:1px 1px 2px rgba(20,10,0,.9); }
.window:has(> #captain_room_Dialog) > .window-header .panel-tool a{ filter:invert(1) sepia(1) saturate(.6) brightness(1.4); opacity:.85; }
.window:has(> #captain_room_Dialog) > .window-header .panel-tool a:hover{ opacity:1; }
#captain_room_Dialog{ overflow:hidden; background:#2a1709; }
.CAPTAIN_TAB_BG_O::before{ background-image:url('images/CAPTAIN.png'); }
.bar-ic-avatar{ background-image:url('images/uw_ic_officer.png') !important; }
.bar-ic-intro { background-image:url('images/uw_ic_news.png') !important; }
.cr-pane{ gap:5px; }
.cr-grid{ flex:1; min-height:0; overflow-y:auto; display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); grid-auto-rows:40px; gap:4px; align-content:start; padding:3px; border-radius:4px;
  background:rgba(255,249,232,.55); border:1px solid rgba(168,131,63,.55); scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }
.cr-loading{ grid-column:1 / -1; padding:20px 0; text-align:center; font-size:12px; color:#5A3412; }
a.cr-av{ position:relative; display:block; box-sizing:border-box; min-width:0; width:100%; height:40px; border-radius:3px; overflow:hidden; isolation:isolate; background:#2a1709; border:2px solid #a8833f; box-shadow:0 1px 2px rgba(60,35,10,.3); transition:border-color .12s, transform .12s; }
a.cr-av img{ display:block; width:100%; height:100%; object-fit:cover; }
a.cr-av:hover{ border-color:#e0b85a; transform:translateY(-1px); }
a.cr-av:focus-visible{ outline:2px solid #8a5a00; outline-offset:1px; }
a.cr-av.is-current{ border-color:#5d7a2e; box-shadow:0 0 0 1px #5d7a2e; }
a.cr-av.is-current::after{ content:'目前'; position:absolute; left:0; right:0; bottom:0; font-size:9px; line-height:12px; text-align:center; color:#F6E7C1; background:rgba(77,106,30,.85); }
a.cr-av.is-picked{ border-color:#f3dd9a; box-shadow:0 0 0 2px #b8892e, 0 0 6px rgba(243,221,154,.8); }
.cr-pick{ display:flex; align-items:center; gap:7px; padding:3px 6px; }
.cr-pick img{ flex:none; width:30px; height:30px; border-radius:3px; border:1px solid #a8833f; background:#2a1709; object-fit:cover; }
.cr-pick strong{ font-size:14px; }
textarea.cr-intro{ flex:1; min-height:0; resize:none; box-sizing:border-box; width:100%; padding:6px 8px; font:13px/1.6 "Microsoft JhengHei", sans-serif; color:#3b2412;
  background:rgba(255,249,232,.92); border:1px solid #a8833f; border-radius:4px; box-shadow:inset 0 1px 3px rgba(60,35,10,.2); }
textarea.cr-intro:focus{ outline:none; border-color:#8a5a00; box-shadow:inset 0 1px 3px rgba(60,35,10,.2), 0 0 0 2px rgba(201,162,74,.45); }
textarea.cr-intro::placeholder{ color:#9a8463; }
.cr-count{ flex:1; font-size:11px; color:#5A3412; text-shadow:0 0 3px rgba(255,248,225,.9); }
.cr-count.is-full{ color:#8f1f12; font-weight:bold; }
/* CAPTAIN.png 圖樣較密：遮罩加深讓文字清楚；黃銅內框同造船廠選單 */
.CAPTAIN_TAB_BG_O > .bar-pane{ background:radial-gradient(ellipse at center, rgba(90,58,28,0) 45%, rgba(90,58,28,.28) 100%), rgba(240,228,196,.68); box-shadow:inset 0 0 0 1px #5a3a1c, inset 0 0 0 2px #c9a24a, inset 0 0 0 3px rgba(90,58,28,.6); }
.cr-pick > span > span{ display:block; font-size:10px; color:#7a5c3a; }
.CAPTAIN_TAB_BG_O .bar-hd{ padding:2px 6px 3px; border-radius:3px; background:rgba(255,249,232,.85); border:1px solid rgba(168,131,63,.45); }

/* ── 艦長資料 2.0：船長航海檔案 ───────────────────────────── */
#player_profile_dialog{
  max-height:calc(100vh - 48px);
  overflow-y:auto;
  color:#2d1b0c;
  background:#e8d5a7 url('images/uw_bg_chart.jpg') center top / cover no-repeat;
  scrollbar-width:thin;
  scrollbar-color:#8a6a3a rgba(70,40,16,.12);
}
#player_profile_dialog::-webkit-scrollbar{ width:7px; }
#player_profile_dialog::-webkit-scrollbar-track{ background:rgba(70,40,16,.12); }
#player_profile_dialog::-webkit-scrollbar-thumb{ background:#8a6a3a; border:1px solid #ead7a7; border-radius:4px; }
#player_profile_dialog ::selection{ color:#fff8df; background:#6b3f1d; }
#player_profile_dialog.ppd_loading #ppd_bd,
#player_profile_dialog.ppd_loading #ppd_medal_sum{ opacity:.42; transition:opacity .16s ease-out; }

.window:has(> #player_profile_dialog){
  overflow:hidden;
  border:1px solid #7a5729;
  border-radius:7px;
  background:#2b1708;
  box-shadow:0 12px 34px rgba(24,12,3,.48);
}
.window:has(> #player_profile_dialog) > .window-header{
  padding:7px 10px;
  border:0;
  border-bottom:1px solid #8d6931;
  background:#2f1909;
}
.window:has(> #player_profile_dialog) > .window-header .panel-title{
  color:#f4e2b5;
  font-weight:700;
  letter-spacing:.12em;
  text-shadow:0 1px 2px #130902;
}
.window:has(> #player_profile_dialog) > .window-header .panel-tool a{
  opacity:.78;
  filter:invert(1) sepia(1) saturate(.55) brightness(1.42);
}
.window:has(> #player_profile_dialog) > .window-header .panel-tool a:hover{ opacity:1; }

#ppd_hd{
  position:relative;
  display:flex;
  align-items:center;
  min-height:108px;
  box-sizing:border-box;
  gap:16px;
  padding:14px 18px;
  overflow:hidden;
  color:#f4e2b5;
  background:#3b210e url('images/uw_plate_captain.png') center / 100% 100% no-repeat;
  border-bottom:0;
  box-shadow:inset 0 -1px 0 rgba(255,236,185,.2);
}
#ppd_hd::after{
  content:'';
  position:absolute;
  top:-34px;
  right:90px;
  width:150px;
  height:150px;
  opacity:.075;
  pointer-events:none;
  background:url('images/uw_ic_cabin.png') center / contain no-repeat;
  transform:rotate(-9deg);
}
#ppd_avatar_wrap,
body:has(#MainLayout) #ppd_avatar_wrap{
  position:relative;
  z-index:1;
  flex:none;
  box-sizing:border-box;
  width:82px;
  height:82px;
  padding:4px;
  border:1px solid #f3d889;
  border-radius:8px;
  background:linear-gradient(145deg,#f4dc94 0%,#a26f1e 58%,#4b2a0c 100%);
  box-shadow:0 3px 10px rgba(12,6,2,.55);
}
#ppd_avatar_wrap::after{
  content:'';
  position:absolute;
  inset:2px;
  border:1px solid rgba(255,243,201,.45);
  border-radius:5px;
  pointer-events:none;
}
#ppd_avatar,
body:has(#MainLayout) #ppd_avatar{
  display:block;
  width:72px;
  height:72px;
  border-radius:4px;
  background:#1e1007;
  image-rendering:auto;
}
#ppd_id{ position:relative; z-index:1; flex:1; min-width:0; align-self:center; }
#ppd_name,
body:has(#MainLayout) #ppd_name{
  overflow:hidden;
  color:#fff4d4;
  font-size:23px;
  font-weight:800;
  line-height:1.2;
  letter-spacing:.025em;
  text-overflow:ellipsis;
  text-shadow:0 2px 3px rgba(15,7,2,.9);
  white-space:nowrap;
}
.ppd_title,
body:has(#MainLayout) .ppd_title{
  display:inline-block;
  margin-top:6px;
  padding:3px 9px;
  border:1px solid rgba(241,207,126,.48);
  border-radius:3px;
  color:#ead7aa;
  background:rgba(20,9,2,.34);
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
}
.ppd_title_legend,
body:has(#MainLayout) .ppd_title_legend{ color:#2e1909; border-color:#f2d272; background:#e4b94d; }
.ppd_title_champion,
body:has(#MainLayout) .ppd_title_champion{ color:#fff1bd; border-color:#d2a33e; background:rgba(143,91,18,.68); }
.ppd_title_pirate,
body:has(#MainLayout) .ppd_title_pirate{ color:#ffe6dd; border-color:#c86d54; background:rgba(105,25,13,.76); }
.ppd_title_merchant,
body:has(#MainLayout) .ppd_title_merchant{ color:#eff4d3; border-color:#9aad5e; background:rgba(55,78,22,.78); }
.ppd_title_explorer,
body:has(#MainLayout) .ppd_title_explorer{ color:#e6f5f4; border-color:#6ba2aa; background:rgba(24,78,84,.78); }
.ppd_title_sailor,
body:has(#MainLayout) .ppd_title_sailor{ color:#e3eef7; border-color:#6b91ad; background:rgba(25,62,87,.78); }
.ppd_title_rising,
body:has(#MainLayout) .ppd_title_rising{ color:#fff0c5; border-color:#b98b43; background:rgba(73,42,15,.72); }
.ppd_specialty{
  margin-top:7px;
  color:#cdbd99;
  font-size:11px;
  line-height:1.25;
}
.ppd_specialty_n{ color:#9ac1db; }
.ppd_specialty_t{ color:#b8cc83; }
.ppd_specialty_a{ color:#e6bd73; }
.ppd_specialty_b{ color:#e6a396; }
#ppd_medal_sum{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(3, 23px);
  justify-content:center;
  gap:4px;
  flex:none;
  align-self:center;
  min-width:82px;
  padding:7px 8px 8px;
  border:1px solid rgba(218,177,83,.5);
  border-radius:5px;
  background:rgba(23,10,2,.46);
  box-shadow:inset 0 0 0 1px rgba(255,236,188,.08);
}
.ppd_medal_sum_label{
  display:flex;
  grid-column:1 / -1;
  align-items:baseline;
  justify-content:center;
  gap:4px;
  color:#f2d98c;
  white-space:nowrap;
}
.ppd_medal_sum_label b{ font-size:21px; line-height:1; font-variant-numeric:tabular-nums; }
.ppd_medal_sum_label small{ color:#c7b58e; font-size:10px; font-weight:400; }

#ppd_bd{ padding:13px 15px 16px; }
#player_profile_dialog:not(.ppd_loading) #ppd_bd{ animation:ppd-sheet-open .28s cubic-bezier(.2,.8,.2,1); }
@keyframes ppd-sheet-open{ from{ opacity:.72; transform:translateY(5px); } to{ opacity:1; transform:translateY(0); } }
.ppd_sec{ margin-top:15px; }
#ppd_intro_sec{ margin:0 0 15px; }
.ppd_sec_hd,
body:has(#MainLayout) .ppd_sec_hd{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:7px;
  padding:0 0 5px;
  color:#543313;
  border-bottom:1px solid rgba(130,87,32,.48);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-shadow:0 1px 0 rgba(255,247,220,.65);
}
.ppd_sec_hd::before,
body:has(#MainLayout) .ppd_sec_hd::before{
  content:'';
  flex:none;
  width:14px;
  height:14px;
  transform:none;
  background:url('images/uw_ic_anchor.png') center / contain no-repeat;
}
.ppd_sec_sub,
body:has(#MainLayout) .ppd_sec_sub{
  margin-left:auto;
  color:#675033;
  font-size:10px;
  font-weight:400;
  letter-spacing:0;
}
#ppd_intro,
body:has(#MainLayout) #ppd_intro{
  position:relative;
  box-sizing:border-box;
  min-height:38px;
  padding:9px 12px 9px 30px;
  border:0;
  border-radius:2px;
  color:#3c2915;
  background:rgba(255,249,229,.68);
  box-shadow:inset 0 1px 5px rgba(91,54,18,.12);
  font-size:12px;
  line-height:1.65;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
#ppd_intro::before{
  content:'“';
  position:absolute;
  top:0;
  left:9px;
  color:#a77a34;
  font-family:Georgia, serif;
  font-size:28px;
  line-height:1.25;
}

#ppd_lvs{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
  margin:0;
}
.ppd_lv_card,
body:has(#MainLayout) .ppd_lv_card{
  position:relative;
  height:88px;
  padding:0;
  overflow:hidden;
  border:1px solid #9f7435;
  border-radius:5px;
  background:#d8c08d;
  box-shadow:0 2px 4px rgba(65,39,13,.2);
  text-align:left;
}
.ppd_lv_art{
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  filter:saturate(.82) contrast(1.02);
  transition:transform .24s cubic-bezier(.2,.8,.2,1), filter .24s;
}
.ppd_lv_card:hover .ppd_lv_art{ transform:scale(1.035); filter:saturate(1) contrast(1.04); }
.ppd_lv_n .ppd_lv_art{ background-image:url('images/uw_skill_nav.jpg'); }
.ppd_lv_t .ppd_lv_art{ background-image:url('images/uw_skill_trade.jpg'); }
.ppd_lv_a .ppd_lv_art{ background-image:url('images/uw_skill_attack.jpg'); }
.ppd_lv_b .ppd_lv_art{ background-image:url('images/uw_skill_blade.jpg'); }
.ppd_lv_meta{
  position:absolute;
  right:0;
  bottom:0;
  left:0;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  padding:13px 8px 6px;
  color:#fff3d1;
  background:linear-gradient(180deg,transparent,rgba(35,18,5,.88) 54%);
  text-shadow:0 1px 2px #140900;
}
.ppd_lv_lbl,
body:has(#MainLayout) .ppd_lv_lbl{ color:#f0dfb9; font-size:11px; font-weight:700; }
.ppd_lv_num,
.ppd_lv_n .ppd_lv_num,
.ppd_lv_t .ppd_lv_num,
.ppd_lv_a .ppd_lv_num,
.ppd_lv_b .ppd_lv_num,
body:has(#MainLayout) .ppd_lv_num,
body:has(#MainLayout) .ppd_lv_n .ppd_lv_num,
body:has(#MainLayout) .ppd_lv_t .ppd_lv_num,
body:has(#MainLayout) .ppd_lv_a .ppd_lv_num,
body:has(#MainLayout) .ppd_lv_b .ppd_lv_num{
  color:#fff5d7;
  font-size:22px;
  font-weight:800;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.ppd_lv_num::after,
body:has(#MainLayout) .ppd_lv_num::after{ content:' Lv'; color:#d6c5a1; font-size:9px; font-weight:400; }

#ppd_profile_grid{
  display:grid;
  grid-template-columns:minmax(0, 1.22fr) minmax(185px, .78fr);
  gap:12px;
  margin-top:15px;
}
#ppd_profile_grid > .ppd_sec{ margin:0; min-width:0; }
#ppd_stats,
#ppd_medals{
  overflow:hidden;
  border:1px solid rgba(145,99,39,.56);
  border-radius:4px;
  background:rgba(255,248,224,.56);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
}
#ppd_stats{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:0;
}
.ppd_stat,
body:has(#MainLayout) .ppd_stat{
  display:flex;
  align-items:center;
  min-width:0;
  gap:7px;
  padding:7px 8px;
  border:0;
  border-right:1px solid rgba(145,99,39,.28);
  border-bottom:1px solid rgba(145,99,39,.28);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.ppd_stat:nth-child(2n){ border-right:0; }
.ppd_stat:nth-last-child(-n+2){ border-bottom:0; }
.ppd_stat_ic{
  flex:none;
  width:23px;
  height:23px;
  opacity:.84;
  background:center / contain no-repeat;
}
.ppd_stat_ic_time{ background-image:url('images/uw_ic_sailtime.png'); }
.ppd_stat_ic_profit{ background-image:url('images/uw_ic_profit.png'); }
.ppd_stat_ic_bounty{ background-image:url('images/uw_ic_bounty.png'); }
.ppd_stat_ic_piracy{ background-image:url('images/uw_ic_piracy.png'); }
.ppd_stat_ic_adven{ background-image:url('images/uw_ic_map.png'); }
.ppd_stat_ic_medal{ background-image:url('images/uw_ic_crown.png'); }
.ppd_stat_copy{ min-width:0; }
.ppd_stat_lbl,
body:has(#MainLayout) .ppd_stat_lbl{ color:#826641; font-size:10px; line-height:1.15; }
.ppd_stat_val,
body:has(#MainLayout) .ppd_stat_val{
  overflow:hidden;
  color:#38230e;
  font-size:13px;
  font-weight:800;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.ppd_stat_val.ppd_stat_zero,
body:has(#MainLayout) .ppd_stat_val.ppd_stat_zero{ color:#66563e; font-weight:600; }

#ppd_medals{
  display:block;
}
.ppd_mc,
body:has(#MainLayout) .ppd_mc,
body:has(#MainLayout) .ppd_mc_gold{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:31px;
  box-sizing:border-box;
  padding:4px 7px;
  border:0;
  border-bottom:1px solid rgba(145,99,39,.28);
  border-radius:0;
  background:transparent;
  box-shadow:none;
  text-align:left;
}
.ppd_mc:last-child{ border-bottom:0; }
.ppd_mc_gold,
body:has(#MainLayout) .ppd_mc_gold{ background:rgba(231,194,93,.13); }
.ppd_mc_hd,
body:has(#MainLayout) .ppd_mc_hd{
  min-width:42px;
  margin:0;
  color:#4f3216;
  font-size:10px;
  font-weight:700;
}
.ppd_mc_none .ppd_mc_hd,
body:has(#MainLayout) .ppd_mc_none .ppd_mc_hd{ color:#66563e; }
.ppd_mc_coins{ display:flex; justify-content:flex-end; gap:3px; }
.ppd_coin{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  width:23px;
  min-width:23px;
  height:23px;
  padding:0;
  border:1px solid rgba(72,42,10,.32);
  border-radius:50%;
  color:#fff;
  font-size:10px;
  font-weight:800;
  line-height:1;
  text-shadow:0 1px 1px rgba(0,0,0,.52);
  box-shadow:inset 0 -2px 2px rgba(52,27,3,.24), 0 1px 2px rgba(65,38,10,.22);
  font-variant-numeric:tabular-nums;
}
.ppd_mc_coins .ppd_coin{ width:21px; min-width:21px; height:21px; font-size:9px; }
.ppd_coin_g{ background:radial-gradient(circle at 34% 27%,#fff1a2,#d7a521 52%,#84580a); }
.ppd_coin_s{ background:radial-gradient(circle at 34% 27%,#fff,#abb6be 52%,#68747e); }
.ppd_coin_b{ background:radial-gradient(circle at 34% 27%,#f4c098,#a85e2e 52%,#653218); }
.ppd_coin_zero{
  opacity:1;
  color:#59452c;
  border-color:#9d8561;
  background:#d8c8a4;
  filter:grayscale(1);
  text-shadow:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
}

#ppd_collection_grid{
  display:grid;
  grid-template-columns:218px minmax(0,1fr);
  gap:12px;
  margin-top:15px;
}
#ppd_collection_grid > .ppd_sec{ min-width:0; margin:0; }
#ppd_ship_area{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  min-height:218px;
  box-sizing:border-box;
  padding:8px;
  overflow:hidden;
  border:1px solid rgba(145,99,39,.56);
  border-radius:5px;
  background:rgba(255,248,224,.56);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
}
#ppd_ship_area .ship_table,
body:has(#MainLayout) #ppd_ship_area .ship_table{
  position:relative;
  z-index:1;
  width:200px;
  max-width:200px;
  border:1px solid #d0a34a;
  border-radius:4px;
  overflow:hidden;
  background:#07619b url('ship/sea.gif');
  box-shadow:0 0 0 2px #3f250e, 0 3px 8px rgba(40,22,8,.32);
}
#ppd_ship_area .ship_table td{ width:40px; max-width:40px; height:40px; max-height:40px; }
#ppd_ship_area .ship_img{ width:40px; max-width:40px; }
.ppd_ship_cell{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  transform:scaleX(-1);
}
.ppd_ship_cell[data-sname]{ cursor:pointer; }
.ppd_ship_cell[data-sname]:focus-visible{
  z-index:2;
  outline:2px solid #ffe09a;
  outline-offset:-2px;
}
.ppd_ship_guild{ border-radius:50%; background:radial-gradient(circle,rgba(255,215,90,.55),rgba(255,200,60,.25) 45%,transparent 70%); }
.ppd_empty,
body:has(#MainLayout) .ppd_empty{
  position:relative;
  z-index:1;
  width:100%;
  box-sizing:border-box;
  min-width:0;
  padding:24px 12px;
  border:1px dashed rgba(126,86,36,.52);
  border-radius:4px;
  color:#6d5434;
  background:rgba(255,251,237,.4);
  box-shadow:none;
  text-align:center;
  text-shadow:none;
}
#ppd_treasure_area{
  display:flex;
  align-content:flex-start;
  align-items:flex-start;
  gap:6px;
  flex-wrap:wrap;
  min-height:218px;
  max-height:218px;
  box-sizing:border-box;
  padding:8px;
  overflow-y:auto;
  border:1px solid rgba(145,99,39,.56);
  border-radius:5px;
  background:rgba(255,248,224,.56);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
  scrollbar-width:thin;
  scrollbar-color:#9a7742 rgba(121,77,25,.09);
}
#ppd_treasure_area::-webkit-scrollbar{ width:6px; }
#ppd_treasure_area::-webkit-scrollbar-track{ background:rgba(121,77,25,.09); }
#ppd_treasure_area::-webkit-scrollbar-thumb{ background:#9a7742; border-radius:3px; }
.ppd_treasure_chip{
  display:inline-flex;
  align-items:center;
  min-width:0;
  max-width:100%;
  height:34px;
  box-sizing:border-box;
  gap:4px;
  padding:2px 7px 2px 3px;
  border:1px solid #9f7435;
  border-radius:3px;
  color:#4a2b10;
  background:#fff8e4;
  box-shadow:0 1px 2px rgba(65,39,13,.16);
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}
.ppd_treasure_chip img{
  flex:none;
  width:28px;
  height:28px;
  object-fit:contain;
  image-rendering:auto;
}
.ppd_treasure_chip span{
  overflow:hidden;
  text-overflow:ellipsis;
}
#ppd_ship_tip,
body:has(#MainLayout) #ppd_ship_tip{
  padding:6px 10px;
  border:1px solid #c99a42;
  border-radius:4px;
  color:#fff1c7;
  background:#2c1708;
  box-shadow:0 5px 14px rgba(17,8,2,.42);
}
#ppd_ship_tip .ppd_tip_guild,
body:has(#MainLayout) #ppd_ship_tip .ppd_tip_guild{ color:#f2cd65; }
#ppd_msg,
body:has(#MainLayout) #ppd_msg{
  padding:54px 24px;
  color:#5b3614;
  background:#e8d5a7 url('images/uw_bg_chart.jpg') center / cover no-repeat;
  font-size:13px;
  text-align:center;
}

@media (max-width:560px){
  #ppd_hd{
    display:grid;
    grid-template-columns:74px minmax(0,1fr);
    min-height:0;
    gap:10px 13px;
    padding:13px 15px;
  }
  #ppd_avatar_wrap,
  body:has(#MainLayout) #ppd_avatar_wrap{ width:74px; height:74px; }
  #ppd_avatar,
  body:has(#MainLayout) #ppd_avatar{ width:64px; height:64px; }
  #ppd_name,
  body:has(#MainLayout) #ppd_name{ font-size:20px; }
  #ppd_medal_sum{
    grid-column:1 / -1;
    grid-template-columns:auto repeat(3,23px);
    justify-content:start;
    width:auto;
    padding:6px 8px;
  }
  .ppd_medal_sum_label{ grid-column:auto; margin-right:4px; }
  .ppd_medal_sum_label b{ font-size:17px; }
  #ppd_bd{ padding:11px 12px 14px; }
  #ppd_lvs{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ppd_lv_card,
  body:has(#MainLayout) .ppd_lv_card{ height:82px; }
  #ppd_profile_grid{ grid-template-columns:1fr; }
  #ppd_collection_grid{ grid-template-columns:1fr; }
  #ppd_ship_area{ min-height:210px; }
  #ppd_treasure_area{ min-height:120px; max-height:198px; }
}

@media (prefers-reduced-motion:reduce){
  #player_profile_dialog:not(.ppd_loading) #ppd_bd{ animation:none; }
  .ppd_lv_art,
  .ppd_ship_guild{ transition:none; animation:none; }
}

/* 訪客試玩提示（docs/demo_sandbox_spec.md） */
#demo_ribbon{
  position:fixed;
  top:0;
  left:50%;
  transform:translateX(-50%);
  z-index:9000;
  display:flex;
  align-items:center;
  gap:10px;
  padding:4px 14px;
  font-size:12px;
  color:#FBEFD0;
  background:rgba(66,37,15,0.92);
  border:1px solid #98763b;
  border-top:none;
  border-radius:0 0 6px 6px;
  box-shadow:0 2px 6px rgba(0,0,0,0.3);
  pointer-events:auto;
  white-space:nowrap;
}
#demo_ribbon b{ color:#f1d78f; letter-spacing:0.1em; }
#demo_exit_btn{ color:#f1d78f; text-decoration:underline; }
#demo_countdown em{ font-style:normal; font-weight:bold; color:#f1d78f; font-variant-numeric:tabular-nums; }

/* ── 私人船塢、船艦拍賣場 Dialog（沿用銀行的深木總覽與羊皮紙表單；corejs/Dockyard.js）── */
#city_dockyard_btn { border-left-color: #2a6a8c; }
#city_market_btn { border-left-color: #8c4a2a; }
#dockyard_dialog, #ship_market_dialog { background: #E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center center; background-size: cover; padding: 12px; box-sizing: border-box; color: #2e1d0c; }
#dockyard_dialog .cp-ic, #ship_market_dialog .cp-ic { margin-right: 4px; }
.dk-hero .bnk-hero-lbl { display: flex; align-items: center; gap: 4px; }
.dk-away { color: #f0a48a; }
.dk-hero-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.dk-hero-row > div { display: flex; flex-direction: column; font-size: 11px; color: #c9b48a; }
.dk-hero-row strong { font-size: 15px; color: #FBEFD0; font-variant-numeric: tabular-nums; }
.dk-hero-sub { font-size: 11px; color: #c9b48a; margin-top: 2px; }
.dk-body { max-height: 52vh; overflow-y: auto; }
.dk-seg { font-size: 12px; }
.dk-empty { text-align: center; color: #9a8463; padding: 20px 0; }
.dk-list { display: flex; flex-direction: column; gap: 6px; }
.dk-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(255,252,242,.85); border: 1px solid #d6bd8a; border-radius: 4px; }
.dk-ship-img { width: 52px; flex-shrink: 0; text-align: center; }
.dk-ship-img img { width: 50px; }
.dk-ship-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dk-ship-txt b { font-size: 13px; color: #3b2412; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-ship-txt small { font-size: 11px; color: #7a5c3a; }
.dk-tag { font-style: normal; font-size: 10px; padding: 0 4px; margin-left: 4px; border-radius: 2px; vertical-align: 1px; }
.dk-tag-guild { color: #5a3a00; background: linear-gradient(180deg, #f6dc8f, #d4a83e); border: 1px solid #a87a1f; }
.dk-act { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.dk-status { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 10px; background: rgba(42,106,140,.12); color: #1d4f7a; white-space: nowrap; }
.dk-st-listed { background: rgba(184,137,46,.18); color: #7a5518; }
.dk-st-pledged { background: rgba(143,31,18,.12); color: #8f1f12; }
.dk-st-expedition { background: rgba(93,122,46,.15); color: #3f5a1a; }
a.dk-btn { display: inline-block; padding: 3px 9px; font-size: 12px; font-weight: bold; border-radius: 3px; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: #F6E7C1; text-shadow: 1px 1px 1px rgba(20,10,0,.8); background: linear-gradient(180deg, #6a4320, #3b2412); border: 1px solid #c9a24a; }
a.dk-btn:hover { filter: brightness(1.15); }
a.dk-btn-gold { color: #3a2410; text-shadow: 0 1px 0 rgba(255,245,215,.6); background: linear-gradient(180deg, #f3dd9a, #c99a2e 60%, #a87a1f); border-color: #7a5518; }
a.dk-btn-dim { color: #5A3412; text-shadow: none; background: rgba(255,249,232,.9); border-color: #c9a86a; }
a.dk-btn.dk-off { background: rgba(255,249,232,.6); border-color: #c9a86a; color: #9a8463; text-shadow: none; cursor: not-allowed; filter: none; }
.dk-price { display: flex; flex-direction: column; align-items: flex-end; margin-right: 4px; }
.dk-price b { font-size: 13px; color: #3b2412; }
.dk-price small { font-size: 10px; color: #7a5c3a; white-space: nowrap; }
.dk-rules { margin: 0 0 10px 18px; padding: 0; font-size: 12px; color: #4a3218; line-height: 1.8; }
.dk-wh { display: flex; flex-direction: column; gap: 8px; }
.dk-wh-card { padding: 8px 10px; background: rgba(255,252,242,.85); border: 1px solid #d6bd8a; border-radius: 4px; }
.dk-wh-card .bnk-confirm-btn { margin-top: 6px; padding: 6px 0; font-size: 13px; }
.dk-wh-hd { display: flex; align-items: center; font-size: 13px; font-weight: bold; color: #3b2412; }
.dk-wh-hd strong { margin-left: auto; font-size: 14px; }
.dk-wh-sub { font-size: 11px; color: #7a5c3a; margin: 3px 0; line-height: 1.6; }
.dk-tr { display: flex; gap: 6px; align-items: center; }
.dk-tr .bnk-input { flex: 1; min-width: 0; padding: 4px 8px; font-size: 13px; }
.dk-danger { border-color: #c98a7a; background: rgba(255,240,232,.85); }
@media (max-width:560px){
  .dk-row { flex-wrap: wrap; }
  .dk-act { max-width: 100%; width: 100%; }
  .dk-hero-row strong { font-size: 13px; }
}

/* ── 海域情勢卡（港口、海上畫面；corejs/Player.js SeaState_RenderCard）── */
.ss-card { margin: 6px 8px 8px; padding: 7px 9px 6px; background: rgba(255,249,232,.85); border: 1px solid #c9a86a; border-left: 4px solid #2a6a8c; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(60,35,10,.15); color: #3b2412; }
.ss-hd { display: flex; align-items: center; font-size: 12px; font-weight: bold; margin-bottom: 4px; }
.ss-hd span { margin-left: auto; font-weight: normal; color: #7a5c3a; }
.ss-card .cp-ic { width: 14px; height: 14px; background-size: 14px 14px; margin: 0 4px 0 0; vertical-align: -2px; }
.ss-row { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 20px; cursor: help; }
.ss-name { width: 78px; flex-shrink: 0; white-space: nowrap; }
.ss-bar { flex: 1; min-width: 40px; height: 6px; border-radius: 3px; background: rgba(90,60,25,.18); box-shadow: inset 0 1px 1px rgba(60,35,10,.25); overflow: hidden; }
.ss-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #8aa86a, #5d7a2e); }
.ss-pirate .ss-bar i { background: linear-gradient(90deg, #d9906a, #8f1f12); }
.ss-patrol .ss-bar i { background: linear-gradient(90deg, #7fb0cf, #1d4f7a); }
.ss-unexplored .ss-bar i { background: linear-gradient(90deg, #e3c77a, #a87a1f); }
.ss-band { width: 30px; text-align: center; font-weight: bold; color: #5A3412; }
.ss-pirate.ss-lv3 .ss-band { color: #8f1f12; }
.ss-patrol.ss-lv3 .ss-band { color: #1d4f7a; }
.ss-val { width: 22px; text-align: right; color: #7a5c3a; font-variant-numeric: tabular-nums; }
/* 海上設施面板為絕對定位（高 218px），情勢卡需讓出面板高度 */
.Battle_out_bg ~ #sea_state_card { margin-top: 226px; }

/* ── 商會／履歷／冒險歷練 RWD（手機、平板共用）── */
#guild_Dialog,
#historylog_Dialog,
#advenlog_Dialog{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
#guild_Dialog :is(input,textarea,select),
#historylog_Dialog :is(input,textarea,select),
#advenlog_Dialog :is(input,textarea,select){ caret-color:#5A3412; }
#guild_Dialog :is(a,button,input,textarea,select):focus-visible,
#historylog_Dialog :is(a,button,input,textarea,select):focus-visible,
#advenlog_Dialog :is(a,button,input,textarea,select):focus-visible{
  outline:2px solid #c9a24a;
  outline-offset:2px;
}
#guild_Dialog :is(.gst_tile_val,.gst_mine_val,.gml_sum_val,.gml_contrib_val,.gnl_me_chip strong,.gmi_card_val,.gmi_price,.gcd-tile-val,.gtk-table,.gsd-tbl),
#historylog_Dialog .hl-meta,
#advenlog_Dialog :is(.adl-hero-stat,.adl-chip){ font-variant-numeric:tabular-nums; }
#guild_content,
#guild_content > div,
#guild_nonguild_tabs,
#guild_nonguild_tabs > .tabs-panels,
#guild_nonguild_tabs > .tabs-panels > .panel,
#guild_nonguild_tabs > .tabs-panels > .panel > .panel-body{ min-width:0; }

@media (max-width:680px){
  .window:has(> #guild_Dialog),
  .window:has(> #historylog_Dialog),
  .window:has(> #advenlog_Dialog){
    max-width:calc(100vw - 16px) !important;
    max-height:calc(100dvh - 16px) !important;
  }

  /* 已入會：側邊選單改為觸控網格，內容區獅立捲動 */
  #guild_myguild_wrap{ flex-direction:column; }
  #guild_sidebar{
    width:100%;
    min-width:0;
    flex:none;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    padding:0;
    box-shadow:inset 0 -2px 0 #b8892e;
  }
  .guild_menu_item{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:44px;
    padding:5px 3px;
    border-left:0;
    border-bottom:3px solid transparent;
    box-sizing:border-box;
    font-size:12px;
    line-height:1.25;
    text-align:center;
  }
  .guild_menu_item.active{ border-left:0; border-bottom-color:#f0c040; }
  .guild_menu_item.has-alert:after{ top:7px; right:7px; margin:0; }
  /* 選單一行 7 格，改用兩字短名（data-short） */
  #guild_sidebar{ grid-template-columns:repeat(7,minmax(0,1fr)); }
  .guild_menu_item[data-short]{ font-size:0; }
  .guild_menu_item[data-short]::before{ content:attr(data-short); font-size:13px; }
  .guild_menu_item.has-alert:after{ top:5px; right:3px; }
  #guild_content{
    flex:1;
    min-height:0;
    padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  }
  #gst_hero_top{ flex-wrap:wrap; gap:10px; padding:12px; }
  #gst_emblem{ width:54px; height:54px; }
  #guild_level_badge{ font-size:21px; }
  #guild_my_name{ font-size:18px; }
  #guild_my_btns{ flex-basis:100%; display:flex; justify-content:flex-end; }
  #guild_growth_wrap{ padding:8px 12px 10px; }
  #guild_growth_label{ flex-wrap:wrap; }
  .gst_growth_next{ margin-left:auto; text-align:right; }
  #guild_my_finance,
  #guild_members_summary,
  #gcd_summary,
  #gtk_tiles,
  #gsd_summary{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gst_tile_val,
  .gcd-tile-val{ font-size:clamp(15px,4.8vw,19px); overflow:hidden; text-overflow:ellipsis; }
  #gst_mine{ grid-template-columns:1fr; }
  .gst_mine_col + .gst_mine_col{ border-left:0; border-top:1px dashed #d8c39b; }
  #gst_tithe{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;
  }
  .gst_tithe_lbl,
  #guild_tithe_hint{ grid-column:1 / -1; }
  #guild_tithe_range{ width:100%; min-width:0; }
  #guild_bulletin_wrap{ max-height:none; }

  /* 未入會：搜尋、篩選與卡片改為可換行佈局 */
  #gnl_hero{ align-items:stretch; flex-direction:column; padding:10px; }
  #gnl_me{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .gnl_me_chip{ min-width:0; padding-right:5px; padding-left:5px; }
  #gnl_toolbar{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    padding:8px;
  }
  #gnl_search{ grid-column:1 / -1; }
  #gnl_toolbar input[type=search],
  #gnl_toolbar select{ width:100%; min-width:0; box-sizing:border-box; border-radius:4px; }
  #gnl_only_ok_lbl{ grid-column:1 / -1; min-height:32px; }
  #gnl_list{ padding:8px; }
  .gnl_card{
    display:grid;
    grid-template-columns:46px minmax(0,1fr);
    align-items:center;
    gap:8px 10px;
    padding:9px;
  }
  .gnl_act{ grid-column:1 / -1; width:auto; display:flex; align-items:center; gap:8px; text-align:left; }
  .gnl_note{ flex:1; margin-top:0; }
  .gnl_btn{ flex:none; min-width:112px; text-align:center; border-radius:4px; }
  .gnl_name_row{ align-items:flex-start; flex-wrap:wrap; }
  .gnl_name{ max-width:100%; }
  #gnc_wrap{ flex-direction:column; height:100%; overflow-y:auto; padding:8px; }
  #gnc_form{ flex:none; padding:12px; }
  #gnc_side{ width:auto; flex:none; }
  .gnc_foot{ align-items:stretch; flex-direction:column; }

  /* 成員、市場、任務、城市、船艦與管理分頁 */
  .gml_sort_bar{ overflow-x:auto; padding-bottom:3px; }
  .gml_sort{ flex:none; }
  /* 成員卡片（比照 BSFM）：頭像｜名稱／上線・貢獻・奉獻／持股條｜驅除 */
  .gml_row{
    display:grid;
    grid-template-columns:42px auto minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    align-items:center;
    gap:1px 10px;
    padding:8px 10px;
  }
  .gml_avatar{ grid-row:1 / 4; grid-column:1; align-self:center; }
  .gml_main{ display:contents; }
  .gml_name_row{ grid-row:1; grid-column:2 / 4; min-width:0; }
  .gml_online{ grid-row:2; grid-column:2; margin:0 -8px 0 0; white-space:nowrap; }
  .gml_contrib{ grid-row:2; grid-column:3; width:auto; min-width:0; display:flex; align-items:baseline; gap:3px; text-align:left; font-size:11px; color:#9a8463; white-space:nowrap; overflow:hidden; }
  .gml_contrib::before{ content:'・'; }
  .gml_contrib_lbl{ display:contents; }
  .gml_contrib_val{ order:1; font-size:11px; }
  .gml_tithe{ order:2; overflow:hidden; text-overflow:ellipsis; }
  .gml_shares{ grid-row:3; grid-column:2 / 4; width:auto; display:flex; align-items:center; gap:8px; margin-top:3px; }
  .gml_shares .gml_bar{ order:1; flex:1; height:4px; margin:0; }
  .gml_shares_top{ order:2; flex:none; gap:0; font-size:11px; color:#7a5c3a; white-space:nowrap; }
  .gml_shares_top strong{ font-size:11px; font-weight:400; color:inherit; }
  .gml_pct{ margin-left:0; font-size:11px; color:inherit; }
  .gml_pct::before{ content:'・'; }
  .gml_act{ grid-row:1 / 4; grid-column:4; width:auto; }
  .gml_act:empty{ display:none; }
  /* 物價情報（比照 BSFM）：整頁一起捲動；統計 → 週次 → 搜尋/篩選 → 海域清單 */
  #guild_panel_market{ height:auto; overflow:visible; background:none; border:0; border-radius:0; }
  #gmi_summary{ order:1; padding:0; border-bottom:0; }
  #gmi_toolbar{
    order:2;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin:6px 0 10px;
    padding:0;
    background:none;
    border-bottom:0;
  }
  #gmi_list{ order:3; flex:none; overflow:visible; padding:0; }
  #gmi_toolbar input{ grid-column:1 / -1; }
  #gmi_toolbar input,
  #gmi_toolbar select{ width:100%; min-width:0; box-sizing:border-box; min-height:36px; border:1px solid #d8c39b; border-radius:5px; font-size:13px; }
  #gmi_toolbar input{ background-color:#fbf3df; padding-left:28px; background-position:10px center; }
  #gmi_toolbar select{ background-color:#fff; }
  #gmi_expand_all{ display:none !important; }
  /* 統計卡片：調查完成度佔整行，其餘兩張並排；週次改為一行小字 */
  .gmi_cards{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .gmi_card{ display:flex; flex-direction:column; gap:2px; padding:8px 10px; border-top:1px solid #d8c39b; border-radius:5px; }
  .gmi_card_prog{ grid-column:1 / -1; }
  .gmi_card_label{ margin:0; }
  .gmi_card_val{ font-size:16px; }
  .gmi_card_mvp .gmi_card_val{ display:block; }
  .gmi_card_pct{ margin-left:-2px; font-weight:400; color:#9a8463; }
  .gmi_card_pct::before{ content:'・'; }
  .gmi_week_card{
    grid-column:1 / -1;
    flex-direction:row;
    flex-wrap:wrap;
    justify-content:center;
    align-items:baseline;
    gap:0;
    padding:0;
    background:none;
    border:0;
    box-shadow:none;
    text-align:center;
  }
  .gmi_week_card > *{ font-size:12px; font-weight:400; color:#9a8463; }
  .gmi_week_card .gmi_card_label{ margin-right:4px; }
  .gmi_week_card .gmi_card_val{ display:inline; line-height:1.5; }
  .gmi_week_card > .gmi_card_sub::before{ content:'・'; }
  /* 海域：淺色羊皮紙列，保留進度小條 */
  .gmi_sea{ border-radius:5px; }
  .gmi_sea_hd{ padding:11px 12px; background:#fbf3df; color:#3b2412; font-size:14px; }
  .gmi_sea_hd:hover{ background:#f3e6c4; }
  .gmi_sea_toggle{ color:#9a8463; }
  .gmi_sea_stat{ min-width:0; color:#7a5c3a; }
  .gmi_sea_minibar{ width:44px; background:#e6d6b0; }
  .gmi_sea_minibar span{ background:linear-gradient(90deg,#2a6a8c,#3f7fa6); }
  .gmi_sea:not(.gmi_collapsed) .gmi_sea_hd{ border-bottom:1px solid #e6d6b0; }
  .gmi_goods_list{ grid-template-columns:1fr; padding:7px; }
  .gmi_port_hd{ grid-template-columns:minmax(0,1fr) auto; padding:8px; }
  .gmi_port_meta{ grid-column:1 / -1; grid-row:2; white-space:normal; }
  .gtk-hero{ align-items:flex-start; }
  .gtk-meta{ line-height:1.55; }
  .gtk-wallet small{ display:block; margin:3px 0 0; }
  .gtk-table{ display:block; overflow-x:auto; white-space:nowrap; }
  /* 討伐海盜怨靈（比照 BSFM）：藍色海域標籤、紅色 HP 條、深色海面船隊、卡片式排名 */
  .gg-where{ padding:1px 8px; border-radius:10px; border:1px solid rgba(12,79,115,.35); background:rgba(12,79,115,.12); color:#0c4f73; font-weight:700; }
  .gg .gh-hp-bar{ height:8px; background:#e6d6b0; }
  .gg .gh-hp-bar i{ background:linear-gradient(90deg,#8f1f12,#c9443c); }
  .gg .gh-hp{ color:#7a5c3a; }
  .gg .gg-ships{ gap:4px; margin:8px 0; padding:6px; border:2px solid #2a1709; border-radius:4px; background:linear-gradient(180deg,#23313a,#121a20); }
  .gg .gg-ship{ width:40px; height:32px; background:none; border:0; border-radius:0; }
  .gg .gg-ship img{ max-width:100%; max-height:100%; opacity:1; filter:grayscale(.6) brightness(.85) drop-shadow(0 0 4px rgba(120,220,200,.55)); }
  .gg .gg-ship.is-sunk img{ opacity:.25; }
  .gg .gg-ship i{ color:#ff7b6b; }
  .gg-tries{ font-size:13px; }
  .gg-rank{ border-collapse:separate; border-spacing:0; border:1px solid #d8c39b; border-radius:6px; overflow:hidden; background:#fbf3df; }
  .gg-rank th{ font-size:11px; padding:6px; }
  .gg-rank td{ padding:6px; border-bottom:1px dashed #e6d6b0; }
  .gg-rank tr:last-child td{ border-bottom:0; }
  .gcd-card{ padding:8px; }
  .gcd-card-hd{ align-items:flex-start; flex-wrap:wrap; }
  .gcd-badge{ margin-left:0; }
  .gcd-duel{ gap:7px; }
  .gcd-side{ width:72px; }
  .gsd-row{ align-items:stretch; flex-direction:column; }
  .gsd-row input{ width:100%; box-sizing:border-box; }
  /* 船艦開發（比照 BSFM）：參數表每列改為卡片 —— 第一行「名稱　藍本 → 結果」，第二行「－ 0 ＋　規則」 */
  .gsd-tbl{ display:block; background:none; font-size:13px; }
  .gsd-tbl tbody{ display:flex; flex-direction:column; gap:6px; }
  .gsd-tbl tr:first-child{ display:none; }
  .gsd-tbl tr{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto auto;
    align-items:center;
    gap:4px 6px;
    padding:6px 8px;
    border:1px solid #d8c39b;
    border-radius:5px;
    background:#fbf3df;
  }
  .gsd-tbl td{ padding:0; border:0; }
  .gsd-tbl td:nth-child(1){ grid-column:1 / 3; grid-row:1; font-weight:700; color:#3b2412; }
  .gsd-tbl td:nth-child(2){ grid-column:3; grid-row:1; color:#7a5c3a; }
  .gsd-tbl td:nth-child(2)::after{ content:' →'; }
  .gsd-tbl td:nth-child(4){ grid-column:4; grid-row:1; }
  .gsd-tbl td.gsd-ctl{ grid-column:1; grid-row:2; display:flex; align-items:center; gap:6px; }
  .gsd-tbl .gsd-ctl b{ width:28px; font-size:14px; }
  .gsd-tbl td.gsd-rule{ grid-column:2 / -1; grid-row:2; font-size:11px; line-height:1.35; }
  #guild_Dialog .gsd-tbl .gsd-sb{ width:36px; height:36px; line-height:34px; border-radius:5px; background:#f3e6c4; font-size:18px; }
  /* 統計：一行一項，左名稱右數值 */
  .gsd-sum{ display:block; margin-top:10px; padding:4px 10px; border-radius:5px; background:rgba(110,72,30,.1); font-size:13px; }
  .gsd-sum > span{ display:flex; justify-content:space-between; gap:10px; padding:5px 0; border-bottom:1px dashed #d8c39b; }
  .gsd-sum > span:last-child{ border-bottom:0; }
  .gsd-err{ margin-top:8px; padding:8px 10px; border:1px solid #e6b98a; border-radius:5px; background:#fbeedd; }
  .gsd-warn{ margin-top:8px; }
  .gsd-foot{ display:grid; grid-template-columns:1fr 1.8fr; gap:8px; margin-top:10px; }
  .gsd-btn{ white-space:nowrap; padding:0 8px; }
  #gsd_reset,
  .gsd-btn{ display:flex; align-items:center; justify-content:center; min-height:44px; box-sizing:border-box; border-radius:5px; font-size:14px; font-weight:700; text-align:center; }
  #gsd_reset{ border:1px solid #c9a24a; background:#fbf3df; color:#5A3412; text-decoration:none; }
  .gad-card{ padding:10px; }
  .gad-hd{ align-items:flex-start; flex-wrap:wrap; }
  .gad-hd-note{ flex-basis:100%; margin-left:24px; }
  .gad-rate{ gap:8px; }
  .gad-presets{ flex-wrap:wrap; }
  .gad-policies{ grid-template-columns:1fr; }
  .gad-profit{ align-items:flex-start; flex-wrap:wrap; }
  #guild_join_min_profit{ width:min(150px,100%); }
  .gad-foot{ align-items:stretch; flex-wrap:wrap; }
  #guild_transfer_select{ max-width:none; min-width:0; }

  /* 履歷：篩選列橫向捲動，時間軸保留完整資訊 */
  #historylog_Dialog .hl-filters{
    flex-wrap:nowrap;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    padding:6px 8px;
    scrollbar-width:thin;
    scrollbar-color:#8a6a3a #2a1709;
  }
  #historylog_Dialog .hl-filter{ flex:none; min-height:40px; padding:4px 10px; }
  #historylog_Dialog .hl-list{ padding:4px 8px max(12px,env(safe-area-inset-bottom)); }
  #historylog_Dialog .hl-msg{ overflow-wrap:anywhere; word-break:normal; }
  #historylog_Dialog .hl-detail{ display:inline-flex; align-items:center; justify-content:center; min-height:36px; box-sizing:border-box; }

  /* 冒險歷練：分頁等寬、概況改為兩列，清單單欄 */
  #advenlog_Tabs > .tabs-header .tabs-scroller-left,
  #advenlog_Tabs > .tabs-header .tabs-scroller-right{ display:none !important; }
  #advenlog_Tabs > .tabs-header .tabs-wrap{ width:100% !important; margin:0 !important; }
  #advenlog_Tabs > .tabs-header .tabs{ display:flex; width:100% !important; padding-left:0; }
  #advenlog_Tabs > .tabs-header .tabs li{ flex:1; float:none; width:auto !important; margin:0; }
  #advenlog_Tabs > .tabs-header .tabs-inner{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    width:100% !important;
    height:42px !important;
    line-height:42px !important;
    padding:0 8px !important;
  }
  .adl-hero{ display:grid; grid-template-columns:1fr 1fr; padding:8px 10px; gap:7px 12px; }
  .adl-hero-title{ grid-column:1 / -1; }
  .adl-hero-stat{ text-align:left; }
  .adl-hero-progress{ width:auto; text-align:right; }
  .adl-hero-progress .adl-bar{ max-width:150px; margin-left:auto; }
  #advenlog_card{ padding:8px 8px 0; }
  .adl-card{ padding:8px; }
  .adl-card-topic{ min-width:100%; order:3; }
  .adl-cancel{ margin-left:auto; }
  .adl-log,
  .adl-quests{ padding-right:8px; padding-left:8px; padding-bottom:max(10px,env(safe-area-inset-bottom)); }
  .adl-tiles{ grid-template-columns:1fr; }
  .adl-entry-text{ overflow-wrap:anywhere; word-break:normal; }
}

@media (max-width:420px){
  .guild_menu_item[data-short]::before{ font-size:12px; }
  #guild_my_finance,
  #guild_members_summary,
  #gcd_summary,
  #gtk_tiles,
  #gsd_summary,
  .gmi_cards{ gap:6px; }
  .gst_tile,
  .gcd-tile,
  .gml_sum_tile,
  .gmi_card{ padding-right:7px; padding-left:7px; }
  #gnl_me{ grid-template-columns:1fr; }
  .gnl_me_chip{ display:flex; align-items:center; justify-content:space-between; text-align:left; }
  .gnl_me_chip span{ display:inline; }
  .gmi_goods{ grid-template-columns:30px minmax(0,1fr) auto; gap:6px; padding:6px; }
  .gmi_goods_icon{ width:30px; height:30px; }
  .gmi_goods_icon img{ width:26px; height:26px; }
  .gmi_price{ min-width:64px; }
  .gcd-side{ width:62px; }
  #historylog_Dialog .hl-entry{ gap:6px; }
  #historylog_Dialog .hl-icon{ width:26px; height:26px; }
  #historylog_Dialog .hl-entry::before{ left:12px; top:25px; }
  #historylog_Dialog .hl-body{ padding:5px 7px 6px; }
  .adl-hero-title small{ line-height:1.35; }
  .adl-entry{ gap:7px; }
  .adl-entry-icon{ width:28px; height:28px; }
  .adl-entry::before{ left:13px; top:28px; }
  .adl-entry-body{ padding-right:7px; padding-left:7px; }
}

@media (pointer:coarse){
  #guild_Dialog :is(.gnl_btn,.gml_sort,.guild_kick_link,.gad-preset,.gsd-btn,#gmi_expand_all),
  #historylog_Dialog :is(.hl-filter,.hl-detail),
  #advenlog_Dialog :is(.adl-cancel,#advenlog_Tabs .tabs-inner){
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
  }
  #guild_Dialog a.l-btn{ min-height:44px; display:inline-flex; align-items:center; }
  #guild_Dialog a.l-btn .l-btn-text{ line-height:42px; }
  #guild_Dialog :is(input[type=text],input[type=search],input[type=number],textarea,select,button){ min-height:44px; box-sizing:border-box; }
  #guild_Dialog input[type=range]{ min-height:44px; }
  #guild_Dialog .gsd-sb{ width:44px; height:44px; line-height:42px; }
}

@media (prefers-reduced-motion:reduce){
  #guild_Dialog *,
  #historylog_Dialog *,
  #advenlog_Dialog *{ scroll-behavior:auto !important; }
  #guild_growth_bar,
  .gcd-badge-alert{ transition:none; animation:none; }
}

/* ── 造船廠 RWD：清單優先，艦隊概況於窄螢幕漸進揭露 ── */
#YARD_SHIP_Dialog{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
#YARD_SHIP_Dialog :is(button,a,input):focus-visible{
  outline:2px solid #f0c040;
  outline-offset:2px;
}
#YARD_SHIP_Dialog :is(.yd-money .yd-val,.yd-stat .yd-val,.yd-fleet-count,.yd-price,.yd-hp,.yd-up-line,.yd-gwallet b,.yd-gcoin){
  font-variant-numeric:tabular-nums;
}

@media (max-width:720px){
  .window:has(> #YARD_SHIP_Dialog){
    max-width:calc(100vw - 16px) !important;
    max-height:calc(100dvh - 16px) !important;
  }
  #YARD_SHIP_Dialog .yd-wrap{ flex-direction:column; }
  #YARD_SHIP_Dialog .yd-side{
    display:none;
    flex:none;
    min-width:0;
    max-height:46%;
    overflow-y:auto;
    grid-template-columns:250px minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    border-right:0;
    border-bottom:3px solid #b8892e;
    box-shadow:inset 0 -1px 0 rgba(232,199,122,.25);
    scrollbar-width:thin;
    scrollbar-color:#b8892e #2a1709;
  }
  #YARD_SHIP_Dialog .yd-wrap.is-summary-open .yd-side{ display:grid; }
  #YARD_SHIP_Dialog .yd-side-title{ grid-column:1 / -1; padding:7px 10px 5px; }
  #YARD_SHIP_Dialog .yd-formation{
    grid-column:1;
    grid-row:2;
    height:250px;
    min-height:250px;
    overflow:hidden;
  }
  #YARD_SHIP_Dialog .yd-status{ grid-column:2; grid-row:2; min-width:0; overflow-y:auto; padding:0 10px 9px; }
  #YARD_SHIP_Dialog .yd-main{ flex:1; min-height:0; }
  #YARD_SHIP_Dialog .yd-tabs{
    gap:4px;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    padding:6px 8px 0;
    scrollbar-width:thin;
    scrollbar-color:#8a6a3a #2a1709;
  }
  #YARD_SHIP_Dialog .yd-tab{
    flex:none;
    min-height:42px;
    padding:7px 11px 8px;
    box-sizing:border-box;
    white-space:nowrap;
  }
  #YARD_SHIP_Dialog .yd-summary-toggle{
    cursor:pointer;
    display:inline-flex;
    flex:none;
    align-items:center;
    min-height:42px;
    margin:0;
    padding:7px 11px 8px;
    border:1px solid #8a6a3a;
    border-bottom:0;
    border-radius:4px 4px 0 0;
    box-sizing:border-box;
    color:#F6E7C1;
    background:linear-gradient(180deg,#6a4320,#3b2412);
    font-family:inherit;
    font-size:13px;
    font-weight:700;
    line-height:1;
    text-shadow:1px 1px 1px rgba(20,10,0,.8);
    white-space:nowrap;
  }
  #YARD_SHIP_Dialog .yd-summary-toggle[aria-expanded="true"]{
    color:#3b2412;
    background:linear-gradient(180deg,#f3dd9a,#c99a2e);
    border-color:#7a5518;
    text-shadow:0 1px 0 rgba(255,245,215,.6);
  }
  #YARD_SHIP_Dialog .yd-summary-toggle .cp-ic{ flex:none; }
  #YARD_SHIP_Dialog .yd-fleet-count{ flex:none; margin-left:0; padding:0 6px 6px; white-space:nowrap; }
  #YARD_SHIP_Dialog .yd-list{ padding:8px max(8px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
  #YARD_SHIP_Dialog .yd-grid{ grid-template-columns:1fr; gap:8px; }
  #YARD_SHIP_Dialog .yd-empty{ padding:clamp(28px,10vh,70px) 12px; }
  #YARD_SHIP_Dialog .yd-card-ship{ min-width:0; }
}

@media (max-width:520px){
  #YARD_SHIP_Dialog .yd-side{
    max-height:68%;
    grid-template-columns:1fr;
    grid-template-rows:auto 250px auto;
    align-content:start;
  }
  #YARD_SHIP_Dialog .yd-side-title{ grid-row:1; }
  #YARD_SHIP_Dialog .yd-formation{ grid-column:1; grid-row:2; width:250px; max-width:calc(100% - 16px); margin:0 auto; }
  #YARD_SHIP_Dialog .yd-status{ grid-column:1; grid-row:3; overflow:visible; padding:8px 10px 10px; }
  #YARD_SHIP_Dialog .yd-stat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  #YARD_SHIP_Dialog .yd-card-ship{
    display:grid;
    grid-template-columns:58px minmax(0,1fr);
    gap:8px 9px;
    padding:9px;
  }
  #YARD_SHIP_Dialog .yd-ship-img{ grid-column:1; grid-row:1; width:58px; min-height:58px; align-self:start; }
  #YARD_SHIP_Dialog .yd-ship-main{ grid-column:2; grid-row:1; }
  #YARD_SHIP_Dialog .yd-ship-name{ white-space:normal; overflow:visible; overflow-wrap:anywhere; }
  #YARD_SHIP_Dialog .yd-ship-act,
  #YARD_SHIP_Dialog .yd-m-atkup .yd-ship-act{
    grid-column:1 / -1;
    grid-row:2;
    width:auto;
    min-width:0;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    padding-top:7px;
    border-top:1px dashed #c9a86a;
  }
  #YARD_SHIP_Dialog .yd-price{ text-align:left; }
  #YARD_SHIP_Dialog .yd-act-btn{ width:auto; min-width:128px; padding:10px 14px; }
  #YARD_SHIP_Dialog .yd-up-ctl{ gap:6px; }
  #YARD_SHIP_Dialog .yd-up-presets{ flex-wrap:wrap; gap:4px; }
  #YARD_SHIP_Dialog .yd-up-pr{ min-width:86px; padding:6px 4px; }
  #YARD_SHIP_Dialog .yd-gwallet{ align-items:flex-start; }
}

@media (pointer:coarse){
  #YARD_SHIP_Dialog :is(.yd-summary-toggle,.yd-tab,.yd-act-btn,.yd-up-pr){ min-height:44px; }
  #YARD_SHIP_Dialog .yd-up-sb{ width:44px; height:44px; line-height:42px; }
  #YARD_SHIP_Dialog .yd-up-range{ min-height:44px; }
}

@media (prefers-reduced-motion:reduce){
  #YARD_SHIP_Dialog *{ scroll-behavior:auto !important; }
  #YARD_SHIP_Dialog :is(.yd-card-ship,.yd-pips i){ transition:none; animation:none; }
}

/* ── 海上搜索／戰鬥報告 RWD：決策優先、艦隊陣列完整、戰報單欄閱讀 ── */
#Search_Dialog,
#battle_detail_dlg{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#8a6a3a transparent;
}
#Search_Dialog :is(a,button,summary):focus-visible,
#battle_detail_dlg :is(a,button,summary):focus-visible{
  outline:2px solid #f0c040;
  outline-offset:2px;
}
#Search_Dialog :is(.ss-stat b,.ss-cmp-val,.bd-stat b,.bd-chip,.bd-kv b,.bd-fire-dmg),
#battle_detail_dlg :is(.bd-stat b,.bd-chip,.bd-kv b,.bd-fire-dmg,.bd-count){
  font-variant-numeric:tabular-nums;
}

@media (max-width:720px){
  .window:has(> #Search_Dialog),
  .window:has(> #battle_detail_dlg){
    max-width:calc(100vw - 16px) !important;
    max-height:calc(100dvh - 16px) !important;
  }

  /* 搜索結果：先呈現是否交戰，再完整列出雙方艦隊。 */
  #Search_Dialog .ss-wrap{
    flex-direction:column;
    gap:8px;
    height:auto;
    min-height:100%;
    padding:8px max(8px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  }
  #Search_Dialog .ss-center{
    order:-1;
    flex:none;
    width:100%;
  }
  #Search_Dialog .ss-prelude{
    flex:none;
    justify-content:flex-start;
    gap:8px;
    padding:4px 0;
  }
  #Search_Dialog .ss-encounter-title{ font-size:clamp(17px,5vw,20px); letter-spacing:2px; }
  #Search_Dialog .ss-encounter-sub{ padding:0 6px; line-height:1.55; overflow-wrap:anywhere; }
  #Search_Dialog .ss-cmp-card{ padding:7px 8px 9px; }
  #Search_Dialog .ss-cmp{ gap:6px; }
  #Search_Dialog .ss-cmp-val{ width:46px; }
  #Search_Dialog .ss-fleet{
    width:100%;
    padding:8px;
  }
  #Search_Dialog .ss-stats{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
  #Search_Dialog .ss-stat{ min-width:0; padding:3px 6px; }
  #Search_Dialog .ss-fleet .battle_ship_img_area{
    flex:none;
    width:250px;
    height:250px;
    min-height:250px;
    margin:4px auto;
    overflow:hidden;
  }
  #Search_Dialog .ss-center .bd-panel{
    flex:none;
    height:auto;
    max-height:none;
    overflow:visible;
  }
  #Search_Dialog .bd{ padding:8px; }

  /* 搜索後的精簡報告與獨立詳細戰報。 */
  #battle_detail_dlg .bd{ padding:8px 8px max(12px,env(safe-area-inset-bottom)); }
  #Search_Dialog .bd-hero,
  #battle_detail_dlg .bd-hero{ padding:10px 9px 11px; }
  #Search_Dialog .bd-hero-title,
  #battle_detail_dlg .bd-hero-title{ font-size:20px; letter-spacing:2px; }
  #Search_Dialog .bd-story,
  #battle_detail_dlg .bd-story{ padding:8px 10px; line-height:1.7; overflow-wrap:anywhere; }
  #Search_Dialog .bd-versus,
  #battle_detail_dlg .bd-versus{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    gap:4px;
  }
  #Search_Dialog .bd-side,
  #battle_detail_dlg .bd-side{ min-width:0; padding:6px; }
  #Search_Dialog .bd-stat,
  #battle_detail_dlg .bd-stat{ gap:5px; }
  #Search_Dialog .bd-stat b,
  #battle_detail_dlg .bd-stat b{ text-align:right; overflow-wrap:anywhere; }
  #Search_Dialog .bd-card,
  #battle_detail_dlg .bd-card,
  #battle_detail_dlg .bd-round{ padding:8px; }
  #Search_Dialog .bd-chip,
  #battle_detail_dlg .bd-chip{ min-width:0; overflow-wrap:anywhere; }
  #Search_Dialog .bd-highlights li,
  #battle_detail_dlg .bd-highlights li{ align-items:flex-start; overflow-wrap:anywhere; }
  #battle_detail_dlg .bd-round-head{ align-items:flex-start; flex-wrap:wrap; }
  #battle_detail_dlg .bd-fire{
    display:grid;
    grid-template-columns:36px minmax(0,1fr);
    gap:3px 8px;
  }
  #battle_detail_dlg .bd-fire-label{ grid-column:1; grid-row:1 / 3; align-self:center; }
  #battle_detail_dlg .bd-fire-main{ grid-column:2; grid-row:1; }
  #battle_detail_dlg .bd-fire-dmg{
    grid-column:2;
    grid-row:2;
    min-width:0;
    flex-direction:row;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
  }
  #battle_detail_dlg .bd-shots-wrap{ flex-direction:column; }
  #battle_detail_dlg .bd-shots-wrap .bd-shots{ flex:1 1 auto; min-width:0; }
  #battle_detail_dlg .bd-shots summary{ min-height:38px; display:flex; align-items:center; flex-wrap:wrap; }
  #battle_detail_dlg .bd-kv{ align-items:flex-start; }
  #battle_detail_dlg .bd-kv b{ max-width:62%; overflow-wrap:anywhere; }
  #battle_detail_dlg .bd-capture{ align-items:flex-start; flex-wrap:wrap; }
  #battle_detail_dlg .bd-capture b{ min-width:140px; }
}

@media (max-width:390px){
  #Search_Dialog .ss-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  #Search_Dialog .ss-cmp-val{ width:40px; font-size:12px; }
  #Search_Dialog .bd-versus,
  #battle_detail_dlg .bd-versus{ grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr); }
  #Search_Dialog .bd-vs,
  #battle_detail_dlg .bd-vs{ font-size:12px; }
  #Search_Dialog .bd-stat,
  #battle_detail_dlg .bd-stat{ align-items:flex-start; flex-direction:column; gap:0; }
  #Search_Dialog .bd-stat b,
  #battle_detail_dlg .bd-stat b{ text-align:left; }
}

@media (pointer:coarse){
  #Search_Dialog :is(.bd-btn,summary),
  #battle_detail_dlg :is(.bd-btn,summary){ min-height:44px; box-sizing:border-box; }
  #Search_Dialog .bd-btn,
  #battle_detail_dlg .bd-btn{ display:inline-flex; align-items:center; justify-content:center; }
}

@media (prefers-reduced-motion:reduce){
  #Search_Dialog *,
  #battle_detail_dlg *{ scroll-behavior:auto !important; }
  #Search_Dialog :is(.ss-prelude,.bd-panel,.ss-empty-icon),
  #battle_detail_dlg .bd-panel{ transition:none; animation:none; }
}

/* ── 貨艙交易品一覽 RWD：容量摘要、完整貨物資訊與觸控棄置操作 ── */
#goods_Dialog{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
#goods_Dialog :is(.cg-item,.cg-step,.cg-all,input):focus-visible{
  outline:2px solid #f0c040;
  outline-offset:2px;
}
#goods_Dialog :is(.cg-hold-head span,.cg-stats b,.cg-sub,.cg-amount,#goods_discard_qty,.cg-qty-hint){
  font-variant-numeric:tabular-nums;
}
.cg-qty.is-active{ display:flex !important; }

@media (max-width:600px){
  .window:has(> #goods_Dialog){
    max-width:calc(100vw - 16px) !important;
    max-height:calc(100dvh - 16px) !important;
  }
  #goods_Dialog .cg-summary{ padding:9px 10px 8px; }
  #goods_Dialog .cg-hold-head{ gap:8px; }
  #goods_Dialog .cg-hold-head span{ text-align:right; }
  #goods_Dialog .cg-legend{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px 8px;
  }
  #goods_Dialog .cg-legend span{ min-width:0; white-space:nowrap; }
  #goods_Dialog .cg-stats{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }
  #goods_Dialog .cg-stats span{
    min-width:0;
    padding:4px 6px;
    border:1px solid rgba(232,199,122,.18);
    border-radius:3px;
    background:rgba(255,236,190,.06);
  }
  #goods_Dialog .cg-stats b{ display:block; margin:1px 0 0; overflow-wrap:anywhere; }
  #goods_Dialog .cg-list{
    padding:8px max(8px,env(safe-area-inset-right)) 10px max(8px,env(safe-area-inset-left));
    overscroll-behavior:contain;
  }
  #goods_Dialog .cg-empty{ padding:clamp(34px,12vh,82px) 10px; }
  #goods_Dialog .cg-item{
    display:grid;
    grid-template-columns:40px minmax(0,1fr) auto;
    gap:5px 9px;
    min-width:0;
    padding:8px;
  }
  #goods_Dialog .cg-icon{ grid-column:1; grid-row:1; width:40px; height:40px; }
  #goods_Dialog .cg-icon img{ max-width:36px; max-height:36px; }
  #goods_Dialog .cg-info{ grid-column:2; grid-row:1; align-self:center; }
  #goods_Dialog .cg-name{ white-space:normal; overflow:visible; overflow-wrap:anywhere; line-height:1.35; }
  #goods_Dialog .cg-sub{ line-height:1.45; overflow-wrap:anywhere; }
  #goods_Dialog .cg-amount{ grid-column:3; grid-row:1; align-self:center; min-width:66px; }

  .window:has(> #goods_Dialog) > .dialog-button.cg-footer{
    display:grid !important;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)) !important;
  }
  .window:has(> #goods_Dialog) .cg-qty.is-active{
    display:grid !important;
    grid-template-columns:44px minmax(36px,1fr) minmax(36px,1fr) 44px 60px;
    gap:6px;
    width:100%;
    white-space:normal;
  }
  .window:has(> #goods_Dialog) .cg-qty-label{ grid-column:1 / 4; grid-row:1; align-self:end; }
  .window:has(> #goods_Dialog) .cg-qty-hint{ grid-column:4 / 6; grid-row:1; align-self:end; margin:0; text-align:right; }
  .window:has(> #goods_Dialog) .cg-step[data-step="-1"]{ grid-column:1; grid-row:2; }
  .window:has(> #goods_Dialog) .cg-qty input{ grid-column:2 / 4; grid-row:2; width:100%; }
  .window:has(> #goods_Dialog) .cg-step[data-step="1"]{ grid-column:4; grid-row:2; }
  .window:has(> #goods_Dialog) .cg-all{ grid-column:5; grid-row:2; padding:0 8px; }
  .window:has(> #goods_Dialog) #goods_discard_btn{
    width:100%;
    min-height:44px;
    margin:0;
    box-sizing:border-box;
  }
  .window:has(> #goods_Dialog) #goods_discard_btn .l-btn-left{ min-height:42px; }
}

@media (max-width:767px), (max-height:520px) and (pointer:coarse){
  /* 酒館沿用所有港口設施共用的全螢幕抽屜（木紋名牌標題＋金色圓形關閉鈕），這裡只調整內容排版與觸控尺寸。 */
  /* 背景插圖在手機上面積變大、字級也放大，遮罩加深並讓文字區塊有羊皮紙底，避免插圖壓到文字 */
  body.game-mobile #BAR_Tab .BAR_TAB_BG_O > .bar-pane,
  body.game-mobile #BAR_Tab .BAR_TAB_BG_O > .BAR_ADVEN_MASK{
    background:radial-gradient(ellipse at center, rgba(90,58,28,0) 45%, rgba(90,58,28,.22) 100%), rgba(240,228,196,.8);
  }
  body.game-mobile #BAR_Tab .bar-hd{ padding:4px 8px 5px; border-radius:3px; background:rgba(255,249,232,.9); border:1px solid rgba(168,131,63,.45); }
  body.game-mobile #BAR_Tab .pe-news-empty{ padding:10px 12px; border-radius:3px; color:#5a3a1c; background:rgba(255,249,232,.9); border:1px dashed #a8833f; text-align:center; }
  body.game-mobile #BAR_Tab,
  body.game-mobile #BAR_Tab > .tabs-panels,
  body.game-mobile #BAR_Tab > .tabs-panels > .panel,
  body.game-mobile #BAR_Tab > .tabs-panels > .panel > .panel-body,
  body.game-mobile #BAR_Tab .BAR_TAB_BG_O,
  body.game-mobile #BAR_Tab .bar-pane,
  body.game-mobile #BAR_ADVEN_AREA{ height:auto !important; }
  body.game-mobile.mobile-facility-open:has(#BAR_Tab){ overflow:hidden !important; }
  body.game-mobile #BAR_Tab .bar-pane,
  body.game-mobile #BAR_ADVEN_AREA{ min-height:240px; padding:16px 12px; gap:14px; overflow:visible; }
  body.game-mobile #BAR_Tab > .tabs-header{ position:relative; }
  body.game-mobile #BAR_Tab > .tabs-header .tabs-scroller-left,
  body.game-mobile #BAR_Tab > .tabs-header .tabs-scroller-right{ display:none !important; }
  body.game-mobile #BAR_Tab > .tabs-header .tabs-wrap{
    width:100% !important; margin:0 !important; overflow-x:auto; overflow-y:hidden;
    scrollbar-width:thin; scrollbar-color:#c9a24a #2a1709;
  }
  body.game-mobile #BAR_Tab > .tabs-header .tabs{
    display:flex; width:max-content !important; height:auto !important; padding:0; border:0;
  }
  body.game-mobile #BAR_Tab > .tabs-header .tabs li{ float:none; flex:0 0 96px; margin:0; }
  body.game-mobile #BAR_Tab > .tabs-header .tabs li .tabs-inner{
    width:96px !important; height:56px !important; gap:4px;
  }
  body.game-mobile #BAR_Tab .tabs-title{ font-size:13px; letter-spacing:0; }
  body.game-mobile #BAR_Tab .tabs-icon.bar-ic{ width:20px; height:20px; background-size:20px; }
  body.game-mobile #BAR_Tab .bar-hd{ flex-wrap:wrap; gap:6px; font-size:16px; }
  body.game-mobile #BAR_Tab .bar-hd-sub{ font-size:12px; color:#5a3a1c; }
  body.game-mobile #BAR_Tab .bar-stat{ padding:8px 3px; }
  body.game-mobile #BAR_Tab .bar-stat > span{ font-size:12px; color:#5a3a1c; }
  body.game-mobile #BAR_Tab .bar-stat div{ font-size:17px; }
  body.game-mobile #BAR_Tab .bar-buy-row{ flex-wrap:wrap; margin-top:6px; gap:10px; }
  body.game-mobile #BAR_Tab .bar-total{ min-width:100px; padding:8px; }
  body.game-mobile #BAR_Tab .bar-total > span{ font-size:12px; color:#5a3a1c; }
  body.game-mobile #BAR_Tab .bar-btn{ box-sizing:border-box; min-height:48px; display:flex; align-items:center; justify-content:center; font-size:15px; }
  body.game-mobile #BAR_Tab .bar-qty .textbox{ width:220px !important; height:46px !important; }
  body.game-mobile #BAR_Tab .bar-qty .textbox-text{ height:44px !important; font-size:18px; }
  body.game-mobile #BAR_Tab .bar-qty .spinner-button{ width:44px !important; height:44px !important; }
  body.game-mobile #BAR_FOOD_QTY_Bar_Div{ padding:12px 16px; }
  body.game-mobile #BAR_FOOD_QTY_Bar_Div .slider-handle::after{ content:''; position:absolute; inset:-14px; }
  body.game-mobile #BAR_Tab .bar-card{ min-height:48px; }
  body.game-mobile #BAR_Tab .bar-tip,
  body.game-mobile #BAR_Tab .pe-news-row,
  body.game-mobile #BAR_Tab .pe-news-empty{ font-size:14px; line-height:1.6; }
  body.game-mobile #BAR_Tab .adven-item,
  body.game-mobile #BAR_Tab .adven-cancel-btn{ min-height:44px; box-sizing:border-box; }
  body.game-mobile #BAR_Tab .adven-cancel-btn{ display:inline-flex; align-items:center; }
  body.game-mobile #BAR_Tab a:focus-visible{ outline:2px solid #a77a24; outline-offset:-3px; }

  /* ── 交易所（比照酒館）：全螢幕抽屜內放大分段鈕、商品列、數量輸入與按鈕；商品清單拉高可一次看到更多 ── */
  body.game-mobile #TRADE_LIST_BG.tr-bg{ height:clamp(300px, 50dvh, 480px); }
  body.game-mobile #TRADE_LIST_BG.ts-depot{ height:auto; min-height:300px; }
  body.game-mobile #TRADE_LIST_BG .tr-pane{ gap:8px; padding:8px; }
  /* 背景插圖遮罩加深，文字不被壓到 */
  body.game-mobile #TRADE_LIST_BG .tr-pane,
  body.game-mobile #TRADE_TAB_BG_O > .TAB_BG_I{
    background:radial-gradient(ellipse at center, rgba(90,58,28,0) 45%, rgba(90,58,28,.22) 100%), rgba(240,228,196,.8);
  }
  body.game-mobile .tr-seg{ gap:3px; padding:3px; }
  body.game-mobile .tr-seg-btn{ min-height:44px; box-sizing:border-box; font-size:15px; touch-action:manipulation; }
  body.game-mobile .tr-notice,
  body.game-mobile .tr-bond{ font-size:12px; line-height:1.5; padding:5px 10px; }
  body.game-mobile .tr-list{ gap:6px; }
  body.game-mobile .tr-list::-webkit-scrollbar{ width:6px; }
  body.game-mobile .tr-row{ min-height:58px; box-sizing:border-box; gap:10px; padding:8px 10px; touch-action:manipulation; }
  body.game-mobile .tr-icon{ width:40px; height:40px; }
  body.game-mobile .tr-icon img{ max-width:36px; max-height:36px; }
  body.game-mobile .tr-name{ font-size:15px; }
  body.game-mobile .tr-tag{ font-size:10px; padding:1px 6px; }
  body.game-mobile .tr-sub{ font-size:12px; margin-top:2px; }
  body.game-mobile .tr-right b{ font-size:16px; }
  body.game-mobile .tr-right b small{ font-size:11px; }
  body.game-mobile .tr-idx{ font-size:11px; }
  body.game-mobile .tr-empty,
  body.game-mobile .tr-panel-empty{ font-size:14px; }
  body.game-mobile .tr-gt{ padding:6px 10px 7px; }
  body.game-mobile .tr-gt-top{ font-size:12px; }
  body.game-mobile .tr-gt-top b{ font-size:14px; }
  body.game-mobile .tr-gt-sub,
  body.game-mobile .tr-gt-note{ font-size:12px; }

  /* 交易面板：桌面固定 218px，手機依內容展開 */
  body.game-mobile #TRADE_TAB_BG_O,
  body.game-mobile #TRADE_TAB_BG_O > .TAB_BG_I{ height:auto !important; }
  body.game-mobile #TRADE_TAB_BG_O{ margin-top:8px; }
  body.game-mobile .tr-panel{ min-height:220px; gap:10px; padding:12px 10px; }
  body.game-mobile .tr-sel{ gap:10px; padding-bottom:8px; }
  body.game-mobile .tr-sel .tr-icon{ width:44px; height:44px; }
  body.game-mobile .tr-sel-info b{ font-size:16px; }
  body.game-mobile .tr-sel-info small{ font-size:13px; }
  body.game-mobile .tr-sel-max{ font-size:12px; padding:3px 9px; }
  body.game-mobile .tr-qty-row{ gap:10px; }
  body.game-mobile .tr-sb{ width:44px; height:44px; line-height:42px; font-size:20px; touch-action:manipulation; }
  body.game-mobile #TRADE_QTY_RANGE{ height:32px; }
  body.game-mobile .tr-presets{ gap:8px; }
  body.game-mobile #TRADE_QTY{ height:44px; font-size:18px; }
  body.game-mobile .tr-pr{ display:flex; align-items:center; min-height:44px; box-sizing:border-box; padding:0 18px; line-height:1; font-size:14px; touch-action:manipulation; }
  body.game-mobile .tr-buy-row{ gap:10px; }
  body.game-mobile .tr-total{ padding:7px 10px 8px; }
  body.game-mobile .tr-total > span,
  body.game-mobile .tr-total small{ font-size:12px; }
  body.game-mobile .tr-total strong{ font-size:18px; }
  body.game-mobile a.tr-btn{ box-sizing:border-box; min-width:132px; min-height:52px; display:flex; align-items:center; justify-content:center; font-size:16px; touch-action:manipulation; }

  /* 寶藏島臨時貨棧 */
  body.game-mobile .ts-head{ padding:7px 10px; }
  body.game-mobile .ts-title b{ font-size:15px; }
  body.game-mobile .ts-title span,
  body.game-mobile .ts-prog,
  body.game-mobile .ts-meta,
  body.game-mobile .ts-wait{ font-size:12px; }
  body.game-mobile .ts-buy{ gap:8px; margin-top:6px; }
  body.game-mobile .ts-qty{ width:96px; height:40px; box-sizing:border-box; padding:0 8px; font-size:16px; }
  body.game-mobile .ts-btn{ display:inline-flex; align-items:center; min-height:40px; box-sizing:border-box; padding:0 16px; font-size:14px; touch-action:manipulation; }

  body.game-mobile #TRADE_LIST_BG a:focus-visible,
  body.game-mobile #TRADE_TAB_BG_O a:focus-visible{ outline:2px solid #a77a24; outline-offset:-3px; }

  /* ── 啟航：海域預設收合、港口航線拉高填滿抽屜；點「海域」名牌恢復兩區原本高度（corejs/MainLayout.js mvAreaToggle） ── */
  body.game-mobile .mv-section-area.is-collapsed{ display:none; }
  body.game-mobile .mv-section-city.mv-area-collapsed{
    height:calc(100dvh - 136px - env(safe-area-inset-top) - var(--mobile-nav-h, 0px));
    min-height:366px;
  }
  body.game-mobile #ACTION_TITLE.mv-area-toggle{ cursor:pointer; user-select:none; touch-action:manipulation; }
  body.game-mobile #ACTION_TITLE.mv-area-toggle::after{
    content:'';
    display:inline-block;
    width:8px;
    height:8px;
    margin-left:2px;
    border-right:2px solid #ead08a;
    border-bottom:2px solid #ead08a;
    transform:translateY(-4px) rotate(225deg);
    transition:transform .2s ease-out;
    vertical-align:middle;
  }
  body.game-mobile #ACTION_TITLE.mv-area-toggle.is-collapsed::after{ transform:translateY(-6px) rotate(45deg); }
  body.game-mobile #ACTION_TITLE.mv-area-toggle:focus-visible{ outline:2px solid #f3dd9a; outline-offset:-4px; }

  /* ── 海上：搜索周圍艦隊／打撈漂流物（／討伐怨靈）改為兩欄滿版大按鈕；
        EasyUI linkbutton 會寫入 inline 寬高與 .l-btn-left 的 margin-top，這裡覆蓋並改用 flex 置中（冷卻倒數兩行時也置中） ── */
  body.game-mobile .Battle_menu{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-content:start;
    gap:12px;
    box-sizing:border-box;
    padding:16px 12px;
  }
  body.game-mobile .Battle_menu a,
  body.game-mobile .Battle_menu.has-ghost a{ margin:0 !important; }
  body.game-mobile .Battle_menu a.l-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    width:auto !important;
    height:76px !important;
    padding:0 6px;
    touch-action:manipulation;
  }
  body.game-mobile .Battle_menu a.l-btn .l-btn-left{ margin-top:0 !important; }
  body.game-mobile .Battle_menu a.l-btn .l-btn-text{ display:block; height:auto; margin:0; padding:0; font-size:17px; line-height:1.35; white-space:normal; text-align:center; }
  body.game-mobile .Battle_menu a.l-btn .l-btn-text small{ font-size:12px; font-weight:normal; letter-spacing:0; }
  body.game-mobile .Battle_menu #Ghost_Hunt.l-btn{ grid-column:1 / -1; height:64px !important; }
  body.game-mobile .Battle_menu a.l-btn:focus-visible{ outline:2px solid #f3dd9a; outline-offset:2px; }
}

@media (max-width:360px){
  #goods_Dialog .cg-item{ grid-template-columns:40px minmax(0,1fr); }
  #goods_Dialog .cg-amount{
    grid-column:2;
    grid-row:2;
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:8px;
    min-width:0;
    padding-top:4px;
    border-top:1px dashed #c9a86a;
    text-align:left;
  }
  #goods_Dialog .cg-amount b{ display:inline; }
}

@media (pointer:coarse){
  #goods_Dialog .cg-item{ min-height:56px; box-sizing:border-box; }
  .window:has(> #goods_Dialog) :is(.cg-step,.cg-all,#goods_discard_btn){ min-height:44px; }
  .window:has(> #goods_Dialog) :is(.cg-step,.cg-all){ display:flex; align-items:center; justify-content:center; line-height:normal; }
  .window:has(> #goods_Dialog) .cg-qty input{ height:44px; }
}

@media (prefers-reduced-motion:reduce){
  #goods_Dialog *{ scroll-behavior:auto !important; }
  #goods_Dialog .cg-item{ transition:none; }
}

/* 港口隨機事件（docs/port_event_spec.md 六）：有利＝綠、不利＝赭紅、中性＝海軍藍 */
.pe-banner{ flex:none; display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; margin:0 0 5px; padding:4px 8px; border-radius:3px; font-size:11px; color:#3b2412; background:rgba(255,249,232,.9); border:1px solid #c9a86a; border-left:3px solid #8a5a00; }
.pe-banner b{ flex:none; font-size:12px; }
.pe-banner span{ flex:1 1 160px; min-width:0; }
.pe-banner small{ flex:none; color:#7a5c3a; font-variant-numeric:tabular-nums; }
.pe-banner.pe-harvest, .pe-banner.pe-rush, .pe-news-row.pe-harvest, .pe-news-row.pe-rush{ border-left-color:#5d7a2e; }
.pe-banner.pe-blight, .pe-banner.pe-glut, .pe-banner.pe-plague, .pe-banner.pe-famine,
.pe-news-row.pe-blight, .pe-news-row.pe-glut, .pe-news-row.pe-plague, .pe-news-row.pe-famine{ border-left-color:#a8463a; }
.pe-banner.pe-closure, .pe-banner.pe-storm, .pe-news-row.pe-closure, .pe-news-row.pe-storm{ border-left-color:#1d4f7a; }
.tr-tag-ev, .mv-ev{ background:#8a5a00; }
.tr-tag-ev.pe-harvest, .tr-tag-ev.pe-rush, .mv-ev.pe-harvest, .mv-ev.pe-rush{ background:#5d7a2e; }
.tr-tag-ev.pe-blight, .tr-tag-ev.pe-glut, .mv-ev.pe-blight, .mv-ev.pe-glut, .mv-ev.pe-plague, .mv-ev.pe-famine{ background:#a8463a; }
.mv-ev.pe-closure, .mv-ev.pe-storm{ background:#1d4f7a; }
.mv-ev{ flex:none; margin-left:auto; font-style:normal; font-size:10px; font-weight:700; padding:0 6px; border-radius:3px; line-height:16px; color:#fff; }
.tr-ev-quota{ color:#4d6a1e; font-weight:700; }
.pe-news{ display:flex; flex-direction:column; gap:4px; margin-top:4px; }
.pe-news-row{ display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; padding:4px 8px; border-radius:3px; font-size:11px; color:#3b2412; background:rgba(255,249,232,.82); border:1px solid #c9a86a; border-left:3px solid #8a5a00; }
.pe-news-row b{ flex:none; font-size:12px; }
.pe-news-row span{ flex:1 1 160px; min-width:0; }
.pe-news-row small{ flex:none; color:#7a5c3a; font-variant-numeric:tabular-nums; }
/* 電腦版比照手機版：標題與「一切如常」做成羊皮紙卡片，避免背景插圖壓到文字 */
.pe-news-empty{ font-size:12px; color:#5a3a1c; padding:10px 12px; border-radius:3px; background:rgba(255,249,232,.9); border:1px dashed #a8833f; text-align:center; }
.BAR_TAB_BG_O .bar-hd,
#BAR_ADVEN_AREA .adven-buy-title{ padding:3px 8px 4px; border-radius:3px; background:rgba(255,249,232,.9); border:1px solid rgba(168,131,63,.45); }
.BAR_TAB_BG_O .bar-hd-sub{ color:#5a3a1c; }
.tr-pane .pe-banner, .mv-pane .pe-banner{ flex-wrap:nowrap; margin:0; padding:2px 8px; }
.tr-pane .pe-banner span, .mv-pane .pe-banner span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-pane.pe-news-pane{ overflow-y:auto; scrollbar-width:thin; scrollbar-color:rgba(138,106,58,.6) transparent; }

/* 港口建設（docs/port_build_spec.md 八）：等級 0 灰、1 預設、2 淺綠、3 綠 */
.pb-chip{ padding:1px 7px; }
.pb-chip.pb-lv0{ color:#7a6a55; background:rgba(230,222,205,.7); border-color:#c2b59a; }
.pb-chip.pb-lv2{ color:#3f5a16; background:rgba(214,230,180,.85); border-color:#93ad5c; }
.pb-chip.pb-lv3{ color:#fff; background:#5d7a2e; border-color:#4d6a1e; }
#city_build_dialog{ padding:10px 12px; font-size:12px; color:#3b2412; }
.pb-hd{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:6px; }
.pb-hd b{ font-size:14px; }
.pb-hd small{ color:#7a5c3a; }
.pb-row{ cursor:pointer; display:grid; grid-template-columns:36px minmax(0,1fr) 62px 26px 40px; align-items:center; gap:6px; padding:6px 4px; border-top:1px solid rgba(138,106,58,.3); }
.pb-row:hover, .pb-row.is-sel{ background:rgba(255,246,220,.9); }
.pb-name{ font-weight:700; }
.pb-bar{ height:7px; border-radius:3px; background:rgba(90,60,25,.15); overflow:hidden; }
.pb-bar i{ display:block; height:100%; background:#b8a27a; }
.pb-bar i.pb-lv1{ background:#c9a24a; } .pb-bar i.pb-lv2{ background:#93ad5c; } .pb-bar i.pb-lv3{ background:#5d7a2e; }
.pb-band{ font-size:11px; font-weight:700; text-align:center; padding:0 4px; border-radius:3px; background:rgba(230,222,205,.8); color:#7a6a55; }
.pb-band.pb-lv1{ background:#f6e7c1; color:#8a5a00; } .pb-band.pb-lv2{ background:rgba(214,230,180,.9); color:#3f5a16; } .pb-band.pb-lv3{ background:#5d7a2e; color:#fff; }
.pb-val{ text-align:right; font-variant-numeric:tabular-nums; }
.pb-go{ text-align:center; font-size:11px; font-weight:700; color:#5A3412 !important; border:1px solid #c9a24a; border-radius:3px; background:#f6ead0; text-decoration:none !important; }
.pb-detail{ padding:4px 6px 8px 46px; background:rgba(255,246,220,.9); }
.pb-desc{ color:#5a4630; line-height:1.6; }
.pb-inv{ display:flex; gap:6px; margin-top:6px; }
.pb-amt{ flex:1; min-width:0; height:26px; box-sizing:border-box; padding:0 6px; border:1px solid #c9a86a; border-radius:3px; }
.pb-est{ margin-top:4px; color:#4d6a1e; }
.pb-err{ margin-top:2px; color:#8f1f12; }
.pb-note{ margin-top:4px; color:#7a5c3a; }
.pb-rank{ margin-top:8px; padding-top:6px; border-top:1px solid rgba(138,106,58,.3); }
.pb-rank-row{ display:grid; grid-template-columns:18px minmax(0,1fr) auto; gap:6px; padding:2px 0; }

/* ── 登入後主畫面 RWD：9:16 手機以五個任務視角取代固定三欄 ── */
@media (max-width:767px), (max-height:520px) and (pointer:coarse){
  html,
  body{ min-width:0; max-width:100%; overflow-x:hidden; }
  /* --mobile-chrome-h：標頭（上內距＋32＋28＋下內距 5＋底框 2）＋body 底部留給工具列的 68px；試玩模式再加橫幅 21px。
     內容區最小高度扣掉它剛好填滿一個畫面，不會多出捲軸 */
  body:has(#MainLayout){
    --mobile-chrome-h:calc(67px + max(4px, env(safe-area-inset-top)) + 68px + env(safe-area-inset-bottom));
    padding:0 0 calc(68px + env(safe-area-inset-bottom)) 0;
    background:#211106 url('images/map_C6EFFF.gif');
  }
  body:has(#demo_ribbon){ --mobile-chrome-h:calc(67px + max(4px, env(safe-area-inset-top)) + 68px + env(safe-area-inset-bottom) + 21px); }
  body:has(#demo_ribbon) #mobile_game_header{ top:21px; margin-top:21px; }
  #demo_ribbon{
    right:0;
    left:0;
    transform:none;
    box-sizing:border-box;
    width:100%;
    min-width:0;
    justify-content:center;
    gap:5px;
    padding:4px;
    border-radius:0;
    font-size:9px;
  }

  #mobile_game_header{
    position:sticky;
    top:0;
    z-index:800;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:32px 28px;
    gap:0 8px;
    box-sizing:border-box;
    min-height:64px;
    padding:max(4px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) 5px max(8px,env(safe-area-inset-left));
    color:#F6E7C1;
    background:linear-gradient(180deg,#4a2d15,#211106);
    border-bottom:2px solid #c9a24a;
    box-shadow:0 3px 10px rgba(24,12,3,.45);
  }
  #mobile_game_header button{
    min-width:0;
    margin:0;
    padding:0;
    border:0;
    color:inherit;
    font:inherit;
    background:transparent;
    cursor:pointer;
  }
  #mobile_game_header button:focus-visible,
  #mobile_game_nav button:focus-visible{
    outline:2px solid #f3dd9a;
    outline-offset:-2px;
  }
  .mobile-head-captain{
    grid-column:1;
    grid-row:1 / 3;
    display:flex;
    align-items:center;
    gap:8px;
    text-align:left;
  }
  #mobile_player_avatar{
    flex:none;
    width:46px;
    height:46px;
    object-fit:cover;
    border-radius:5px;
    background:#2a1709;
    border:2px solid #c9a24a;
    box-shadow:0 2px 5px rgba(0,0,0,.45);
  }
  /* 與艦長狀態頭像（.cp-avatar）同樣裁切：96px 原圖以原尺寸取 50px 臉部窗格（object-position 50% 23%），
     再用 zoom 等比縮成 46px 外框（54px×0.852） */
  #mobile_player_avatar:not([src$="icon0.png"]){
    box-sizing:content-box;
    width:50px;
    height:50px;
    object-fit:none;
    object-position:50% 23%;
    image-rendering:auto;
    zoom:.852;
  }
  .mobile-head-id{ min-width:0; display:flex; flex-direction:column; }
  .mobile-head-name{
    overflow:hidden;
    color:#FBEFD0;
    font-size:15px;
    font-weight:800;
    line-height:1.25;
    white-space:nowrap;
    text-overflow:ellipsis;
    text-shadow:1px 1px 2px rgba(20,10,0,.9);
  }
  .mobile-head-caption{ color:#d5b979; font-size:10px; line-height:1.3; letter-spacing:.08em; }
  .mobile-head-money{
    grid-column:2;
    grid-row:1 / 3;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    min-width:112px;
    color:#f3dd9a;
    font-size:14px;
    font-weight:800;
    font-variant-numeric:tabular-nums;
  }
  .mobile-head-money .cp-ic{ flex:none; margin-right:2px; }

  #MainLayout{
    display:flex !important;
    flex-direction:column;
    box-sizing:border-box;
    width:100% !important;
    max-width:520px;
    height:auto !important;
    min-height:calc(100dvh - var(--mobile-chrome-h, 139px));
    margin:0 auto !important;
    padding:8px !important;
    overflow:visible !important;
    background:#C6EFFF url('images/map_C6EFFF.gif');
  }
  body.game-mobile #MainLayout > .layout-panel{
    position:static !important;
    inset:auto !important;
    display:none !important;
    width:100% !important;
    height:auto !important;
  }
  body.game-mobile-view-status #MainLayout > .layout-panel-west,
  body.game-mobile-view-info #MainLayout > .layout-panel-west,
  body.game-mobile-view-action #MainLayout > .layout-panel-west,
  body.game-mobile-view-action #MainLayout > .layout-panel-center,
  body.game-mobile-view-action #MainLayout > .layout-panel-east,
  body.game-mobile-view-fleet #MainLayout > .layout-panel-center,
  body.game-mobile-view-chat #MainLayout > .layout-panel-center{ display:block !important; }

  body.game-mobile-view-action #MainLayout > .layout-panel-center{ order:1; }
  body.game-mobile-view-action #MainLayout > .layout-panel-west{ order:2; margin-top:8px; }
  body.game-mobile-view-action #MainLayout > .layout-panel-east{ order:3; margin-top:8px; }

  body.game-mobile #MainLayout > .layout-panel > .panel,
  body.game-mobile #MainLayout > .layout-panel > .panel > .panel-body,
  body.game-mobile #MainLayout > .layout-panel > .panel-body{
    position:static !important;
    box-sizing:border-box;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    overflow:visible !important;
  }
  body.game-mobile #MainLayout .Panel_w{ background:transparent; }

  body.game-mobile-view-status #MAP_DIV,
  body.game-mobile-view-status #Action_tab,
  body.game-mobile-view-info #PlayerStatus_tab,
  body.game-mobile-view-action #MAP_DIV,
  body.game-mobile-view-action #PlayerStatus_tab{ display:none !important; }
  body.game-mobile.is-sailing.game-mobile-view-action #Action_tab{ display:none !important; }

  #PlayerStatus_tab,
  #Action_tab,
  #PlayerStatus_tab > .tabs-header,
  #Action_tab > .tabs-header,
  #PlayerStatus_tab > .tabs-panels,
  #Action_tab > .tabs-panels,
  #PlayerStatus_tab > .tabs-panels > .panel,
  #Action_tab > .tabs-panels > .panel,
  #PlayerStatus_tab > .tabs-panels > .panel > .panel-body,
  #Action_tab > .tabs-panels > .panel > .panel-body{
    box-sizing:border-box;
    width:100% !important;
    max-width:none !important;
  }
  #PlayerStatus_tab,
  #Action_tab,
  #PlayerStatus_tab > .tabs-panels,
  #Action_tab > .tabs-panels,
  #PlayerStatus_tab > .tabs-panels > .panel,
  #Action_tab > .tabs-panels > .panel,
  #PlayerStatus_tab > .tabs-panels > .panel > .panel-body,
  #Action_tab > .tabs-panels > .panel > .panel-body{ height:auto !important; }
  body.game-mobile-view-info #Action_tab > .tabs-header,
  body.game-mobile-view-action #Action_tab > .tabs-header{ display:none; }
  #PlayerStatus_tab > .tabs-header .tabs-inner{ min-height:44px; display:flex; align-items:center; justify-content:center; }
  /* 手機「狀態」頁：不用分頁，上半部艦長、下半部名聲／經驗同頁呈現（EasyUI 會把未選分頁設為 display:none，這裡強制顯示） */
  body.game-mobile-view-status #PlayerStatus_tab > .tabs-header{ display:none !important; }
  body.game-mobile-view-status #PlayerStatus_tab > .tabs-panels > .panel{ display:block !important; }
  /* 兩個面板各自的海圖背景在交界處會形成接縫，改由外層畫一張連續背景；下半部頂端內距縮小，讓名聲緊接在等級之後 */
  body.game-mobile-view-status #PlayerStatus_tab > .tabs-panels{ background:#E8D9B0 url('images/uw_bg_chart.jpg') no-repeat center top; background-size:cover; }
  body.game-mobile-view-status #Player_Title,
  body.game-mobile-view-status #Lv_Title{ background:transparent; }
  body.game-mobile-view-status #Player_Title .cp-card{ padding-bottom:4px; }
  body.game-mobile-view-status #Lv_Title .cp-card{ padding-top:4px; }
  .cp-card{ width:100%; padding:8px; font-size:13px; }
  .cp-head{ min-height:68px; }
  .cp-row{ min-height:32px; }
  .cp-lv[data-k]{ min-height:58px; }
  /* 等級卡插圖：桌面卡片小用 cover 剛好；手機卡片變寬，cover 會把圖放大超出，改為高度貼齊、靠右完整顯示 */
  .cp-lv[data-k]{ background-size:100% 100%, auto 100%; background-position:center center, right center; }
  .cp-exp{ padding:3px 2px; }

  #MAP_DIV{
    --mobile-map-scale:1;
    position:relative;
    box-sizing:border-box;
    width:100% !important;
    max-width:440px;
    margin:0 auto 8px;
    padding-top:36px;
    overflow:hidden;
    border:1px solid #5a3a1c;
    border-radius:6px;
    background:#E8D9B0 url('images/uw_bg_chart.jpg') center / cover;
    box-shadow:inset 0 0 0 1px #c9a24a,0 2px 5px rgba(60,35,10,.3);
  }
  #MAP_DIV::before{
    content:'世界地圖';
    position:absolute;
    top:0;
    right:0;
    left:0;
    height:34px;
    color:#F6E7C1;
    font-size:14px;
    font-weight:800;
    line-height:34px;
    letter-spacing:.12em;
    text-align:center;
    background:linear-gradient(180deg,#4a2d15,#2a1709);
    border-bottom:2px solid #b8892e;
  }
  #Map_IMG{
    top:36px;
    bottom:auto;
    left:50%;
    transform:translateX(-50%) scale(var(--mobile-map-scale));
    transform-origin:top center;
  }

  #Action_Title,
  #Info_Title{
    box-sizing:border-box;
    width:100%;
    padding:8px;
  }
  #Info_Title{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  #Action_Title::before,
  #Info_Title::before{
    grid-column:1 / -1;
    display:block;
    min-height:34px;
    color:#5A3412;
    font-size:14px;
    font-weight:800;
    line-height:34px;
    letter-spacing:.12em;
    text-align:center;
    border-bottom:1px solid #a8833f;
  }
  #Action_Title::before{ content:'行動'; }
  #Info_Title::before{ content:'航海資訊'; }
  /* 港口設施按鈕常駐（不收合）；點按鈕後設施畫面以抽屜疊在最上層 */
  .mobile-action-facilities{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    padding-top:8px;
  }
  .mobile-action-facilities p,
  #Info_Title p{ margin:0; }
  /* 公海、攔截時城鎮設施按鈕被 jQuery hide()，連同外層 p 一起拿掉，避免格線留空 */
  .mobile-action-facilities p:has(> button[style*="display: none"]){ display:none !important; }
  .mobile-action-facilities button,
  #Info_Title button{
    box-sizing:border-box;
    width:100% !important;
    min-height:48px;
    height:48px !important;
    padding:0 8px 0 20px;
    font-size:16px;
    background-size:100% 100%;
  }

  /* ── 設施抽屜：east 面板平常在行動頁隱藏，開啟時固定全螢幕、由下往上滑出 ──
     航行中（is-sailing）與私掠攔截（is-ambush）不套用，east 面板照舊直接顯示 */
  body.game-mobile-view-action:not(.is-sailing):not(.is-ambush) #MainLayout > .layout-panel-east{ display:none !important; }
  /* 抽屜底部讓出下方工具列（#mobile_game_nav）：上框 2＋上內距 3＋按鈕 56＋下內距 max(3px, 安全區) */
  body.game-mobile-view-action.mobile-facility-open:not(.is-sailing):not(.is-ambush) #MainLayout > .layout-panel-east{
    position:fixed !important;
    inset:0 0 var(--mobile-nav-h) 0 !important;
    z-index:900;
    display:block !important;
    box-sizing:border-box;
    width:100% !important;
    height:auto !important;
    margin:0 !important;
    padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    background:#211106 url('images/map_C6EFFF.gif');
    box-shadow:0 -6px 18px rgba(24,12,3,.55);
    animation:mobileFacilityIn .26s cubic-bezier(.2,.8,.2,1);
  }
  /* easyui 的 east 面板本身就是 .panel，內容在直接子層 .panel-body */
  body.game-mobile-view-action.mobile-facility-open:not(.is-sailing):not(.is-ambush) #MainLayout > .layout-panel-east > .panel-body{
    box-sizing:border-box;
    width:100% !important;
    max-width:520px;
    margin:0 auto;
    padding:0 8px 16px;
    background:#C6EFFF url('images/map_C6EFFF.gif');
    min-height:100%;
  }
  /* 設施名牌黏在抽屜頂端，右側留給關閉鈕 */
  body.game-mobile-view-action.mobile-facility-open:not(.is-sailing):not(.is-ambush) #MainLayout > .layout-panel-east #ACTION_TITLE{
    position:sticky;
    top:0;
    z-index:5;
    padding-right:44px;
    padding-left:44px;
  }
  body.game-mobile.mobile-facility-open:not(.is-sailing):not(.is-ambush){ overflow:hidden; }
  /* easyui 的 .layout 有 position:relative＋z-index:0，會把抽屜關在 #MainLayout 的層級內、被標頭與導覽列蓋住 */
  body.game-mobile-view-action.mobile-facility-open:not(.is-sailing):not(.is-ambush) #MainLayout{ z-index:auto !important; }
  body.game-mobile-view-action.mobile-facility-open:not(.is-sailing):not(.is-ambush) #mobile_facility_close{
    position:fixed;
    top:calc(env(safe-area-inset-top) + 5px);
    right:max(calc(env(safe-area-inset-right) + 14px), calc((100vw - 520px) / 2 + 14px));
    z-index:901;
    display:flex;
    align-items:center;
    justify-content:center;
    width:36px;
    height:36px;
    margin:0;
    padding:0;
    color:#3a2410;
    font-size:16px;
    font-weight:900;
    line-height:1;
    background:linear-gradient(180deg,#f3dd9a,#c99a2e 70%,#a87a1f);
    border:1px solid #5a3a1c;
    border-radius:50%;
    box-shadow:inset 0 0 0 1px rgba(255,245,215,.55),0 2px 5px rgba(0,0,0,.45);
    cursor:pointer;
    touch-action:manipulation;
    animation:mobileFacilityIn .26s cubic-bezier(.2,.8,.2,1);
  }
  #mobile_facility_close:focus-visible{ outline:2px solid #f3dd9a; outline-offset:2px; }

  body.game-mobile-view-action #mobile_fleet_title,
  body.game-mobile-view-action .ship_img_area,
  body.game-mobile-view-action .ship_info_area,
  body.game-mobile-view-action .fleet_clear,
  body.game-mobile-view-action #ingame_chat_panel,
  body.game-mobile-view-fleet #moveing_div,
  body.game-mobile-view-fleet #area_location_info_div,
  body.game-mobile-view-fleet #AT_ENTRY,
  body.game-mobile-view-fleet #ingame_chat_panel,
  body.game-mobile-view-chat #moveing_div,
  body.game-mobile-view-chat #area_location_info_div,
  body.game-mobile-view-chat #mobile_fleet_title,
  body.game-mobile-view-chat .ship_img_area,
  body.game-mobile-view-chat .ship_info_area,
  body.game-mobile-view-chat .fleet_clear,
  body.game-mobile-view-chat #AT_ENTRY{ display:none !important; }

  .loc-card{
    width:100%;
    margin:0 0 8px;
  }
  /* 徽章｜城市名｜物價卡 同一列（同桌面）；物價卡放在橫幅右上，寬度隨螢幕縮放 */
  .loc-hero{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    padding:10px;
  }
  .loc-port-row{ flex-wrap:wrap; gap:2px 6px; }
  .loc-port{ min-width:0; font-size:clamp(17px,5.4vw,24px); letter-spacing:2px; }
  .loc-price{ box-sizing:border-box; width:clamp(104px, 32vw, 128px); align-self:start; padding:5px 7px 6px; }
  .loc-price-top{ gap:4px; }
  .loc-price-top span{ white-space:nowrap; }
  .loc-price-val{ font-size:clamp(15px, 4.6vw, 17px); }
  .loc-price-lb{ white-space:nowrap; }
  .loc-body{ padding:8px; }
  .loc-line{ gap:6px; }
  .loc-lb{ width:52px; }
  .information_title{ width:100%; }

  #moveing_div,
  #MoveShip,
  #MoveShip .information_title,
  .voyage-sea,
  .voyage-track{ box-sizing:border-box; width:100% !important; }
  .voyage-track{ overflow:hidden; background-position:center !important; }
  #AT_ENTRY{ box-sizing:border-box; width:100% !important; max-width:100%; }
  #AT_ENTRY .at-main{ min-width:0; }

  .ship_img_area{
    float:none;
    width:100%;
    height:275px;
    background:#1158B3 url('ship/sea.gif');
  }
  .ship_img_title{ width:100%; min-height:32px; height:32px; line-height:30px; padding-left:8px; }
  #tactics_select{ min-height:26px; }
  #ship_table,
  .ship_table{ margin:0 auto; }
  .ship_info_area{
    float:none;
    width:100%;
    height:auto;
    margin:8px 0 0;
  }
  /* 間距、按鈕高度略收，艦隊頁在一般手機（含試玩橫幅）一個畫面放得下，不出現捲軸 */
  .fi-card{ height:auto; min-height:275px; padding:8px 10px; gap:4px; }
  .fi-row{ min-height:34px; }
  /* 概況三張卡片：項目名稱在左、數值在右，名稱字級與數值相同 */
  .fi-stat{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:4px;
    min-width:0;
    min-height:36px;
    box-sizing:border-box;
    padding:3px 8px;
    text-align:left;
  }
  .fi-stat span{ flex:none; justify-content:flex-start; font-size:15px; font-weight:700; color:#6b4c2c; white-space:nowrap; }
  .fi-stat .cp-ic{ flex:none; width:18px; height:18px; margin-right:4px; background-size:18px 18px; }
  .fi-stat .fi-num{ min-width:0; text-align:right; white-space:nowrap; }
  .fi-row .trashcan_icon,
  .fi-row .List_icon,
  .fi-row .PersonRemove_icon{ width:40px; height:36px; background-size:20px; }
  .fi-icon-space{ width:40px; }

  #ingame_chat_panel{
    width:100%;
    /* 再扣 #MainLayout 上下內距 16px */
    height:calc(100dvh - var(--mobile-chrome-h, 139px) - 16px);
    min-height:420px;
    margin:0;
  }
  #igc_header{ min-height:44px; padding:5px 8px; }
  .igc_tab{ min-height:36px; padding:4px 12px; }
  #igc_box{ padding:8px; font-size:13px; line-height:1.65; }
  #igc_form{ padding:7px 8px; }
  #igc_input,
  #igc_send{ box-sizing:border-box; min-height:44px; font-size:16px; }
  #igc_send{ padding:0 16px; }

  body.game-mobile #MainLayout > .layout-panel-east > .panel > .panel-body{
    display:flex;
    flex-direction:column;
    align-items:stretch;
  }
  #ACTION_TITLE{
    box-sizing:border-box;
    width:100%;
    height:46px;
    padding-top:10px;
    background-size:100% 46px;
    font-size:18px;
  }

  /* 行動設施內容從桌面的 297px 艙室展開為手機可用寬度。 */
  body.game-mobile-view-action #MainLayout > .layout-panel-east #ACTION_TITLE,
  body.game-mobile-view-action #MainLayout > .layout-panel-east .mv-section,
  body.game-mobile-view-action #MainLayout > .layout-panel-east .voy,
  body.game-mobile-view-action #MainLayout > .layout-panel-east .tr-bg,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #TRADE_LIST_BG,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #TRADE_TAB_BG_O,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #YARD_MAIN_DIV,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #YARD_MAIN_MENU,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #BAR_Tab,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #city_dom_panel,
  body.game-mobile-view-action #MainLayout > .layout-panel-east .Battle_out_bg,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #sea_voyage,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #sea_state_card{
    box-sizing:border-box;
    width:100% !important;
    max-width:none !important;
  }
  /* 海域情勢卡片本身有左右 8px margin，用 width:100% 會往右凸出 8px 被截斷，改回 auto 由 margin 內縮 */
  body.game-mobile-view-action #MainLayout > .layout-panel-east #sea_state_card{ width:auto !important; }
  /* 桌面版海上畫面 .Battle_out_bg 為絕對定位，卡片用 margin-top:226px 讓位；手機改為相對定位，不需要讓位 */
  body.game-mobile-view-action #MainLayout > .layout-panel-east .Battle_out_bg ~ #sea_state_card{ margin-top:8px; }
  /* 抽屜已有左右 8px 內距，卡片與上方海上面板對齊 */
  body.game-mobile-view-action.mobile-facility-open #MainLayout > .layout-panel-east #sea_state_card{ margin-left:0; margin-right:0; }
  body.game-mobile-view-action #MainLayout > .layout-panel-east .Battle_out_bg{ position:relative; }
  body.game-mobile-view-action #MainLayout > .layout-panel-east #BAR_Tab > .tabs-header,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #BAR_Tab > .tabs-panels,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #BAR_Tab > .tabs-panels > .panel,
  body.game-mobile-view-action #MainLayout > .layout-panel-east #BAR_Tab > .tabs-panels > .panel > .panel-body,
  body.game-mobile-view-action #MainLayout > .layout-panel-east .BAR_TAB_BG_O{
    box-sizing:border-box;
    width:100% !important;
    max-width:none !important;
  }

  body.game-mobile{ --mobile-nav-h:calc(61px + max(3px, env(safe-area-inset-bottom))); }
  #mobile_game_nav{
    position:fixed;
    right:0;
    bottom:0;
    left:0;
    z-index:850;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    box-sizing:border-box;
    min-height:64px;
    padding:3px max(4px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));
    background:linear-gradient(180deg,#41270f,#211106);
    border-top:2px solid #c9a24a;
    box-shadow:0 -4px 12px rgba(24,12,3,.48);
  }
  #mobile_game_nav button{
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    min-width:0;
    min-height:56px;
    margin:0;
    padding:3px 1px;
    border:1px solid transparent;
    border-radius:4px;
    color:#e3cf9f;
    font-family:Microsoft JhengHei,PingFang TC,sans-serif;
    font-size:11px;
    font-weight:700;
    line-height:1.1;
    letter-spacing:.08em;
    background:transparent;
    cursor:pointer;
  }
  #mobile_game_nav button[aria-current='page']{
    color:#3a2410;
    background:linear-gradient(180deg,#f3dd9a,#c99a2e 70%,#a87a1f);
    border-color:#f3dd9a;
    box-shadow:inset 0 0 0 1px rgba(90,58,28,.55),0 2px 5px rgba(0,0,0,.35);
    text-shadow:0 1px 0 rgba(255,245,215,.6);
  }
  .mobile-nav-icon{
    display:block;
    width:24px;
    height:24px;
    background:transparent no-repeat center / 24px 24px;
  }
  .mobile-nav-status{ background-image:url('images/uw_ic_profile.png'); }
  .mobile-nav-info{ background-image:url('images/uw_ic_map.png'); }
  .mobile-nav-action{ background-image:url('images/uw_ic_anchor.png'); }
  .mobile-nav-fleet{ background-image:url('images/uw_ic_fleetlist.png'); }
  .mobile-nav-chat{ background-image:url('images/uw_ic_news.png'); }
  .mobile-nav-dot,
  .mobile-nav-alert,
  #mobile_chat_badge{
    position:absolute;
    top:4px;
    right:calc(50% - 18px);
    display:none;
    width:7px;
    height:7px;
    border-radius:50%;
    background:#d95b43;
    border:1px solid #F6E7C1;
    box-shadow:0 1px 3px rgba(0,0,0,.5);
  }
  #mobile_chat_badge{ display:none; }
  /* 設施抽屜開啟時工具列仍常駐在最上層，抽屜由工具列後方滑出 */
  body.game-mobile-view-action.mobile-facility-open:not(.is-sailing):not(.is-ambush) #mobile_game_nav{ z-index:902; }
}

@media (max-width:360px){
  .mobile-head-money{ min-width:98px; }
  #Action_Title,
  #Info_Title{ padding:7px; }
  #Info_Title,
  .mobile-action-facilities{ gap:6px; }
  .mobile-action-facilities button,
  #Info_Title button{ font-size:15px; padding-left:15px; }
  #mobile_game_nav button{ font-size:10px; letter-spacing:0; }
  .fi-stat{ padding:4px 6px; gap:2px; }
  .fi-stat .cp-ic{ width:16px; height:16px; margin-right:2px; background-size:16px 16px; }
}
/* 極窄螢幕（≤340px）概況卡片放不下圖示＋三位數，收掉圖示保留名稱與數值 */
@media (max-width:340px){
  .fi-stat .cp-ic{ display:none; }
}

@media (pointer:coarse) and (max-width:767px), (pointer:coarse) and (max-height:520px){
  #Action_Title button,
  #Info_Title button,
  #mobile_game_nav button,
  #mobile_game_header button{ touch-action:manipulation; }
}

@media (prefers-reduced-motion:reduce){
  #Map_IMG,
  #mobile_game_nav button{ transition:none; }
  body.mobile-facility-open #MainLayout > .layout-panel-east,
  body.mobile-facility-open #mobile_facility_close{ animation:none !important; }
}
.pb-rank-row span:first-child{ color:#8a5a00; font-weight:700; }
.pb-rank-row span:nth-child(2){ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pb-none{ color:#7a5c3a; padding:4px 0; }
.pb-foot{ margin-top:8px; font-size:11px; color:#8a7a62; }

/* ── 寶藏島臨時貨棧（page.Action.Trade.php／corejs/Treasure.js；docs/PRD_寶藏地點.md 8.2）── */
.ts-depot{ height:auto; min-height:250px; }
.ts-head{ flex:none; padding:4px 7px; border-radius:3px; background:linear-gradient(180deg,#4a2d15,#2a1709); border:1px solid #8a6a3a; color:#e8d6b0; }
.ts-title{ display:flex; justify-content:space-between; align-items:baseline; gap:6px; }
.ts-title b{ font-size:13px; color:#f6d77a; text-shadow:1px 1px 1px rgba(20,10,0,.8); }
.ts-title span{ font-size:10px; color:#c9b48a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ts-prog{ display:flex; align-items:center; gap:6px; margin-top:3px; font-size:10px; color:#c9b48a; }
.ts-bar{ flex:1; height:5px; border-radius:3px; background:rgba(0,0,0,.45); overflow:hidden; }
.ts-bar i{ display:block; height:100%; background:linear-gradient(90deg,#c9a24a,#f6d77a); }
.ts-meta{ display:flex; justify-content:space-between; margin-top:2px; font-size:10px; color:#c9b48a; }
.ts-row{ cursor:default; }
.ts-tier{ background:#7d7468; }
.ts-tier.ts-mid{ background:#4d6a1e; }
.ts-tier.ts-high{ background:#b8892e; }
.ts-buy{ display:flex; align-items:center; gap:4px; margin-top:2px; }
.ts-qty{ width:64px; height:18px; padding:0 3px; font-size:11px; border:1px solid #c9a86a; border-radius:3px; background:#fffaf0; }
.ts-btn{ cursor:pointer; padding:1px 8px; border-radius:3px; font-size:11px; font-weight:700; color:#fff !important; text-decoration:none !important; background:linear-gradient(180deg,#c9a24a,#8a6a2a); border:1px solid #6a4a1a; }
.ts-btn.is-off{ opacity:.45; cursor:not-allowed; }
.ts-btn.is-busy{ opacity:.6; }
.ts-wait{ flex:none; font-size:11px; color:#5A3412; text-align:center; padding:2px; }
.ts-note{ flex:none; font-size:10px; color:#5A3412; line-height:1.4; padding:2px 4px; border-radius:3px; background:rgba(255,249,232,.7); }
.tr-tag-treasure{ background:#b8892e; }
.mv-treasure-tag{ font-style:normal; margin-left:4px; padding:0 5px; border-radius:3px; font-size:9px; font-weight:700; color:#fff; background:#b8892e; }

/* ── 私人船塢：遠洋探勘、交易品代售（corejs/Dockyard.js）── */
.dk-exp-sea{ display:grid; grid-template-columns:repeat(3,1fr); gap:4px; }
.dk-exp-sea a{ cursor:pointer; display:flex; flex-direction:column; align-items:center; padding:4px 2px; border-radius:4px; font-size:11px; color:#5A3412 !important; text-decoration:none !important; background:#fbf3df; border:1px solid #c9a86a; }
.dk-exp-sea a small{ font-size:9px; color:#7a5c3a; }
.dk-exp-sea a.is-on{ background:#f6d77a; border-color:#8a5a00; box-shadow:inset 0 0 0 1px #c9a24a; }
.dk-exp-pick{ cursor:pointer; }
.dk-exp-pick input{ margin-right:4px; vertical-align:middle; }
.dk-exp-sum{ display:grid; grid-template-columns:1fr 1fr; gap:2px 10px; font-size:11px; color:#5A3412; margin:6px 0; }
.dk-exp-sum b{ color:#3b2412; }
.dk-exp-sum .is-bad{ color:#8f1f12; }
.dk-exp-active{ font-size:12px; color:#5A3412; line-height:1.7; }
.dk-exp-cd{ font-size:16px; font-weight:700; color:#8a5a00; font-variant-numeric:tabular-nums; }
.dk-rep{ padding:5px 7px; margin-bottom:4px; border-radius:3px; background:rgba(255,249,232,.85); border:1px solid #c9a86a; font-size:11px; color:#5A3412; line-height:1.5; }
.dk-rep b{ color:#3b2412; }
.dk-rep.is-new{ border-color:#b8892e; box-shadow:0 0 0 1px #f6d77a inset; }
.dk-rep small{ color:#8a7a62; }
.dk-cs-row{ display:flex; align-items:center; gap:6px; }
.dk-cs-row select, .dk-cs-row input{ height:22px; font-size:12px; }
.cg-badge.cg-badge-treasure{ color:#fff; background:#b8892e; } /* 載運中的交易品：寶藏商品 */
