MediaWiki:Common.css:修訂間差異

出自眾神廳
跳至導覽 跳至搜尋
無編輯摘要
無編輯摘要
第2行: 第2行:
   Encyclato 資訊面板
   Encyclato 資訊面板
   維基風格・靠右・分隔版
   維基風格・靠右・分隔版
   請用這份完整取代舊的資訊面板 CSS
   適用:國家、艦級、裝甲車輛等所有 encyclato-infobox
========================================================= */
========================================================= */


/* -------------------------
/* ---------- 1. 面板本體 ---------- */
  1. 資訊面板本體
------------------------- */
 
table.encyclato-infobox {
table.encyclato-infobox {
     float: right !important;
     float: right !important;
     clear: right !important;
     clear: right !important;
     width: 22em;
     width: 22em;
     max-width: calc(100% - 1em);
     max-width: calc(100% - 1em);
     margin: 0 0 1em 1.25em !important;
     margin: 0 0 1em 1.25em !important;
     border: 1px solid #a2a9b1;
     border: 1px solid #a2a9b1;
     border-collapse: collapse;
     border-collapse: collapse;
     border-spacing: 0;
     border-spacing: 0;
     background: #f8f9fa;
     background: #f8f9fa;
     color: #202122;
     color: #202122;
     font-size: 90%;
     font-size: 90%;
     line-height: 1.24;
     line-height: 1.24;
     box-sizing: border-box;
     box-sizing: border-box;
}
}


/* -------------------------
table.encyclato-infobox + table.encyclato-infobox {
  2. 主標題
    clear: right;
------------------------- */
}


/* ---------- 2. 主標題 ---------- */
table.encyclato-infobox > caption {
table.encyclato-infobox > caption {
     padding: 0.55em 0.6em;
     padding: 0.55em 0.6em;
     border: 1px solid #a2a9b1;
     border: 1px solid #a2a9b1;
     border-bottom: 0;
     border-bottom: 0;
     background: #f8f9fa;
     background: #f8f9fa;
    color: #202122;
     font-size: 125%;
     font-size: 125%;
     font-weight: 700;
     font-weight: 700;
第55行: 第43行:
}
}


/* -------------------------
/* ---------- 3. 一般儲存格 ---------- */
  3. 一般儲存格
------------------------- */
 
table.encyclato-infobox > tbody > tr > th,
table.encyclato-infobox > tbody > tr > th,
table.encyclato-infobox > tbody > tr > td {
table.encyclato-infobox > tbody > tr > td {
     box-sizing: border-box;
     box-sizing: border-box;
     padding: 0.10em 0.48em;
     padding: 0.10em 0.48em;
     border-bottom: 1px solid #eaecf0;
     border-bottom: 1px solid #eaecf0;
    vertical-align: middle;
}


     vertical-align: middle;
table.encyclato-infobox > tbody > tr:last-child > th,
table.encyclato-infobox > tbody > tr:last-child > td {
     border-bottom: 0;
}
}


/* -------------------------
/* 資料列 */
  4. 左側欄名
table.encyclato-infobox > tbody > tr.infobox-row > th,
------------------------- */
table.encyclato-infobox > tbody > tr.infobox-row > td {
    padding-top: 0.10em;
    padding-bottom: 0.14em;
    line-height: 1.24;
}


/* ---------- 4. 欄名與內容 ---------- */
table.encyclato-infobox > tbody > tr > th.infobox-label {
table.encyclato-infobox > tbody > tr > th.infobox-label {
     width: 38%;
     width: 38%;
 
    border-right: 1px solid #eaecf0;
     background: #f8f9fa;
     background: #f8f9fa;
     font-weight: 600;
     font-weight: 600;
     text-align: center;
     text-align: center;
    border-right: 1px solid #eaecf0;
}
}


/* 右側內容 */
table.encyclato-infobox > tbody > tr > th.infobox-label + td {
table.encyclato-infobox > tbody > tr > th.infobox-label + td {
     width: 62%;
     width: 62%;
     background: #ffffff;
     background: #ffffff;
     text-align: left;
     text-align: left;
     overflow-wrap: anywhere;
     overflow-wrap: anywhere;
}
}


/* 二字、三字、四字欄名整齊排版 */
/* 四字以內欄名兩端對齊 */
table.encyclato-infobox .infobox-label-text {
table.encyclato-infobox .infobox-label-text {
     display: inline-block;
     display: inline-block;
     width: 4em;
     width: 4em;
     text-align: justify;
     text-align: justify;
     text-align-last: justify;
     text-align-last: justify;
     text-justify: inter-character;
     text-justify: inter-character;
     white-space: nowrap;
     white-space: nowrap;
}
}


/* 動態欄名不要硬撐四字 */
/* 動態欄名(職稱、建立事件)允許換行 */
table.encyclato-infobox > tbody > tr > th.infobox-label-dynamic {
table.encyclato-infobox > tbody > tr > th.infobox-label-dynamic {
     white-space: normal;
     white-space: normal;
第114行: 第97行:
}
}


/* -------------------------
/* ---------- 5. 區塊標題 ---------- */
  5. 大分類標題
/* 上框線同時充當上一區塊最後一列的底線 */
------------------------- */
 
table.encyclato-infobox > tbody > tr > th.infobox-section {
table.encyclato-infobox > tbody > tr > th.infobox-section {
    width: auto;
     padding: 0.34em 0.55em;
 
     border-top: 1px solid #a2a9b1;
     padding: 0.28em 0.55em;
 
     border-top: 0;
     border-bottom: 1px solid #a2a9b1;
     border-bottom: 1px solid #a2a9b1;
     background: #eaecf0;
     background: #eaecf0;
    color: #202122;
     font-weight: 700;
     font-weight: 700;
     text-align: center;
     text-align: center;
     letter-spacing: 0.05em;
     letter-spacing: 0.05em;
}
}
/* -------------------------
  6. 次級分類
  例如人物公職名稱
------------------------- */


table.encyclato-infobox > tbody > tr > th.infobox-subsection {
table.encyclato-infobox > tbody > tr > th.infobox-subsection {
     padding: 0.24em 0.55em;
     padding: 0.24em 0.55em;
 
     border-top: 1px solid #a2a9b1;
     border-top: 0;
     border-bottom: 1px solid #c8ccd1;
     border-bottom: 1px solid #c8ccd1;
     background: #f1f3f5;
     background: #f1f3f5;
     font-weight: 700;
     font-weight: 700;
     text-align: center;
     text-align: center;
}
}


/* -------------------------
/* ---------- 6. 國旗與國徽 ---------- */
  7. 國旗與國徽
------------------------- */
 
table.encyclato-infobox > tbody > tr.infobox-symbol-row > td {
table.encyclato-infobox > tbody > tr.infobox-symbol-row > td {
     width: 50%;
     width: 50%;
     padding: 0.4em 0.4em 0.35em;
     padding: 0.4em 0.4em 0.35em;
     background: #ffffff;
     background: #ffffff;
     text-align: center;
     text-align: center;
     vertical-align: middle;
     vertical-align: middle;
第172行: 第133行:
table.encyclato-infobox .infobox-symbol-name {
table.encyclato-infobox .infobox-symbol-name {
     display: block;
     display: block;
     margin-bottom: 0.3em;
     margin-bottom: 0.3em;
     font-weight: 600;
     font-weight: 600;
    text-align: center;
}
}


table.encyclato-infobox .infobox-symbol-media {
table.encyclato-infobox .infobox-symbol-media {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
     line-height: 0;
     line-height: 0;
     text-align: center;
     text-align: center;
第195行: 第144行:
table.encyclato-infobox .infobox-symbol-media img {
table.encyclato-infobox .infobox-symbol-media img {
     display: inline-block;
     display: inline-block;
    vertical-align: middle;
}


    max-width: 100%;
/* 移除 MediaWiki 自動插入的多餘段落與換行 */
    max-height: none;
table.encyclato-infobox > tbody > tr.infobox-symbol-row p {
 
    width: auto;
    height: auto;
 
     margin: 0;
     margin: 0;
     padding: 0;
     padding: 0;
}


     vertical-align: middle;
table.encyclato-infobox > tbody > tr.infobox-symbol-row br:first-child,
table.encyclato-infobox > tbody > tr.infobox-symbol-row br:last-child {
     display: none;
}
}


/* -------------------------
/* ---------- 7. 圖像 ---------- */
  8. 地圖、人物圖像
------------------------- */
 
table.encyclato-infobox .infobox-wide-image,
table.encyclato-infobox .infobox-wide-image,
table.encyclato-infobox .infobox-image-cell {
table.encyclato-infobox .infobox-image-cell {
     background: #ffffff;
     background: #ffffff;
     text-align: center;
     text-align: center;
     vertical-align: middle;
     vertical-align: middle;
}
}
table.encyclato-infobox .infobox-wide-image img,
table.encyclato-infobox .infobox-image-cell img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
/* -------------------------
  9. 簽名
------------------------- */


table.encyclato-infobox .infobox-signature-cell {
table.encyclato-infobox .infobox-signature-cell {
     background: #ffffff;
     background: #ffffff;
     text-align: center;
     text-align: center;
     vertical-align: middle;
     vertical-align: middle;
第242行: 第175行:
     max-width: 150px;
     max-width: 150px;
     max-height: 80px;
     max-height: 80px;
    width: auto;
}


     width: auto;
table.encyclato-infobox img {
     max-width: 100%;
     height: auto;
     height: auto;
}
}


/* -------------------------
/* ---------- 8. 跨欄內容與備註 ---------- */
  10. 備註
/* 跨兩欄的清單內容,例如艦艇或車輛的變體 */
------------------------- */
table.encyclato-infobox .infobox-wide-cell {
    padding: 0.3em 0.55em;
    background: #ffffff;
    text-align: left;
}


table.encyclato-infobox .infobox-note {
table.encyclato-infobox .infobox-note {
     padding: 0.55em 0.65em;
     padding: 0.55em 0.65em;
     background: #ffffff;
     background: #ffffff;
     font-size: 85%;
     font-size: 85%;
}
}


/* -------------------------
/* ---------- 9. 儲存格內的段落與清單 ---------- */
  11. 空白列
table.encyclato-infobox th p,
------------------------- */
table.encyclato-infobox td p {
 
     margin: 0;
table.encyclato-infobox > tbody > tr.infobox-hidden {
     display: none !important;
}
}


/* -------------------------
table.encyclato-infobox th ul,
  12. 圖片保護
table.encyclato-infobox th ol,
------------------------- */
table.encyclato-infobox td ul,
 
table.encyclato-infobox td ol {
table.encyclato-infobox img {
     margin-top: 0.15em;
     max-width: 100%;
     margin-bottom: 0.15em;
     height: auto;
}
}


/* -------------------------
/* ---------- 10. 空白列 ---------- */
  13. 連續資訊面板
table.encyclato-infobox > tbody > tr.infobox-hidden {
------------------------- */
     display: none !important;
 
table.encyclato-infobox + table.encyclato-infobox {
     clear: right;
}
}


/* -------------------------
/* ---------- 11. 窄螢幕(保持靠右浮動)---------- */
  14. 窄螢幕
  注意:不再取消 float
  因此不會突然跑到正文正上方
------------------------- */
 
@media screen and (max-width: 520px) {
@media screen and (max-width: 520px) {
     table.encyclato-infobox {
     table.encyclato-infobox {
        float: right !important;
        clear: right !important;
         width: 21em;
         width: 21em;
         max-width: calc(100% - 0.5em);
         max-width: calc(100% - 0.5em);
         margin: 0 0 1em 0.75em !important;
         margin: 0 0 1em 0.75em !important;
     }
     }
第311行: 第234行:
     table.encyclato-infobox > tbody > tr > th.infobox-label + td {
     table.encyclato-infobox > tbody > tr > th.infobox-label + td {
         width: 61%;
         width: 61%;
    }
}
/* -------------------------
  15. 儲存格內多餘下方空白修正
------------------------- */
/* 一般文字不要額外撐高 */
table.encyclato-infobox > tbody > tr > th,
table.encyclato-infobox > tbody > tr > td {
    min-height: 0;
}
/* 若儲存格裡有段落,移除段落預設上下邊距 */
table.encyclato-infobox > tbody > tr > th p,
table.encyclato-infobox > tbody > tr > td p {
    margin: 0;
}
/* 清單若出現在資訊框內,避免上下多留一截 */
table.encyclato-infobox > tbody > tr > th ul,
table.encyclato-infobox > tbody > tr > th ol,
table.encyclato-infobox > tbody > tr > td ul,
table.encyclato-infobox > tbody > tr > td ol {
    margin-top: 0.15em;
    margin-bottom: 0.15em;
}
/* 最後一列不再多畫底線 */
table.encyclato-infobox > tbody > tr:last-child > th,
table.encyclato-infobox > tbody > tr:last-child > td {
    border-bottom: 0;
}
/* =========================================================
  國旗/國徽空白高度最終修正
========================================================= */
table.encyclato-infobox > tbody > tr.infobox-symbol-row p {
    margin: 0;
    padding: 0;
}
table.encyclato-infobox > tbody > tr.infobox-symbol-row br:first-child,
table.encyclato-infobox > tbody > tr.infobox-symbol-row br:last-child {
    display: none;
}
/* =========================================================
  一般欄位緊湊化
  只縮短「通稱 / 別稱 / 國家狀態 / 首都 / 政體」這類資料列
  不影響國旗、國徽、地圖、人物照片
========================================================= */
table.encyclato-infobox > tbody > tr.infobox-row > th,
table.encyclato-infobox > tbody > tr.infobox-row > td {
    padding-top: 0.08em !important;
    padding-bottom: 0.08em !important;
    line-height: 1.22;
}
table.encyclato-infobox > tbody > tr.infobox-row > th.infobox-label {
    min-height: 0;
}
table.encyclato-infobox > tbody > tr.infobox-row > td {
    min-height: 0;
}
/* =========================================================
  區塊緊貼修正
  讓上一區最後一列直接接到下一個區段標題
========================================================= */
table.encyclato-infobox > tbody > tr > th.infobox-section,
table.encyclato-infobox > tbody > tr > th.infobox-subsection {
    border-top: 0 !important;
    margin-top: 0 !important;
}
/* 區段標題本身不額外製造外部空隙 */
table.encyclato-infobox > tbody > tr.infobox-section-row,
table.encyclato-infobox > tbody > tr.infobox-symbol-heading {
    margin: 0 !important;
    padding: 0 !important;
}
/* =========================================================
  區塊銜接最終版
  目的:
  1. 不再用 box-shadow 往上蓋,避免遮到上一列文字
  2. 每個區塊最後一列多一點下方空間
  3. 每個區塊最後一列增加清楚的底線
  4. 下一個區塊標題直接銜接,不留白縫
========================================================= */
/* 所有大區塊標題都直接接在上一列後面 */
table.encyclato-infobox > tbody > tr.infobox-section-row > th.infobox-section,
table.encyclato-infobox > tbody > tr.infobox-symbol-heading > th.infobox-section {
    border-top: 0 !important;
    box-shadow: none !important;
    margin-top: 0 !important;
}
/* 次級區塊亦同 */
table.encyclato-infobox > tbody > tr > th.infobox-subsection {
    border-top: 0 !important;
    box-shadow: none !important;
}
/* 每個區塊第一列不要被上一個分隔規則擠出空白 */
table.encyclato-infobox > tbody > tr.infobox-section-row + tr > th,
table.encyclato-infobox > tbody > tr.infobox-section-row + tr > td,
table.encyclato-infobox > tbody > tr.infobox-symbol-heading + tr > th,
table.encyclato-infobox > tbody > tr.infobox-symbol-heading + tr > td {
    margin-top: 0 !important;
}
/* 保證表格儲存格之間完全沒有 spacing */
table.encyclato-infobox {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}
/* =========================================================
  MediaWiki 相容的區塊分隔
  不使用 :has(),避免 CSS 驗證錯誤
========================================================= */
/*
* 因為 CSS 無法在不使用 :has() 的情況下
* 自動選中「下一個區塊前的最後一列」,
* 所以改成把分隔線畫在下一個區塊標題的最上方。
* 視覺效果等同於上一區最後一列的底線。
*/
table.encyclato-infobox > tbody > tr.infobox-section-row > th.infobox-section,
table.encyclato-infobox > tbody > tr.infobox-symbol-heading > th.infobox-section,
table.encyclato-infobox > tbody > tr > th.infobox-subsection {
    border-top: 1px solid #a2a9b1 !important;
    box-shadow: none !important;
    margin-top: 0 !important;
}
/* 區塊標題留一點呼吸空間,但不產生白縫 */
table.encyclato-infobox > tbody > tr.infobox-section-row > th.infobox-section,
table.encyclato-infobox > tbody > tr.infobox-symbol-heading > th.infobox-section {
    padding-top: 0.34em !important;
    padding-bottom: 0.34em !important;
}
/* 一般資料列保留足夠字體高度,避免被分隔線壓到 */
table.encyclato-infobox > tbody > tr.infobox-row > th,
table.encyclato-infobox > tbody > tr.infobox-row > td {
    padding-top: 0.10em !important;
    padding-bottom: 0.14em !important;
    line-height: 1.24 !important;
}
/* 表格儲存格之間不留額外 spacing */
table.encyclato-infobox {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}
/* Template:歷史朝代資訊面板/styles.css */
table.dynasty-info-table {
    width: 100%;
    margin: 1em 0;
    border: 1px solid #a2a9b1;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    color: #202122;
    font-size: 95%;
    line-height: 1.45;
}
table.dynasty-info-table > caption {
    padding: 0.55em 0.7em;
    border: 1px solid #a2a9b1;
    border-bottom: 0;
    background: #eaecf0;
    font-size: 125%;
    font-weight: 700;
    text-align: center;
}
table.dynasty-info-table > tbody > tr > th,
table.dynasty-info-table > tbody > tr > td {
    padding: 0.42em 0.6em;
    border: 1px solid #c8ccd1;
    vertical-align: middle;
}
table.dynasty-info-table > tbody > tr.dynasty-info-head > th {
    background: #eaecf0;
    font-weight: 700;
    text-align: center;
}
table.dynasty-info-table .dynasty-col-period {
    width: 12%;
}
table.dynasty-info-table .dynasty-col-name {
    width: 16%;
}
table.dynasty-info-table .dynasty-col-date {
    width: 19%;
}
table.dynasty-info-table .dynasty-col-story {
    width: 53%;
}
table.dynasty-info-table .dynasty-period {
    background: #f1f3f5;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}
table.dynasty-info-table .dynasty-name {
    background: #fff;
    font-weight: 600;
    text-align: center;
}
table.dynasty-info-table .dynasty-date {
    background: #fff;
    text-align: center;
    white-space: nowrap;
}
table.dynasty-info-table .dynasty-story {
    background: #fff;
    text-align: left;
}
table.dynasty-info-table > tbody > tr.dynasty-data-row:hover > td,
table.dynasty-info-table > tbody > tr.dynasty-data-row:hover > th {
    background-color: #f8f9fa;
}
table.dynasty-info-table > tbody > tr.dynasty-hidden {
    display: none;
}
@media screen and (max-width: 720px) {
    table.dynasty-info-table {
        font-size: 90%;
    }
    table.dynasty-info-table > tbody > tr > th,
    table.dynasty-info-table > tbody > tr > td {
        padding: 0.34em 0.4em;
    }
    table.dynasty-info-table .dynasty-date {
        white-space: normal;
     }
     }
}
}

2026年9月18日 (五) 09:21的版本

/* =========================================================
   Encyclato 資訊面板
   維基風格・靠右・分隔版
   適用:國家、艦級、裝甲車輛等所有 encyclato-infobox
========================================================= */

/* ---------- 1. 面板本體 ---------- */
table.encyclato-infobox {
    float: right !important;
    clear: right !important;
    width: 22em;
    max-width: calc(100% - 1em);
    margin: 0 0 1em 1.25em !important;
    border: 1px solid #a2a9b1;
    border-collapse: collapse;
    border-spacing: 0;
    background: #f8f9fa;
    color: #202122;
    font-size: 90%;
    line-height: 1.24;
    box-sizing: border-box;
}

table.encyclato-infobox + table.encyclato-infobox {
    clear: right;
}

/* ---------- 2. 主標題 ---------- */
table.encyclato-infobox > caption {
    padding: 0.55em 0.6em;
    border: 1px solid #a2a9b1;
    border-bottom: 0;
    background: #f8f9fa;
    font-size: 125%;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

table.encyclato-infobox .infobox-native-name {
    font-size: 80%;
    font-weight: 400;
}

/* ---------- 3. 一般儲存格 ---------- */
table.encyclato-infobox > tbody > tr > th,
table.encyclato-infobox > tbody > tr > td {
    box-sizing: border-box;
    padding: 0.10em 0.48em;
    border-bottom: 1px solid #eaecf0;
    vertical-align: middle;
}

table.encyclato-infobox > tbody > tr:last-child > th,
table.encyclato-infobox > tbody > tr:last-child > td {
    border-bottom: 0;
}

/* 資料列 */
table.encyclato-infobox > tbody > tr.infobox-row > th,
table.encyclato-infobox > tbody > tr.infobox-row > td {
    padding-top: 0.10em;
    padding-bottom: 0.14em;
    line-height: 1.24;
}

/* ---------- 4. 欄名與內容 ---------- */
table.encyclato-infobox > tbody > tr > th.infobox-label {
    width: 38%;
    border-right: 1px solid #eaecf0;
    background: #f8f9fa;
    font-weight: 600;
    text-align: center;
}

table.encyclato-infobox > tbody > tr > th.infobox-label + td {
    width: 62%;
    background: #ffffff;
    text-align: left;
    overflow-wrap: anywhere;
}

/* 四字以內欄名兩端對齊 */
table.encyclato-infobox .infobox-label-text {
    display: inline-block;
    width: 4em;
    text-align: justify;
    text-align-last: justify;
    text-justify: inter-character;
    white-space: nowrap;
}

/* 動態欄名(職稱、建立事件)允許換行 */
table.encyclato-infobox > tbody > tr > th.infobox-label-dynamic {
    white-space: normal;
    line-height: 1.35;
}

/* ---------- 5. 區塊標題 ---------- */
/* 上框線同時充當上一區塊最後一列的底線 */
table.encyclato-infobox > tbody > tr > th.infobox-section {
    padding: 0.34em 0.55em;
    border-top: 1px solid #a2a9b1;
    border-bottom: 1px solid #a2a9b1;
    background: #eaecf0;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.05em;
}

table.encyclato-infobox > tbody > tr > th.infobox-subsection {
    padding: 0.24em 0.55em;
    border-top: 1px solid #a2a9b1;
    border-bottom: 1px solid #c8ccd1;
    background: #f1f3f5;
    font-weight: 700;
    text-align: center;
}

/* ---------- 6. 國旗與國徽 ---------- */
table.encyclato-infobox > tbody > tr.infobox-symbol-row > td {
    width: 50%;
    padding: 0.4em 0.4em 0.35em;
    background: #ffffff;
    text-align: center;
    vertical-align: middle;
}

table.encyclato-infobox > tbody > tr.infobox-symbol-row > td + td {
    border-left: 1px solid #eaecf0;
}

table.encyclato-infobox .infobox-symbol-name {
    display: block;
    margin-bottom: 0.3em;
    font-weight: 600;
}

table.encyclato-infobox .infobox-symbol-media {
    line-height: 0;
    text-align: center;
}

table.encyclato-infobox .infobox-symbol-media img {
    display: inline-block;
    vertical-align: middle;
}

/* 移除 MediaWiki 自動插入的多餘段落與換行 */
table.encyclato-infobox > tbody > tr.infobox-symbol-row p {
    margin: 0;
    padding: 0;
}

table.encyclato-infobox > tbody > tr.infobox-symbol-row br:first-child,
table.encyclato-infobox > tbody > tr.infobox-symbol-row br:last-child {
    display: none;
}

/* ---------- 7. 圖像 ---------- */
table.encyclato-infobox .infobox-wide-image,
table.encyclato-infobox .infobox-image-cell {
    background: #ffffff;
    text-align: center;
    vertical-align: middle;
}

table.encyclato-infobox .infobox-signature-cell {
    background: #ffffff;
    text-align: center;
    vertical-align: middle;
}

table.encyclato-infobox .infobox-signature-cell img {
    max-width: 150px;
    max-height: 80px;
    width: auto;
}

table.encyclato-infobox img {
    max-width: 100%;
    height: auto;
}

/* ---------- 8. 跨欄內容與備註 ---------- */
/* 跨兩欄的清單內容,例如艦艇或車輛的變體 */
table.encyclato-infobox .infobox-wide-cell {
    padding: 0.3em 0.55em;
    background: #ffffff;
    text-align: left;
}

table.encyclato-infobox .infobox-note {
    padding: 0.55em 0.65em;
    background: #ffffff;
    font-size: 85%;
}

/* ---------- 9. 儲存格內的段落與清單 ---------- */
table.encyclato-infobox th p,
table.encyclato-infobox td p {
    margin: 0;
}

table.encyclato-infobox th ul,
table.encyclato-infobox th ol,
table.encyclato-infobox td ul,
table.encyclato-infobox td ol {
    margin-top: 0.15em;
    margin-bottom: 0.15em;
}

/* ---------- 10. 空白列 ---------- */
table.encyclato-infobox > tbody > tr.infobox-hidden {
    display: none !important;
}

/* ---------- 11. 窄螢幕(保持靠右浮動)---------- */
@media screen and (max-width: 520px) {
    table.encyclato-infobox {
        width: 21em;
        max-width: calc(100% - 0.5em);
        margin: 0 0 1em 0.75em !important;
    }

    table.encyclato-infobox > caption {
        font-size: 120%;
    }

    table.encyclato-infobox > tbody > tr > th.infobox-label {
        width: 39%;
    }

    table.encyclato-infobox > tbody > tr > th.infobox-label + td {
        width: 61%;
    }
}