@charset "UTF-8";

@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@300;400;700&family=Noto+Sans+JP:wght@400;700&family=Rosarivo&family=Zen+Old+Mincho&display=swap");

/* --- Adjustment --- */

/* ==========================================================================
   1. 基本設定・変数
   ========================================================================== */

:root {
    /* --- Adjustment --- */
    --font-head: 'Barlow Semi Condensed', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --font-size-base: clamp(14px, 3.5vw, 16px);

    /* --- Adjustment --- */
    --c-bg-main: #121214;
    /* --- Adjustment --- */
    --c-bg-panel: rgba(20, 20, 25, 0.95);
    /* --- Adjustment --- */
    --c-text-main: #e0e0e3;
    /* --- Adjustment --- */
    --c-text-muted: #888890;
    /* --- Adjustment --- */

    /* --- Adjustment --- */
    --c-accent-cyan: #07aee5;
    /* --- Adjustment --- */
    --c-accent-purple: #9d46ff;
    /* --- Adjustment --- */

    /* --- Adjustment --- */
    --c-border-grid: rgba(7, 174, 229, 0.4);
    /* --- Adjustment --- */
    --c-border-glow: 0 0 5px rgba(7, 174, 229, 0.3);
    /* 逋ｺ蜈牙柑譫・*/
    --shadow-glow-cyan: 0 0 5px rgba(7, 174, 229, 0.15);
    --shadow-glow-purple: 0 0 5px rgba(157, 70, 255, 0.15);

    /* --- Adjustment --- */
    --c-bg-form: rgba(0, 0, 0, 0.3);

    /* --- Adjustment --- */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;

    /* --- Adjustment --- */
    --fwc: 12px;
    /* 蜈ｨ隗・譁・ｭ礼嶌蠖難ｼ・C蝓ｺ貅厄ｼ・*/

    /* --- Adjustment --- */
    --w-2ch-tight: calc(var(--fwc) * 2 + 4px);
    /* 2譁・ｭ・菴咏區 */
    --w-3ch: calc(var(--fwc) * 3);
    --w-4ch: calc(var(--fwc) * 4);
    --w-5ch: calc(var(--fwc) * 5);
    --w-6ch: calc(var(--fwc) * 6);
    --w-8ch: calc(var(--fwc) * 8);
    --w-9ch: calc(var(--fwc) * 9);
    --w-10ch: calc(var(--fwc) * 10);
    --w-trash: 20px;
    /* --- Adjustment --- */

    /* 菴ｿ逕ｨ蛻暦ｼ・蛻礼岼・臥畑・壽ｮｵ髫守ｸｮ蟆丞ｮ夂ｾｩ */
    --col-use-8: calc(var(--fwc) * 8);
    --col-use-7: calc(var(--fwc) * 7);
    --col-use-6: calc(var(--fwc) * 6);
    --col-use-5: calc(var(--fwc) * 5);
    --col-use-4: calc(var(--fwc) * 4);
    --col-use-3: calc(var(--fwc) * 3);

    /* 蛻､螳壼・・・蛻礼岼・臥畑・壽ｮｵ髫守ｸｮ蟆丞ｮ夂ｾｩ */
    --col-judge-10: calc(var(--fwc) * 10);
    --col-judge-9: calc(var(--fwc) * 9);
    --col-judge-8: calc(var(--fwc) * 8);
    --col-judge-7: calc(var(--fwc) * 7);
    --col-judge-6: calc(var(--fwc) * 6);
    --col-judge-5: calc(var(--fwc) * 5);
    --col-judge-4: calc(var(--fwc) * 4);

    /* --- Adjustment --- */
    --vehicle-charge-use-width: var(--col-use-8);
    --vehicle-charge-judge-width: var(--col-judge-9);
    --item-use-width: var(--col-use-7);
    --item-judge-width: var(--col-judge-8);

    /* --- Adjustment --- */
    --table-width-full: 100%;
    --table-width-half: 376px;
    --table-width-long: 452px;
    --table-width-short: 300px;
    --table-width-display: 532px;

    /* --- Adjustment --- */
    --c-bg-glass: rgba(18, 18, 20, 0.75);
    --c-border-glass: rgba(255, 255, 255, 0.12);
    --blur-glass: blur(12px) saturate(180%);

    /* --- Adjustment --- */
    --c-neon-cyan: #00f3ff;
    --c-neon-purple: #bc00ff;
    --c-academia-border: rgba(84, 193, 249, 0.4);
}

/* --- Adjustment --- */

/* ==========================================================================
   2. リセット・ベーススタイル
   ========================================================================== */

@import url("input_modules.css");

/* --- Adjustment --- */
body {
    font-family: var(--font-body);
    background-color: var(--c-bg-main);
    color: var(--c-text-main);
    /* --- Adjustment --- */
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;

    /* --- Adjustment --- */
    padding-top: calc(44px + 64px);
}

@media (max-width: 768px) {
    body {
        background-size: 20px 20px;
        padding-top: calc(40px + 56px);
    }
}

/* --- 隕句・縺・--- */
h1,
h2,
h3,
h4,
h5,
h6,
.cell-ttl,
.Header,
.personality-Header {
    font-family: var(--font-head);
    letter-spacing: 0.05em;
}

/* ==========================================================================
   3. フォーム要素スタイル
   ========================================================================== */

/* ==========================================================================
   3. フォーム要素スタイル
   ========================================================================== */

input[type="text"],
input[type="number"],
textarea,
select {
    background-color: transparent;
    border: none;
    color: var(--c-text-main);
    font-family: var(--font-body);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.cs-main textarea {
    background-color: transparent;
}

select {
    background-color: rgba(0, 0, 0, 0.3);
}

option {
    background-color: rgba(0, 0, 0, 0.9);
    /* #121214 Fallback */
    color: var(--c-text-main);
}

/* --- Adjustment --- */
/* ==========================================================================
   3. フォーム要素スタイル
   ========================================================================== */

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus,
.cs-main textarea:focus,
.cs-main select:focus {
    outline: none;
    background-color: rgba(7, 174, 229, 0.05);
    box-shadow: 0 0 0 1px var(--c-accent-cyan);
}

/* --- Adjustment --- */
input:hover,
textarea:hover,
select:hover {
    background-color: rgba(0, 184, 204, 0.05);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: var(--c-accent-cyan);
}

/* --- 謨ｰ蛟､蜈･蜉・(Number) 縺ｮ隱ｿ謨ｴ --- */
input[type="number"] {
    cursor: ns-resize;
}

/* --- Adjustment --- */
.cs-main input[type="number"]::-webkit-outer-spin-button,
.cs-main input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Adjustment --- */
.cs-main input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --- Adjustment --- */
.cs-main select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: none;
    background-image: none;
}

.cs-main select::-ms-expand {
    display: none;
}

/* --- Adjustment --- */

/* --- 蝓ｺ譛ｬ讒矩 --- */
table {
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    border-color: var(--c-border-grid);
}

td {
    background-color: var(--c-bg-form);
}

td:hover {
    background-color: rgba(7, 174, 229, 0.1);
}

/* --- Adjustment --- */
th.cell-ttl,
th.Header,
th.personality-Header {
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.8) 0%, rgba(28, 28, 32, 0.9) 100%);
    color: var(--c-text-main);
    border-bottom: 1px solid var(--c-border-grid);
    text-shadow: none;
    font-weight: normal;
}

/* --- Adjustment --- */
/* 邵ｦ邱壻ｻ倅ｸ・*/
.cs-table-subability td,
.cs-table-damage td,
.cs-table-majika td,
.cs-table-weight td,
.cs-table-lifestyle td,
.cs-main .cs-table-majika td,
.cs-main .cs-table-aur td,
.weight-Header {
    border-right: 1px solid var(--c-border-grid);
}

/* 讓ｪ邱壻ｻ倅ｸ・*/
.cs-table-weight td {
    border-bottom: 1px solid var(--c-border-grid);
}

/* --- Adjustment --- */
.cs-table-subability td:last-child,
.cs-table-damage td:last-child,
.cs-table-majika td:last-child,
.cs-table-weight td:last-child,
.cs-table-lifestyle td:last-child {
    border-right: none;
}

/* --- Adjustment --- */

/* ==========================================================================
   5. 共通UI・ユーティリティ
   ========================================================================== */

.pc-i {
    display: inline-block;
}

.sp-i {
    display: none;
}

@media (max-width: 768px) {
    .pc-i {
        display: none;
    }

    .sp-i {
        display: inline-block;
    }
}

/* --- Adjustment --- */
.fixed-button-bar.top {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 12px;
    background: rgba(18, 18, 20, 0.85);
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 44px;
}

.custom-btn {
    background: var(--c-text-muted);
    color: var(--c-bg-main);
    font-family: var(--font-head);
    border: none;
    border-radius: 4px;
    padding: 4px 16px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 4px 0;
}

.custom-btn:hover {
    background: var(--c-accent-cyan);
    color: var(--c-text-main);
}

@media (max-width: 768px) {
    .fixed-button-bar.top {
        padding: 6px 4px;
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: center;
    }

    .custom-btn {
        padding: 4px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .fixed-button-bar.top {
        gap: 2px;
    }

    .custom-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* --- Adjustment --- */

/* ==========================================================================
   6. レイアウト設定
   ========================================================================== */

.cs-main {
    margin: 0 auto;
    padding: 20px 0 0 0;
    width: 768px;
    height: 100%;
}

@media (max-width: 768px) {
    .cs-main {
        width: calc(100% - 32px);
        margin: 0 16px;
    }
}

/* --- Adjustment --- */
.cs-main-ttl {
    font-size: clamp(28px, 7vw, 36px);
    line-height: 160%;
    padding: 80px 0 32px;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
    word-break: break-all;
    color: #efeff0;
    text-align: center;
}

/* --- Adjustment --- */
.cs-main-spacer {
    clear: both;
    height: 16px;
}

@media (min-width: 768px) {
    .cs-main-spacer {
        width: 16px;
        min-width: 16px;
        display: inline-block;
    }
}

.cs-main-border {
    width: 100%;
    max-width: 768px;
    margin: 16px auto;
    border-top: 3px solid #29292d;
    box-sizing: border-box;
}

/* --- Adjustment --- */
/* .flex-1, .flex-2: 荳贋ｸ句ｷｦ蜿ｳ荳ｭ螟ｮ驟咲ｽｮ */
.flex-1,
.flex-2 {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* .flex-3, .flex-4: 荳頑純縺医・荳ｭ螟ｮ驟咲ｽｮ */
.flex-3,
.flex-4 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* --- Adjustment --- */
@media (max-width: 768px) {

    .flex-1,
    .flex-2,
    .flex-3,
    .flex-4 {
        display: block;
        margin: 0 auto;
        text-align: center;
    }
}

/* --- Adjustment --- */

/* セクション見出しの統一デザイン */
.cs-collapsible.cs-section-header {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 24px 0 12px 0 !important;
    padding: 12px 20px !important;
    background: linear-gradient(90deg, rgba(7, 174, 229, 0.15) 0%, transparent 100%) !important;
    border-left: 4px solid var(--c-accent-cyan) !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    color: var(--c-accent-cyan) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
    white-space: normal !important;
    /* 改行を許可 */
}

@media (max-width: 768px) {
    .cs-collapsible.cs-section-header {
        font-size: 0.95rem !important;
        padding: 10px 16px !important;
    }
}

.cs-collapsible.cs-section-header .cs-collapse-icon {
    flex-shrink: 0 !important;
    /* アイコンが潰れないように固定 */
    margin-left: auto !important;
    position: relative !important;
    right: 0 !important;
    top: 0 !important;
    transform: translateY(0) rotate(0deg) !important;
    display: inline-block !important;
}

.cs-collapsible.cs-section-header:hover {
    background: linear-gradient(90deg, rgba(7, 174, 229, 0.25) 0%, transparent 100%) !important;
}


.cs-collapsible.cs-section-header.collapsed .cs-collapse-icon {
    transform: translateY(0) rotate(-90deg) !important;
}

/* スクロールハイライト時のデザイン */
.cs-collapsible.cs-section-header.is-highlighted {
    background: linear-gradient(90deg, rgba(7, 174, 229, 0.3) 0%, transparent 100%) !important;
    box-shadow: 0 0 10px rgba(7, 174, 229, 0.2);
}

.cs-collapsible.cs-section-header .cs-header-stats {
    font-size: 14px !important;
    color: #fff !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .cs-collapsible.cs-section-header .cs-header-stats {
        font-size: 11px !important;
        margin-left: 6px;
    }
}

.cs-collapsible.cs-subsection-header,
.cs-magear-toggle-wrapper {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 8px 0 0 0 !important;
    padding: 8px 16px !important;
    background: linear-gradient(90deg, rgba(7, 174, 229, 0.08) 0%, rgba(7, 174, 229, 0.02) 100%) !important;
    border: 1px dashed var(--c-border-grid) !important;
    border-left: 3px solid var(--c-accent-cyan) !important;
    border-radius: 4px 4px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    font-size: 1.0rem !important;
    font-weight: bold !important;
    color: rgba(7, 174, 229, 0.9) !important;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.cs-magear-toggle-wrapper {
    justify-content: space-between !important;
    border-radius: 4px !important;
    border: 1px dashed var(--c-border-grid) !important;
    transition: all 0.3s !important;
}

.cs-magear-toggle-wrapper.is-expanded {
    border-bottom: none !important;
    border-radius: 4px 4px 0 0 !important;
    position: relative !important;
    /* 上・左・右の3方向に限定した強い発光 */
    /* 発光を抑制しつつ地続きにする調整 (上・左・右) */
    box-shadow:
        0 -8px 10px -4px rgba(7, 174, 229, 0.2),
        -8px 0 10px -4px rgba(7, 174, 229, 0.2),
        8px 0 10px -4px rgba(7, 174, 229, 0.2) !important;
    background: linear-gradient(90deg, rgba(7, 174, 229, 0.25) 0%, rgba(7, 174, 229, 0.08) 100%) !important;
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(7, 174, 229, 0.9) !important;
    border-color: rgba(7, 174, 229, 0.8) !important;
    z-index: 10 !important;
    /* コンテンツより前面に出して境界を隠す */
}

.cs-magear-toggle-wrapper.is-expanded::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.cs-magear-toggle-wrapper.is-expanded>* {
    position: relative !important;
    z-index: 1 !important;
}

.cs-magear-toggle-wrapper .cs-collapse-icon {
    transition: transform 0.3s !important;
    display: inline-block !important;
}

.cs-magear-toggle-wrapper:not(.is-expanded) .cs-collapse-icon {
    transform: rotate(-90deg) !important;
}

@media (max-width: 768px) {

    .cs-collapsible.cs-subsection-header,
    .cs-magear-toggle-wrapper {
        font-size: 0.85rem !important;
        padding: 6px 12px !important;
    }
}

.cs-collapsible.cs-subsection-header:hover,
.cs-magear-toggle-wrapper:hover {
    background: linear-gradient(90deg, rgba(7, 174, 229, 0.15) 0%, transparent 100%) !important;
}

.cs-collapsible.cs-subsection-header .cs-collapse-icon {
    margin-left: auto !important;
    scale: 0.8;
    transition: transform 0.3s;
}

.cs-collapsible.cs-subsection-header.collapsed .cs-collapse-icon {
    transform: rotate(-90deg) !important;
}

/* Ma-GEAR入れ子セクション用 (枠線なし) */
.cs-magear-nested-section {
    width: 100% !important;
    margin: 8px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* Ma-GEARアコーディオン全体枠 */
#cs-magear-accordion-content {
    border: 1px dashed rgba(7, 174, 229, 0.4) !important;
    border-top: none !important;
    padding: 12px 20px !important;
    margin-bottom: 20px !important;
    background: rgba(255, 255, 255, 0.01) !important;
    border-radius: 0 0 4px 4px !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
    /* 発光を抑制しつつ地続きにする調整 (下・左・右) */
    box-shadow:
        0 8px 10px -4px rgba(7, 174, 229, 0.2),
        -8px 0 10px -4px rgba(7, 174, 229, 0.2),
        8px 0 10px -4px rgba(7, 174, 229, 0.2) !important;
}

#cs-magear-accordion-content::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url('../../img/circuit_pattern.png') !important;
    background-size: 120px !important;
    background-repeat: repeat !important;
    opacity: 0.03 !important;
    mix-blend-mode: screen !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

#cs-magear-accordion-content>* {
    position: relative !important;
    z-index: 1 !important;
}

@media (max-width: 768px) {
    .cs-magear-nested-section {
        margin: 4px 0 !important;
    }

    #cs-magear-accordion-content {
        padding: 8px 12px !important;
    }
}

.cs-collapsible.cs-subsection-header.collapsed {
    border-bottom: 1px dashed var(--c-border-grid) !important;
    border-radius: 4px !important;
}

/* ==========================================================================
   7. 機能別：キャラクターデータ
   ========================================================================== */

.cs-main table {
    border-collapse: collapse;
    margin: auto;
    border: 1px solid var(--c-border-grid);
    background: transparent;
    color: var(--c-text-main);
}

/* --- Adjustment --- */
/* --- Adjustment --- */
.cell-ttl {
    padding: 6px;
    border-bottom: 1px solid var(--c-border-grid);
    font-size: 16px !important;
}

@media (max-width: 768px) {
    .cell-ttl {
        font-size: 12px !important;
        padding: 4px;
    }
}

/* --- Adjustment --- */
.Header {
    font-size: 14px !important;
    padding: 6px;
    border: 1px solid var(--c-border-grid);
    border-bottom: 1px solid var(--c-border-grid);
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .Header {
        font-size: 10px !important;
        padding: 4px;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
    }
}

/* --- Adjustment --- */
.cs-item {
    color: var(--c-text-main);
    background: var(--c-bg-main);
}

/* --- Adjustment --- */
.cs-trashbox,
.cs-no-trashbox {
    vertical-align: middle !important;
    text-align: center;
    width: var(--w-trash);
    padding: 2px 0;
    height: 1px;
    /* 行の全高を占有させるための指定 */
    border: 1px solid var(--c-border-grid);
}

.cs-trashbox button,
.cs-no-trashbox button {
    color: var(--c-text-muted);
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0;
    margin: 1px 0;
    /* 上下のボタン同士や枠線との最小限の余白 */
    line-height: 1;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
}

.cs-trashbox button:hover {
    color: var(--c-accent-cyan);
}

/* --- Adjustment --- */
.cs-table-personality {
    table-layout: auto;
    width: var(--table-width-display);
}

@media (max-width: 768px) {
    .cs-table-personality {
        table-layout: auto;
        width: 100% !important;
        max-width: 100% !important;
    }

    .cs-table-personality col:nth-of-type(1) {
        width: 3em !important;
    }

    .cs-table-personality col:nth-of-type(2) {
        width: auto !important;
    }
}

/* --- Adjustment --- */
.cs-table-displayimage {
    width: 180px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--c-border-grid);
}

.cs-table-displayimage .select-image-placeholder {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #aaaab1;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: color 0.3s;
    z-index: 2;
    user-select: none;
    text-align: center;
    white-space: nowrap;
}

.cs-table-displayimage .select-image-placeholder:hover {
    color: #07aee5;
}

/* --- Adjustment --- */
.cs-table-characterBuild {
    table-layout: fixed;
    width: 100%;
    border: 1px solid var(--c-border-grid);
}

@media (max-width: 768px) {
    .cs-table-characterBuild {
        width: 100%;
    }

    .cs-table-characterBuild col:nth-of-type(1) {
        width: 40px !important;
    }

    .cs-table-characterBuild col:nth-of-type(2) {
        width: 40px !important;
    }

    .cs-table-characterBuild col:nth-of-type(3),
    .cs-table-characterBuild col:nth-of-type(4) {
        width: 50px !important;
    }

    .cs-table-characterBuild col:nth-of-type(5) {
        width: 60px !important;
    }

    .cs-table-characterBuild col:nth-of-type(6) {
        width: auto !important;
    }
}

/* --- Adjustment --- */
.cs-table-characterGrowth {
    table-layout: auto;
    width: 100%;
    line-height: 100%;
}

.cs-table-characterGrowth td {
    border: 1px solid var(--c-border-grid);
    padding: 0;
}

@media (max-width: 768px) {
    .cs-table-characterGrowth {
        width: 100%;
    }

    .cs-table-characterGrowth col:nth-of-type(1) {
        width: 40px !important;
    }

    .cs-table-characterGrowth col:nth-of-type(2) {
        width: 52px !important;
    }

    .cs-table-characterGrowth col:nth-of-type(3) {
        width: 52px !important;
    }

    .cs-table-characterGrowth col:nth-of-type(4),
    .cs-table-characterGrowth col:nth-of-type(5),
    .cs-table-characterGrowth col:nth-of-type(6),
    .cs-table-characterGrowth col:nth-of-type(7) {
        width: 28px !important;
    }

    .cs-table-characterGrowth col:nth-of-type(8) {
        width: 40px !important;
    }

    .cs-table-characterGrowth col:nth-of-type(9) {
        width: auto !important;
    }

    .cs-table-characterGrowth col:nth-of-type(10) {
        width: var(--w-trash) !important;
    }
}

/* --- Adjustment --- */
.cs-table-sessionHistory {
    table-layout: auto;
    width: 100%;
}

.cs-table-sessionHistory col:nth-child(5) {
    width: var(--w-trash) !important;
}

@media (max-width: 768px) {
    .cs-table-sessionHistory {
        table-layout: fixed;
        width: 100%;
    }

    .cs-table-sessionHistory col:nth-of-type(1) {
        width: 72px !important;
    }

    .cs-table-sessionHistory col:nth-of-type(2) {
        width: 96px !important;
    }

    .cs-table-sessionHistory col:nth-of-type(3) {
        width: 72px !important;
    }

    .cs-table-sessionHistory col:nth-of-type(4) {
        width: auto !important;
    }
}

/* --- Adjustment --- */
/* 閭ｽ蜉帛､ */
.cs-table-ability {
    table-layout: auto;
    width: var(--table-width-half);
    height: 128px;
}

@media (max-width: 768px) {
    .cs-table-ability {
        width: 100%;
        height: auto;
    }
}

/* 蜑ｯ閭ｽ蜉帛､ */
.cs-table-subability {
    table-layout: auto;
    width: var(--table-width-half);
    height: 128px;
}

@media (max-width: 768px) {
    .cs-table-subability {
        width: 100%;
        height: auto;
    }
}

/* --- Adjustment --- */
.cs-table-damage {
    table-layout: fixed;
    width: var(--table-width-long);
    height: 128px;
}

@media (max-width: 768px) {
    .cs-table-damage {
        width: 100%;
        height: auto;
    }
}

/* 鬲皮・譛ｭ */
.cs-table-aur {
    table-layout: auto;
    width: var(--table-width-short);
    height: 128px;
}

@media (max-width: 768px) {
    .cs-table-aur {
        width: 100%;
        height: auto;
    }
}

/* 謇謖・≡ */
.cs-table-majika {
    table-layout: fixed;
    width: var(--table-width-long);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cs-table-majika {
        width: 100%;
        height: auto;
    }
}

.cs-table-majika td.input .majika-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
    white-space: nowrap;
}

/* 驥埼㍼ */
.cs-table-weight {
    table-layout: fixed;
    width: var(--table-width-short);
}

@media (max-width: 768px) {
    .cs-table-weight {
        width: 100%;
        height: auto;
    }
}

/* --- Adjustment --- */
.cs-table-skill {
    table-layout: auto;
    width: 100%;
}

.cs-table-skill col:nth-child(4) {
    width: var(--w-trash) !important;
}

@media (max-width: 768px) {
    .cs-table-skill {
        width: 100%;
    }

    .cs-table-skill col:nth-of-type(1) {
        width: 4em !important;
    }

    .cs-table-skill col:nth-of-type(2) {
        width: 3em !important;
    }

    .cs-table-skill col:nth-of-type(3) {
        width: auto !important;
    }

    .cs-table-skill col:nth-of-type(4) {
        width: 20px !important;
    }
}

/* --- Adjustment --- */
.cs-table-lifestyle {
    table-layout: fixed;
    width: var(--table-width-half);
}

/* --- 逕滓･ｭ --- */
.cs-table-lifeWork {
    table-layout: fixed;
    width: var(--table-width-half);
}

.cs-table-lifeWork col:nth-child(2),
.cs-table-lifeWork col:nth-child(3) {
    width: var(--w-4ch) !important;
}

/* --- 蝨ｰ蝓・--- */
.cs-table-lifeArea {
    table-layout: fixed;
    width: var(--table-width-half);
}

.cs-table-lifeArea col:nth-child(2),
.cs-table-lifeArea col:nth-child(3),
.cs-table-lifeArea col:nth-child(4),
.cs-table-lifeArea col:nth-child(5) {
    width: var(--w-4ch) !important;
}

/* --- 菴丞ｱ・--- */
.cs-table-lifeHouse {
    table-layout: fixed;
    width: var(--table-width-half);
}

.cs-table-lifeHouse col:nth-child(2),
.cs-table-lifeHouse col:nth-child(4) {
    width: var(--w-4ch) !important;
}

.cs-table-lifeHouse col:nth-child(3) {
    width: var(--w-5ch) !important;
}

.cs-table-lifeHouse col:nth-child(5) {
    width: var(--w-6ch) !important;
}

/* --- 險ｭ蛯・--- */
.cs-table-lifeFacilities {
    table-layout: auto;
    width: 100%;
}

.cs-table-lifeFacilities col:nth-child(1) {
    width: var(--w-10ch) !important;
}

.cs-table-lifeFacilities col:nth-child(2) {
    width: var(--w-4ch) !important;
}

.cs-table-lifeFacilities col:nth-child(4) {
    width: var(--w-trash) !important;
}

/* --- 豢ｻ蜍・--- */
.cs-table-lifeActivities {
    table-layout: auto;
    width: 100%;
}

.cs-table-lifeActivities col:nth-child(1) {
    width: var(--w-10ch) !important;
}

.cs-table-lifeActivities col:nth-child(2) {
    width: var(--w-4ch) !important;
}

.cs-table-lifeActivities col:nth-child(4) {
    width: var(--w-trash) !important;
}

/* --- Adjustment --- */
.cs-table-item {
    table-layout: auto;
    width: 100%;
}

.cs-table-item col:nth-child(9) {
    width: var(--w-trash) !important;
}

@media (max-width: 768px) {

    /* --- デフォルト設定：一括リセットと文字サイズの統一 --- */
    /* アイテム制作セクション内の全要素に適用 */
    .cs-main .cs-itemcraft-wrapper table col,
    .cs-main .cs-itemcraft-wrapper table th,
    .cs-main .cs-itemcraft-wrapper table td,
    .cs-main .cs-itemcraft-wrapper textarea,
    .cs-main .cs-itemcraft-wrapper input,
    .cs-main .cs-itemcraft-wrapper select,
    .cs-main .cs-itemcraft-wrapper output {
        /* width: autoをth/tdから外し、colの設定を受け継ぎやすくする */
        min-width: 0 !important;
        white-space: normal !important;
        padding: 1px 2px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    /* 入力・出力要素はセル内で100%広がるように固定 */
    .cs-main .cs-itemcraft-wrapper textarea,
    .cs-main .cs-itemcraft-wrapper table td input,
    .cs-main .cs-itemcraft-wrapper table td select,
    .cs-main .cs-itemcraft-wrapper table td output {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* --- [共通] アイテムテーブル（9列構成：メイン所持品リスト用） --- */
    /* ※制作テーブル(8列)と混同しないよう注意 */
    .cs-table-item col:nth-of-type(1) {
        width: 6em !important;
    }

    .cs-table-item col:nth-of-type(2) {
        width: 1.75em !important;
    }

    .cs-table-item col:nth-of-type(3) {
        width: 1.75em !important;
    }

    .cs-table-item col:nth-of-type(4) {
        width: 2.5em !important;
    }

    .cs-table-item col:nth-of-type(5) {
        width: 5em !important;
    }

    .cs-table-item col:nth-of-type(6) {
        width: 2em !important;
    }

    .cs-table-item col:nth-of-type(7) {
        width: 2em !important;
    }

    .cs-table-item col:nth-of-type(8) {
        width: 5em !important;
    }

    .cs-table-item col:nth-of-type(9) {
        width: 20px !important;
    }

    /* --- アイテム制作：個別テーブルのレスポンシブ幅定義 --- */

    /* 1. ベースアイテム (8列構成) */
    #cs-table-craftBase {
        table-layout: auto !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* colとtd両方に指定することで確実に反映させる。min-widthも併用 */
    #cs-table-craftBase col:nth-of-type(1) {
        width: auto !important;
    }

    #cs-table-craftBase col:nth-of-type(2) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftBase col:nth-of-type(3) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftBase col:nth-of-type(4) {
        width: 2em !important;
        min-width: 2em !important;
    }

    #cs-table-craftBase col:nth-of-type(5) {
        width: 7.5em !important;
        min-width: 7.5em !important;
    }

    #cs-table-craftBase col:nth-of-type(6) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftBase col:nth-of-type(7) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftBase col:nth-of-type(8) {
        width: 7.5em !important;
        min-width: 7.5em !important;
    }

    /* 2. 完成品 (8列構成) */
    #cs-table-craftResult {
        table-layout: auto !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #cs-table-craftResult col:nth-of-type(1),
    #cs-table-craftResult td:nth-child(1) {
        width: auto !important;
    }

    #cs-table-craftResult col:nth-of-type(2),
    #cs-table-craftResult td:nth-child(2) {
        width: 2em !important;
        min-width: 2em !important;
    }

    #cs-table-craftResult col:nth-of-type(3),
    #cs-table-craftResult td:nth-child(3) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftResult col:nth-of-type(4),
    #cs-table-craftResult td:nth-child(4) {
        width: 6em !important;
        min-width: 6em !important;
    }

    #cs-table-craftResult col:nth-of-type(5),
    #cs-table-craftResult td:nth-child(5) {
        width: 6.5em !important;
        min-width: 6.5em !important;
    }

    #cs-table-craftResult col:nth-of-type(6),
    #cs-table-craftResult td:nth-child(6) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftResult col:nth-of-type(7),
    #cs-table-craftResult td:nth-child(7) {
        width: 2em !important;
        min-width: 2em !important;
    }

    #cs-table-craftResult col:nth-of-type(8),
    #cs-table-craftResult td:nth-child(8) {
        width: 6.5em !important;
        min-width: 6.5em !important;
    }

    /* 3. DWS武器B (8列構成) */
    #cs-table-craftMaGearDws {
        table-layout: auto !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(1),
    #cs-table-craftMaGearDws td:nth-child(1) {
        width: auto !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(2),
    #cs-table-craftMaGearDws td:nth-child(2) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(3),
    #cs-table-craftMaGearDws td:nth-child(3) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(4),
    #cs-table-craftMaGearDws td:nth-child(4) {
        width: 3em !important;
        min-width: 3em !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(5),
    #cs-table-craftMaGearDws td:nth-child(5) {
        width: 6em !important;
        min-width: 6em !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(6),
    #cs-table-craftMaGearDws td:nth-child(6) {
        width: 2.75em !important;
        min-width: 2.75em !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(7),
    #cs-table-craftMaGearDws td:nth-child(7) {
        width: 2em !important;
        min-width: 2em !important;
    }

    #cs-table-craftMaGearDws col:nth-of-type(8),
    #cs-table-craftMaGearDws td:nth-child(8) {
        width: 6em !important;
        min-width: 6em !important;
    }

    /* 2. 素材パーツ (4列構成) */
    #cs-table-craftMaterial col:nth-child(1),
    #cs-table-craftMaterial td:nth-child(1) {
        width: 6em !important;
        min-width: 6em !important;
    }

    #cs-table-craftMaterial col:nth-child(2),
    #cs-table-craftMaterial td:nth-child(2) {
        width: 4em !important;
        min-width: 4em !important;
    }

    #cs-table-craftMaterial col:nth-child(3),
    #cs-table-craftMaterial td:nth-child(3) {
        width: auto !important;
    }

    #cs-table-craftMaterial col:nth-child(4),
    #cs-table-craftMaterial td:nth-child(4) {
        width: 4.5em !important;
        min-width: 4.5em !important;
    }

    /* 3. デザイン (4列構成) */
    #cs-table-craftDesign col:nth-child(1),
    #cs-table-craftDesign td:nth-child(1) {
        width: 6em !important;
        min-width: 6em !important;
    }

    #cs-table-craftDesign col:nth-child(2),
    #cs-table-craftDesign td:nth-child(2) {
        width: auto !important;
    }

    #cs-table-craftDesign col:nth-child(3),
    #cs-table-craftDesign td:nth-child(3) {
        width: 4.5em !important;
        min-width: 4.5em !important;
    }

    #cs-table-craftDesign col:nth-child(4),
    #cs-table-craftDesign td:nth-child(4) {
        width: 20px !important;
        min-width: 20px !important;
    }

    /* 4. クオリティ (3列構成) */
    #cs-table-craftQuality col:nth-child(1),
    #cs-table-craftQuality td:nth-child(1) {
        width: 6em !important;
        min-width: 6em !important;
    }

    #cs-table-craftQuality col:nth-child(2),
    #cs-table-craftQuality td:nth-child(2) {
        width: auto !important;
    }

    #cs-table-craftQuality col:nth-child(3),
    #cs-table-craftQuality td:nth-child(3) {
        width: 4.5em !important;
        min-width: 4.5em !important;
    }

    /* 5. Ma-GEARパーツ (6列構成) */
    #cs-table-craftMaGearParts col:nth-child(1),
    #cs-table-craftMaGearParts td:nth-child(1) {
        width: 8.5em !important;
        min-width: 8.5em !important;
    }

    #cs-table-craftMaGearParts col:nth-child(2),
    #cs-table-craftMaGearParts td:nth-child(2) {
        width: 2.5em !important;
        min-width: 2.5em !important;
    }

    #cs-table-craftMaGearParts col:nth-child(3),
    #cs-table-craftMaGearParts td:nth-child(3) {
        width: 2.5em !important;
        min-width: 2.5em !important;
    }

    #cs-table-craftMaGearParts col:nth-child(4),
    #cs-table-craftMaGearParts td:nth-child(4) {
        width: auto !important;
    }

    #cs-table-craftMaGearParts col:nth-child(5),
    #cs-table-craftMaGearParts td:nth-child(5) {
        width: 3em !important;
        min-width: 3em !important;
    }

    #cs-table-craftMaGearParts col:nth-child(6),
    #cs-table-craftMaGearParts td:nth-child(6) {
        width: 20px !important;
        min-width: 20px !important;
    }

    /* 6. Ma-GEAR効果 (3列構成) */
    #cs-table-craftMaGearEffect col:nth-child(1),
    #cs-table-craftMaGearEffect td:nth-child(1) {
        width: 6em !important;
        min-width: 6em !important;
    }

    #cs-table-craftMaGearEffect col:nth-child(2),
    #cs-table-craftMaGearEffect td:nth-child(2) {
        width: auto !important;
    }

    #cs-table-craftMaGearEffect col:nth-child(3),
    #cs-table-craftMaGearEffect td:nth-child(3) {
        width: 20px !important;
        min-width: 20px !important;
    }

    /* 操作セルなどの最小限の幅は維持 */
    .cs-main .cs-itemcraft-wrapper td.cs-trashbox {
        width: 20px !important;
        min-width: 20px !important;
    }
}

/* --- 乗り物関連 --- */
/* --- Adjustment --- */
.cs-table-vehicle {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-vehicle col:nth-child(1) {
        width: auto !important;
    }

    .cs-table-vehicle col:nth-child(2) {
        width: 2.5em !important;
    }

    .cs-table-vehicle col:nth-child(3) {
        width: 3em !important;
    }

    .cs-table-vehicle col:nth-child(4) {
        width: 3em !important;
    }

    .cs-table-vehicle col:nth-child(5),
    .cs-table-vehicle col:nth-child(6),
    .cs-table-vehicle col:nth-child(7) {
        width: 3em !important;
    }

    .cs-table-vehicle col:nth-child(8) {
        width: 3.5em !important;
    }
}

/* 素体 */
.cs-table-vehicleFrame {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-vehicleFrame col:nth-child(1) {
        width: auto !important;
    }

    .cs-table-vehicleFrame col:nth-child(2) {
        width: 2.5em !important;
    }

    .cs-table-vehicleFrame col:nth-child(3) {
        width: 4.5em !important;
    }

    .cs-table-vehicleFrame col:nth-child(4) {
        width: 3em !important;
    }

    .cs-table-vehicleFrame col:nth-child(5) {
        width: 2em !important;
    }

    .cs-table-vehicleFrame col:nth-child(6) {
        width: 3.5em !important;
    }

    .cs-table-vehicleFrame col:nth-child(7) {
        width: 80px !important;
    }
}

/* 動力 */
.cs-table-vehicleEngine {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-vehicleEngine col:nth-child(1) {
        width: auto !important;
    }

    .cs-table-vehicleEngine col:nth-child(2) {
        width: 3em !important;
    }

    .cs-table-vehicleEngine col:nth-child(3) {
        width: 3em !important;
    }

    .cs-table-vehicleEngine col:nth-child(4) {
        width: 80px !important;
    }
}

/* 外装 */
.cs-table-vehicleExterior {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-vehicleExterior col:nth-child(1) {
        width: auto !important;
    }

    .cs-table-vehicleExterior col:nth-child(2) {
        width: 3em !important;
    }

    .cs-table-vehicleExterior col:nth-child(3) {
        width: 3em !important;
    }

    .cs-table-vehicleExterior col:nth-child(4) {
        width: 3.5em !important;
    }

    .cs-table-vehicleExterior col:nth-child(5) {
        width: 80px !important;
    }
}

/* 内装 */
.cs-table-vehicleInterior {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-vehicleInterior col:nth-child(1) {
        width: 6.5em !important;
    }

    .cs-table-vehicleInterior col:nth-child(2) {
        width: auto !important;
    }

    .cs-table-vehicleInterior col:nth-child(3) {
        width: 60px !important;
    }

    .cs-table-vehicleInterior col:nth-child(4) {
        width: var(--w-trash) !important;
    }
}

/* 武装 */
.cs-table-vehicleArmed {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-vehicleArmed col:nth-child(1) {
        width: 6em !important;
    }

    .cs-table-vehicleArmed col:nth-child(2) {
        width: 3em !important;
    }

    .cs-table-vehicleArmed col:nth-child(3) {
        width: 3em !important;
    }

    .cs-table-vehicleArmed col:nth-child(4) {
        width: auto !important;
    }

    .cs-table-vehicleArmed col:nth-child(5) {
        width: 4em !important;
    }

    .cs-table-vehicleArmed col:nth-child(6) {
        width: var(--w-trash) !important;
    }
}

/* --- Adjustment --- */
@media (max-width: 768px) {
    #cs-table-vehicleCharge col:nth-child(1) {
        width: 6em !important;
    }

    #cs-table-vehicleCharge col:nth-child(2) {
        width: 5em !important;
    }

    #cs-table-vehicleCharge col:nth-child(3) {
        width: auto !important;
    }

    #cs-table-vehicleCharge col:nth-child(4) {
        width: auto !important;
    }

    #cs-table-vehicleCharge col:nth-child(5) {
        width: 6em !important;
    }
}

/* --- Adjustment --- */
.cs-table-vehicleCargoroom {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-vehicleCargoroom col:nth-child(1) {
        width: auto !important;
    }
}

/* --- Adjustment --- */
.cs-table-spell {
    table-layout: fixed;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-spell {
        width: 100%;
    }

    .cs-table-spell col:nth-child(1) {
        width: 4em !important;
    }

    .cs-table-spell col:nth-child(2) {
        width: 2em !important;
    }

    .cs-table-spell col:nth-child(3) {
        width: 2em !important;
    }

    .cs-table-spell col:nth-child(4) {
        width: 5em !important;
    }

    .cs-table-spell col:nth-child(5) {
        width: 5em !important;
    }

    .cs-table-spell col:nth-child(6) {
        width: 5em !important;
    }

    .cs-table-spell col:nth-child(7) {
        width: var(--w-trash) !important;
    }
}

/* --- Adjustment --- */
.cs-table-chatPalette {
    table-layout: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .cs-table-chatPalette {
        width: 100%;
    }

    .cs-table-chatPalette col:nth-child(1) {
        width: auto !important;
    }
}

/* --- Adjustment --- */

/* --- Adjustment --- */
.cs-input-majika {
    width: calc(100% - 0.4rem);
    /* --- Adjustment --- */
    padding: 0;
    font-size: clamp(14px, 3.5vw, 16px);
    text-align: left;
}

.cs-output-majika {
    width: 100%;
    padding: 0;
    font-size: clamp(14px, 3.5vw, 16px);
    text-align: right;
}

@media (max-width: 768px) {
    .cs-input-majika {
        width: auto;
        min-width: 40px;
        flex: 1;
        text-align: left !important;
    }

    .cs-output-majika {
        width: auto;
        flex: 1;
        text-align: right;
    }
}

/* --- 操作用セル（削除・並べ替えハンドル） --- */
.cs-main td.cs-trashbox {
    display: table-cell !important;
    /* テーブルセルとしての挙動を維持 */
    padding: 0 !important;
    width: 24px;
    min-width: 24px;
    vertical-align: middle !important;
    text-align: center !important;
    background-color: var(--c-bg-form);
    /* 他のtdと統一 */
    border-right: 1px solid var(--c-border-grid);
    border-bottom: 1px solid var(--c-border-grid);
}

.cs-main td.cs-trashbox .cs-trashbox-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
    padding: 0px 0;
    width: 100%;
    height: 100%;
}

.cs-sort-handle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    color: var(--c-text-muted) !important;
    font-size: 14px !important;
    line-height: 1 !important;
    height: 14px !important;
    width: 20px !important;
    cursor: grab !important;
    user-select: none !important;
    touch-action: none !important;
}

.cs-main td.cs-trashbox button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
    width: 18px !important;
    /* 少し縮小して収まりを良くする */
    height: 18px !important;
}

.cs-sort-handle:hover,
.cs-sort-handle:focus {
    color: #07aee5;
}

.cs-sort-handle:active {
    cursor: grabbing;
}

body.cs-sort-active {
    cursor: grabbing;
}

.cs-sort-fallback {
    opacity: 0.85;
    background: rgba(7, 174, 229, 0.12);
}

.cs-sort-placeholder td,
.cs-sort-placeholder th {
    padding: 0 !important;
    border: 1px dashed #07aee5 !important;
    background: rgba(7, 174, 229, 0.1) !important;
    height: inherit;
    min-height: inherit;
}

.cs-sort-placeholder {
    pointer-events: none;
    transition: background-color 0.15s ease-in-out;
}

.cs-sort-drag-overlay-cell {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.cs-sort-drag-overlay-table {
    width: 100%;
    border-collapse: collapse;
    pointer-events: none;
    background: inherit;
}

.cs-sort-drag-overlay-table td,
.cs-sort-drag-overlay-table th {
    border: inherit;
    padding: inherit;
}

.cs-sort-drag-overlay-clone {
    opacity: 0.9;
}

/* --- Adjustment --- */
#popup {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, 0);
    background: #fff;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 24px 32px;
    z-index: 1000;
    min-width: 220px;
}

#popup ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

#popup li {
    cursor: pointer;
    margin: 8px 0;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

#popup li:hover {
    background: #e6f0fa;
}

#popup button {
    margin-top: 8px;
    padding: 6px 16px;
    border: none;
    background: #4a90e2;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

#popup button:hover {
    background: #357ab8;
}

/* --- 縺昴・莉・--- */


.btn {
    border: 1px solid var(--c-border-grid);
    color: var(--c-text-muted);
    background: transparent;
    padding: 8px 24px;
    cursor: pointer;
    transition: border 0.3s, color 0.3s, box-shadow 0.2s;
    font-family: var(--font-head);
}

.btn:hover {
    border: 1px solid var(--c-accent-cyan);
    color: var(--c-accent-cyan);
}

.btn:focus {
    border: 1px solid var(--c-accent-cyan);
    color: var(--c-accent-cyan);
}

.btn:focus-visible {
    outline: 2px solid #07aee5;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(7, 174, 229, 0.35);
}

.removeLifeFacilitiesRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeLifeFacilitiesRow:hover svg {
    color: #07aee5;
}

.removeSessionHistoryRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeSessionHistoryRow:hover svg {
    color: #07aee5;
}

.removeLifeActivitiesRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeLifeActivitiesRow:hover svg {
    color: #07aee5;
}

.removeSkillRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeSkillRow:hover svg {
    color: #07aee5;
}

.removeItemRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeItemRow:hover svg {
    color: #07aee5;
}

.removeVehicleInteriorRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeVehicleInteriorRow:hover svg {
    color: #07aee5;
}

.removeVehicleArmedRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeVehicleArmedRow:hover svg {
    color: #07aee5;
}

.removeSpellRow svg {
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.removeSpellRow:hover svg {
    color: #07aee5;
}

/* --- 蜿り・ュ蝣ｱ --- */
th {
    text-align: center;
}

input[type="button"] {
    min-width: 18px;
}

input,
textarea,
select {
    font-size: clamp(14px, 3.5vw, 16px);
    padding: 0 0.5em;
    line-height: 120%;
    border: none;

    border-radius: 2px;
    outline: none;
    background: rgba(0, 0, 0, 0.2);
    color: var(--c-text-main);
    box-sizing: border-box;
    margin: 0;
    transition: all 0.3s ease;
}

textarea {
    resize: vertical;
    overflow-x: hidden;
    overflow-y: auto;
    /* --- Adjustment --- */
    overflow-wrap: break-word;
    /* 髟ｷ縺・腰隱槭ｒ謚倥ｊ霑斐＠ */
    word-wrap: break-word;
    /* --- Adjustment --- */
    min-height: 1em;
    /* 譛菴・陦悟・縺ｮ鬮倥＆繧堤｢ｺ菫・*/
}

@supports (field-sizing: content) {
    textarea {
        /* --- Adjustment --- */
        overflow-y: hidden;
        /* --- Adjustment --- */
        field-sizing: content;
        /* --- Adjustment --- */
    }
}

/* --- Adjustment --- */
input:hover,
textarea:hover,
select:hover {

    background-color: rgba(0, 184, 204, 0.05);
}

/* --- Adjustment --- */
input:focus,
textarea:focus,
select:focus {

    background-color: rgba(0, 184, 204, 0.1);
    box-shadow: none;
    /* Removed glow shadow for cleaner look */
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.35);
    outline: none;
}

/* --- Adjustment --- */
.cs-main input[type="number"] {
    padding: 0;
    box-sizing: border-box;
    text-align: center;
    width: 100%;
}

/* --- Adjustment --- */
.cs-main input[type="number"]::-webkit-outer-spin-button,
.cs-main input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Adjustment --- */

/* --- Adjustment --- */
.cs-main select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: none;
    background-image: none;
}

/* 譌ｧEdge/IE: 遏｢蜊ｰ驛ｨ蛻・ｒ髱櫁｡ｨ遉ｺ */
.cs-main select::-ms-expand {
    display: none;
}

.b {
    font-weight: bold;
}

.input,
.output {
    border: 1px solid var(--c-border-grid);
}

.result-border,
td.result-border,
th.result-border {
    border-top: 2px solid var(--c-border-grid);
}

/* --- Adjustment --- */
@supports selector(:has(*)) {

    .cs-table-skill td:has(input, textarea, select),
    .cs-table-item td:has(input, textarea, select),
    .cs-table-spell td:has(input, textarea, select),
    .cs-table-lifeWork td:has(input, textarea, select),
    .cs-table-lifeArea td:has(input, textarea, select),
    .cs-table-lifeHouse td:has(input, textarea, select),
    .cs-table-lifeFacilities td:has(input, textarea, select),
    .cs-table-lifeActivities td:has(input, textarea, select),
    .cs-table-vehicleFrame td:has(input, textarea, select),
    .cs-table-vehicleEngine td:has(input, textarea, select),
    .cs-table-vehicleExterior td:has(input, textarea, select),
    .cs-table-vehicleInterior td:has(input, textarea, select),
    .cs-table-vehicleArmed td:has(input, textarea, select),
    #cs-table-vehicleCharge td:has(input, textarea, select),
    .cs-table-vehicleCargoroom td:has(input, textarea, select),
    .cs-table-chatPalette td:has(input, textarea, select) {
        padding-top: 1px;
        padding-bottom: 1px;
    }

    @media (max-width: 768px) {

        .cs-table-skill td:has(input, textarea, select),
        .cs-table-item td:has(input, textarea, select),
        .cs-table-spell td:has(input, textarea, select),
        .cs-table-lifeWork td:has(input, textarea, select),
        .cs-table-lifeArea td:has(input, textarea, select),
        .cs-table-lifeHouse td:has(input, textarea, select),
        .cs-table-lifeFacilities td:has(input, textarea, select),
        .cs-table-lifeActivities td:has(input, textarea, select),
        .cs-table-vehicleFrame td:has(input, textarea, select),
        .cs-table-vehicleEngine td:has(input, textarea, select),
        .cs-table-vehicleExterior td:has(input, textarea, select),
        .cs-table-vehicleInterior td:has(input, textarea, select),
        .cs-table-vehicleArmed td:has(input, textarea, select),
        #cs-table-vehicleCharge td:has(input, textarea, select),
        .cs-table-vehicleCargoroom td:has(input, textarea, select),
        .cs-table-chatPalette td:has(input, textarea, select) {
            padding-top: 0px;
            padding-bottom: 0px;
        }
    }
}

/* --- 譁・ｭ励し繧､繧ｺ縺ｮ邨ｱ荳 --- */
:is(.cs-table-skill,
    .cs-table-lifeWork,
    .cs-table-lifeArea,
    .cs-table-lifeHouse,
    .cs-table-lifeFacilities,
    .cs-table-lifeActivities,
    .cs-table-vehicleFrame,
    .cs-table-vehicleEngine,
    .cs-table-vehicleExterior,
    .cs-table-vehicleInterior,
    .cs-table-vehicleArmed,
    #cs-table-vehicleCharge,
    .cs-table-vehicleCargoroom,
    .cs-table-chatPalette) :is(input[type="text"], input[type="number"], select) {
    font-size: clamp(10px, 2.5vw, 12px);
}

@media (max-width: 768px) {

    :is(.cs-table-skill,
        .cs-table-lifeWork,
        .cs-table-lifeArea,
        .cs-table-lifeHouse,
        .cs-table-lifeFacilities,
        .cs-table-lifeActivities,
        .cs-table-vehicleFrame,
        .cs-table-vehicleEngine,
        .cs-table-vehicleExterior,
        .cs-table-vehicleInterior,
        .cs-table-vehicleArmed,
        #cs-table-vehicleCharge,
        .cs-table-vehicleCargoroom,
        .cs-table-chatPalette) :is(input[type="text"], input[type="number"], select) {
        font-size: 10px;
    }
}

/* --- Adjustment --- */
.cs-autocomplete-suggestions {
    border: 1px solid #ccc;
    background: #fff;
    overflow: auto;
    position: absolute;
    z-index: 1000;
    max-height: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    box-sizing: border-box;
}

.cs-autocomplete-item {
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.cs-autocomplete-item:hover,
.cs-autocomplete-item.selected {
    background-color: #f0f0f0;
}

/* --- Adjustment --- */

/* --- Adjustment --- */
@media (max-width: 768px) {

    /* Ensure all tables take full width */
    .cs-main table {
        width: 100% !important;
    }

    /* Adjust Vehicle & Frame Table Column Widths */
    /* Target the header cells in the 2nd row (where headers are defined) */
    .cs-table-vehicle tr:nth-child(2) th:nth-of-type(1),
    .cs-table-vehicleFrame tr:nth-child(2) th:nth-of-type(1) {
        width: auto !important;
    }

    .cs-table-vehicle tr:nth-child(2) th:nth-of-type(n+2),
    .cs-table-vehicleFrame tr:nth-child(2) th:nth-of-type(n+2) {
        width: 32px !important;
        padding-left: 1px !important;
        padding-right: 1px !important;
    }

    /* Also adjust data cells to match (though headers usually control width) */
    /* Note: Data rows have different structures (rowspan/colspan), so targeting headers is safer/sufficient for fixed layout */

    /* Disable Spin Buttons on Mobile */
    .cs-main input[type="number"]::-webkit-outer-spin-button,
    .cs-main input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .cs-main input[type="number"] {
        -moz-appearance: textfield;
        appearance: textfield;
        padding-right: 0.5em;
    }

    /* Center text for ALL number inputs on mobile */
    .cs-main table input[type="number"] {
        text-align: center;
        padding: 0;
    }
}

/* --- Adjustment --- */
/* --- Adjustment --- */


/* 陦後・鬮倥＆隱ｿ謨ｴ */
.cs-table-personality tr,
.cs-table-characterBuild tr,
.cs-table-characterGrowth tr,
.cs-table-sessionHistory tr,
.cs-table-ability tr,
.cs-table-subability tr,
.cs-table-damage tr,
.cs-table-aur tr,
.cs-table-weight tr,
.cs-table-majika tr,
.cs-table-skill tr,
.cs-table-lifestyle tr,
.cs-table-lifeWork tr,
.cs-table-lifeArea tr,
.cs-table-lifeHouse tr,
.cs-table-lifeFacilities tr,
.cs-table-lifeActivities tr,
.cs-table-item tr,
.cs-table-vehicleFrame tr,
.cs-table-vehicleEngine tr,
.cs-table-vehicleExterior tr,
.cs-table-vehicleInterior tr,
.cs-table-vehicleArmed tr,
#cs-table-vehicleCharge tr,
.cs-table-vehicleCargoroom tr,
.cs-table-spell tr,
.cs-table-chatPalette tr {
    height: 20px;
}

/* 蜈･蜉帶ｬ・・鬮倥＆隱ｿ謨ｴ (input, select) */
:is(.cs-table-characterBuild,
    .cs-table-sessionHistory,
    .cs-table-ability,
    .cs-table-skill,
    .cs-table-lifeWork,
    .cs-table-lifeArea,
    .cs-table-lifeHouse,
    .cs-table-lifeFacilities,
    .cs-table-lifeActivities,
    .cs-table-item,
    .cs-table-vehicleFrame,
    .cs-table-vehicleEngine,
    .cs-table-vehicleExterior,
    .cs-table-vehicleInterior,
    .cs-table-vehicleArmed,
    #cs-table-vehicleCharge,
    .cs-table-vehicleCargoroom,
    .cs-table-spell,
    .cs-table-chatPalette) td :is(input, select) {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    display: block;
}

/* 蜈･蜉帶ｬ・・鬮倥＆隱ｿ謨ｴ (textarea) */
:is(.cs-table-characterBuild,
    .cs-table-sessionHistory,
    .cs-table-skill,
    .cs-table-lifeWork,
    .cs-table-lifeArea,
    .cs-table-lifeHouse,
    .cs-table-lifeFacilities,
    .cs-table-lifeActivities,
    .cs-table-item,
    .cs-table-vehicleFrame,
    .cs-table-vehicleEngine,
    .cs-table-vehicleExterior,
    .cs-table-vehicleInterior,
    .cs-table-vehicleArmed,
    #cs-table-vehicleCharge,
    .cs-table-vehicleCargoroom,
    .cs-table-spell,
    .cs-table-chatPalette) td textarea {
    width: 100%;
    height: auto;
    line-height: 1.2;
    box-sizing: border-box;
    margin: 0;
    display: block;
    padding: 2px 2px 2px 2px;
    min-height: 20px;
}

/* --- Adjustment --- */
@media (max-width: 768px) {

    .cs-table-ability tr:nth-of-type(n+3),
    .cs-table-subability tr:nth-of-type(n+3),
    .cs-table-damage tr:nth-of-type(n+3),
    .cs-table-aur tr:nth-of-type(n+3),
    .cs-table-weight tr:nth-of-type(n+2),
    .cs-table-majika tr:nth-of-type(n+2) {
        height: 36px;
    }

    /* --- Adjustment --- */
    .cs-table-weight tr:nth-of-type(n+2) {
        height: auto;
    }

    .cs-table-weight tr:nth-of-type(3) {
        /* --- Adjustment --- */
        height: auto;
        /* 荳ｭ霄ｫ縺ｫ蜷医ｏ縺帙※莨ｸ縺ｳ繧九ｈ縺・↓ */
    }

    .cs-table-weight td,
    .cs-output-weight {
        vertical-align: middle !important;
        padding: 0 !important;
        text-align: center;
    }

    .cs-table-weight tr:nth-of-type(3) td {
        padding-bottom: 2px !important;
        /* 荳九↓蟆代＠菴咏區 */
    }

    .cs-table-weight output {

        line-height: 1.5;
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: -4px;
        /* --- Adjustment --- */
    }

    .cs-table-weight .cs-input-label {
        display: block;
        font-size: 10px;
        line-height: 1;
    }

    /* --- Adjustment --- */
    .cs-table-majika td {

        vertical-align: middle !important;
        text-align: center;
        padding: 0 !important;

    }

    .cs-table-majika .majika-row {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cs-table-majika output {

        line-height: 1.5;
        display: block;
    }
}

/* --- Adjustment --- */
.cs-pc-row {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

@media (max-width: 768px) {
    .cs-pc-row {
        display: block;
        width: 100%;
    }

    .cs-pc-row section {
        margin-bottom: 16px;
        width: 100%;
    }

    .cs-pc-row section:last-child {
        margin-bottom: 0;
    }

    /* --- Adjustment --- */
    .cs-table-weight,
    .cs-table-majika {
        width: 100% !important;
        min-width: 0;
        max-width: 100%;
        margin: 0 auto;
        table-layout: fixed;
    }

    /* --- Adjustment --- */
    .cs-main table tr:nth-of-type(2),
    .cs-table-weight tr:nth-of-type(2),
    .cs-table-majika tr:nth-of-type(2) {
        height: 20px !important;
    }

    .cs-main table tr:nth-of-type(2) th,
    .cs-table-weight tr:nth-of-type(2) th,
    .cs-table-majika tr:nth-of-type(2) th {
        height: 20px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 20px !important;
        vertical-align: middle !important;
        font-size: 10px !important;
        /* 譁・ｭ励し繧､繧ｺ繧ょｰ上＆縺上＠縺ｦ蜿弱∪繧翫ｈ縺上☆繧・*/
    }

    .cs-table-ability,
    .cs-table-subability,
    .cs-table-damage,
    .cs-table-aur,
    .cs-table-lifestyle,
    .cs-table-lifeWork,
    .cs-table-lifeArea,
    .cs-table-lifeHouse {
        width: 90%;
        min-width: 0;
        max-width: 100%;
        margin: 0 auto;
        table-layout: fixed;
    }
}

/* --- Adjustment --- */
.flex-3 {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    margin-top: var(--spacing-md);
}

.cs-table-aur {
    table-layout: fixed;
    width: var(--table-width-short);
}

#majikaGenericMax {
    text-align: left;
}


/* --- Adjustment --- */

/* --- Adjustment --- */

/* --- Adjustment --- */
.cs-input,
.cs-select,
.cs-textarea {
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
    border: none;
    color: var(--c-text-form);
    font-family: var(--font-body);
    transition: all 0.3s ease;
    border-radius: 2px;
    padding: 4px;
}

/* 隕∫ｴ蛻･縺ｮ蝗ｺ譛芽ｨｭ螳・*/
.cs-select {
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.cs-textarea {
    resize: vertical;
    min-height: 1.5em;
}

/* --- Adjustment --- */
.cs-input:focus,
.cs-select:focus,
.cs-textarea:focus {
    outline: none;
    background-color: rgba(7, 174, 229, 0.05);
    box-shadow: 0 0 0 1px var(--c-accent-cyan);
}

/* --- Adjustment --- */
.is-xs {
    font-size: 10px !important;
}

.is-sm {
    font-size: 12px !important;
}

.is-rg {
    font-size: 14px !important;
}

.is-md {
    font-size: 14px !important;
}

.is-lg {
    font-size: 16px !important;
}

.is-xl {
    font-size: 18px !important;
}

.is-2xl {
    font-size: 20px !important;
}

.is-3xl {
    font-size: 24px !important;
}

.is-4xl {
    font-size: 28px !important;
}

.is-5xl {
    font-size: 32px !important;
}

.is-6xl {
    font-size: 36px !important;
}

.is-7xl {
    font-size: 40px !important;
}

.is-8xl {
    font-size: 44px !important;
}

.is-9xl {
    font-size: 48px !important;
}

.is-10xl {
    font-size: 56px !important;
}

.is-11xl {
    font-size: 64px !important;
}

@media (max-width: 768px) {
    .is-xs {
        font-size: 8px !important;
    }

    .is-sm,
    .is-rg,
    .is-md {
        font-size: 10px !important;
    }

    /* --- Adjustment --- */
    .is-lg {
        font-size: 12px !important;
    }

    .is-xl {
        font-size: 14px !important;
    }

    .is-2xl {
        font-size: 16px !important;
    }

    .is-3xl {
        font-size: 18px !important;
    }

    .is-4xl {
        font-size: 20px !important;
    }

    .is-5xl {
        font-size: 24px !important;
    }

    .is-6xl {
        font-size: 28px !important;
    }

    .is-7xl {
        font-size: 32px !important;
    }

    .is-8xl,
    .is-9xl {
        font-size: 36px !important;
    }

    .is-10xl,
    .is-11xl {
        font-size: 40px !important;
    }
}

/* --- Adjustment --- */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.b {
    font-weight: bold;
}

/* --- Adjustment --- */
.num-padding {
    padding: 0 0 0 16px;
}

@media (max-width: 768px) {
    .num-padding {
        padding: 0;
    }
}

/* --- Adjustment --- */
.unit {
    font-size: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

.label {
    color: var(--c-text-muted);
    font-size: 8px;
    padding: 1px;
    text-align: center;
    vertical-align: bottom;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .unit {
        font-size: 10px;
    }
}

/* --- 鬮倥＆險ｭ螳・--- */
.ch-auto {
    height: auto;
}

.ch-xs {
    height: 24px;
}

.ch-sm {
    height: 28px;
}

.ch-md {
    height: 32px;
}

.ch-lg {
    height: 36px;
}

.ch-xl {
    height: 40px;
}

.ch-2xl {
    height: 44px;
}

.ch-3xl {
    height: 48px;
}

.ch-4xl {
    height: 52px;
}

.ch-5xl {
    height: 56px;
}

.ch-6xl {
    height: 60px;
}

.ch-7xl {
    height: 64px;
}

@media (max-width: 768px) {

    .ch-xs,
    .ch-sm,
    .ch-md,
    .ch-lg,
    .ch-xl,
    .ch-2xl,
    .ch-3xl,
    .ch-4xl,
    .ch-5xl,
    .ch-6xl,
    .ch-7xl,
    .ch-8xl,
    .ch-9xl,
    .ch-10xl,
    .ch-11xl {
        height: auto;
    }
}

/* --- Adjustment --- */

.cs-collapse {
    font-size: clamp(14px, 3.5vw, 16px);
    color: #efeff0;
    padding: 16px 0 16px 0;
}

/* --- Adjustment --- */
.cs-collapsible {
    width: 95%;
    /* --- Adjustment --- */
    cursor: pointer;
    position: relative;
    /* --- Adjustment --- */
    line-height: 1.2;
}

@media (max-width: 768px) {
    .cs-collapsible {
        /* --- Adjustment --- */
        line-height: 1.5;
        font-size: 14px;
    }
}

/* --- Adjustment --- */
.cs-collapse-icon {
    /* --- Adjustment --- */
    --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    display: inline-block;
    width: 1.5em;
    height: 1.5em;

    /* 菴咲ｽｮ隱ｿ謨ｴ: 蜿ｳ遶ｯ縺ｫ蟇・○繧・*/
    position: absolute;
    right: -2.5em;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    /* --- Adjustment --- */
    vertical-align: middle;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: center;
    z-index: 1;

    /* --- Adjustment --- */
    background-color: var(--c-text-muted);
    -webkit-mask-image: var(--icon-chevron);
    mask-image: var(--icon-chevron);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

@media (max-width: 768px) {
    .cs-collapse-icon {
        right: -1.5em;
    }
}

/* 逋ｺ蜈臥畑縺ｮ逍台ｼｼ隕∫ｴ */
.cs-collapse-icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--c-accent-cyan);

    /* --- Adjustment --- */
    -webkit-mask-image: var(--icon-chevron);
    mask-image: var(--icon-chevron);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;

    z-index: -1;
    opacity: 0;
    filter: blur(3px);
    /* 縺ｼ縺九＠縺ｧ逋ｺ蜈峨ｒ陦ｨ迴ｾ */
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* --- Adjustment --- */

/* --- Adjustment --- */
.cs-collapsible.collapsed .cs-collapse-icon {
    transform: translateY(-50%) rotate(-90deg);
    background-color: var(--c-text-muted);
}

/* --- Adjustment --- */
.cs-collapsible:not(.collapsed) .cs-collapse-icon {
    transform: translateY(-50%) rotate(0deg);
    background-color: var(--c-accent-cyan);
}

/* --- Adjustment --- */
.cs-collapsible:not(.collapsed) .cs-collapse-icon::before,
.cs-collapsible:hover .cs-collapse-icon::before {
    opacity: 1;
}

.cs-collapsible:hover .cs-collapse-icon {
    background-color: var(--c-accent-cyan);
}

/* --- Adjustment --- */
.cs-collapsible-content {
    transition: opacity 0.3s ease-out, max-height 0.3s ease-out;
    opacity: 1;
    overflow: hidden;
    /* 縺ｯ縺ｿ蜃ｺ縺鈴亟豁｢ */
}

/* --- Adjustment --- */
.cs-collapsible-content[aria-hidden="true"],
.cs-collapsible.collapsed+.cs-collapsible-content {
    max-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* --- Adjustment --- */
/* --- キャラクター画像表示設定 --- */
.cs-table-displayimage {
    overflow: hidden;
}

.cs-displayimage {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: top center !important;
}

/* ==========================================================================
   保存ダイアログ・利用規約ツールチップ
   ========================================================================== */
.tos-icon-wrap:hover .tos-tooltip {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.tos-tooltip {
    display: none;
    opacity: 0;
    position: absolute;
    bottom: 130%;
    right: 0;
    width: max-content;
    min-width: 120px;
    max-width: min(280px, 85vw);
    background: rgba(20, 20, 25, 0.98);
    border: 1px solid var(--c-accent-cyan);
    border-radius: 8px;
    padding: 12px;
    color: #eee;
    font-size: 11px;
    line-height: 1.6;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    transform: translateY(10px);
    pointer-events: none;
    white-space: normal;
}

.tooltip-title {
    display: block;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: bold;
    color: var(--c-accent-cyan);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(7, 174, 229, 0.3);
    line-height: 1.4;
    text-align: left;
}

.tos-tooltip b {
    color: var(--c-accent-cyan);
    font-weight: bold;
}

/* ツールチップの三角形 */
.tos-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 20px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--c-accent-cyan) transparent transparent transparent;
}

/* モバイル向け調整 */
@media screen and (max-width: 480px) {
    #saveDialog {
        padding: 20px !important;
    }

    #saveDialog h3 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    #saveDialog label,
    #saveDialog p {
        font-size: 12px !important;
    }

    #saveDialog .btn {
        font-size: 13px !important;
        height: 36px !important;
    }

    .tos-tooltip {
        width: 220px;
        bottom: 130%;
    }
}

/* ==========================================================================
   閲覧モード (is-view-mode) 用のスタイル
   JavaScript実行前のちらつきを防止するために使用
   ========================================================================== */
body.is-view-mode .fixed-button-bar .custom-btn:not(#copyChatPaletteBtn):not(#exportCocofoliaBtn):not(#editModeBtn):not(#galleryBtn) {
    display: none !important;
}

body.is-view-mode .fixed-button-bar #editModeBtn {
    display: inline-block !important;
}

body.is-view-mode button:not(.header-button):not(.header-toggle-banner-link):not(.custom-btn) {
    /* 固定バー以外のボタン、削除ボタン、行追加ボタンなどを非表示 */
    display: none !important;
}

/* モーダル内のボタンなどは表示を維持する必要があるため、除外設定を強化 */
body.is-view-mode #lity button,
body.is-view-mode #imageDialogOverlay button,
body.is-view-mode #saveDialogOverlay button,
body.is-view-mode .lity button {
    display: inline-block !important;
}

body.is-view-mode .cs-trashbox,
body.is-view-mode .cs-sort-handle,
body.is-view-mode .select-image-placeholder {
    display: none !important;
}

/* ギャラリー設定モーダル内でのツールチップ位置調整 */
.gallery-meta-modal .tos-icon-wrap {
    margin-left: 8px;
    /* 見出しとの間隔 */
}

.gallery-meta-modal .tos-tooltip {
    left: -10px;
    right: auto;
    transform: translateY(10px);
    width: 280px;
}

.gallery-meta-modal .tos-icon-wrap:hover .tos-tooltip {
    transform: translateY(0);
}

.gallery-meta-modal .tos-tooltip::after {
    left: 14px;
    right: auto;
}

/* モバイル環境用のはみ出し防止調整 */
@media screen and (max-width: 480px) {
    .gallery-meta-modal .tos-tooltip {
        width: 220px;
        left: -20px;
    }

    .gallery-meta-modal .tos-tooltip::after {
        left: 24px;
    }
}

/* ==========================================================================
   8. サイドバーナビゲーション
   ========================================================================== */

.cs-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    background: rgba(0, 0, 0, 0.5);
    /* 透明度をやや戻して40%に */
    backdrop-filter: blur(1.5px);
    /* 極小のぼかし */
    -webkit-backdrop-filter: blur(1.5px);
    border: 1px solid rgba(7, 174, 229, 0.3);
    /* ボーダーもやや透過させる */
    border-radius: 0;
    padding: 16px 0;
    z-index: 900;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.cs-sidebar:hover {
    width: 240px;
    border-color: var(--c-accent-cyan);
    box-shadow: 0 0 15px rgba(7, 174, 229, 0.2);
}

.cs-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-sidebar-link {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: var(--c-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    cursor: pointer;
}

.cs-sidebar-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: transform 0.2s ease, background-color 0.2s;
}

/* アイコンファイルの定義 */
.cs-icon-personality {
    -webkit-mask-image: url('../../img/character-sheet/personality.svg');
    mask-image: url('../../img/character-sheet/personality.svg');
}

.cs-icon-growth {
    -webkit-mask-image: url('../../img/character-sheet/growth.svg');
    mask-image: url('../../img/character-sheet/growth.svg');
}

.cs-icon-session {
    -webkit-mask-image: url('../../img/character-sheet/session.svg');
    mask-image: url('../../img/character-sheet/session.svg');
}

.cs-icon-ability {
    -webkit-mask-image: url('../../img/character-sheet/ability.svg');
    mask-image: url('../../img/character-sheet/ability.svg');
}

.cs-icon-skill {
    -webkit-mask-image: url('../../img/character-sheet/skill.svg');
    mask-image: url('../../img/character-sheet/skill.svg');
}

.cs-icon-lifestyle {
    -webkit-mask-image: url('../../img/character-sheet/lifestyle.svg');
    mask-image: url('../../img/character-sheet/lifestyle.svg');
}

.cs-icon-item {
    -webkit-mask-image: url('../../img/character-sheet/item.svg');
    mask-image: url('../../img/character-sheet/item.svg');
}

.cs-icon-vehicle {
    -webkit-mask-image: url('../../img/character-sheet/vehicle.svg');
    mask-image: url('../../img/character-sheet/vehicle.svg');
}

.cs-icon-spell {
    -webkit-mask-image: url('../../img/character-sheet/spell.svg');
    mask-image: url('../../img/character-sheet/spell.svg');
}

.cs-icon-chatpalette {
    -webkit-mask-image: url('../../img/character-sheet/chatpalette.svg');
    mask-image: url('../../img/character-sheet/chatpalette.svg');
}

.cs-icon-help-circle {
    -webkit-mask-image: url('../../img/character-sheet/help-circle.svg');
    mask-image: url('../../img/character-sheet/help-circle.svg');
}

.cs-icon-trashbox {
    -webkit-mask-image: url('../../img/character-sheet/icon-trashbox.svg');
    mask-image: url('../../img/character-sheet/icon-trashbox.svg');
}

.cs-icon-file {
    -webkit-mask-image: url('../../img/character-sheet/icon-file.svg');
    mask-image: url('../../img/character-sheet/icon-file.svg');
}

.cs-sidebar-text {
    margin-left: 12px;
    font-size: 13px;
    font-family: var(--font-head);
    font-weight: bold;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.cs-sidebar:hover .cs-sidebar-text {
    opacity: 1;
    transform: translateX(0);
}

.cs-sidebar-link:hover,
.cs-sidebar-link.is-active {
    color: var(--c-accent-cyan);
}

.cs-sidebar-link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--c-accent-cyan);
    box-shadow: 0 0 8px var(--c-accent-cyan);
    border-radius: 0 2px 2px 0;
}

.cs-sidebar-link:hover .cs-sidebar-icon {
    transform: scale(1.1);
    color: var(--c-accent-cyan);
    filter: drop-shadow(0 0 5px var(--c-accent-cyan));
}

/* モバイル・小画面での非表示設定 (User Request) */
@media (max-width: 1200px) {
    .cs-sidebar {
        display: none;
    }
}

/* --- アイテム制作ツールのモバイル表示調整 --- */
@media (max-width: 768px) {

    /* セクション見出しの縮小 */
    .cs-section-header,
    .cs-subsection-header {
        font-size: 10.5px !important;
        padding: 6px 0 !important;
        white-space: nowrap !important;
        letter-spacing: -0.02em;
    }

    /* アイテム制作テーブル全般 */
    .cs-itemcraft-wrapper {
        padding: 8px !important;
    }

    /* ベースアイテム・完成品テーブル (8列) */
    #cs-table-craftBase,
    #cs-table-craftResult,
    #cs-table-craftMaGearDws {
        table-layout: fixed !important;
        width: 100% !important;
    }

    #cs-table-craftBase col:nth-child(1),
    #cs-table-craftResult col:nth-child(1),
    #cs-table-craftMaGearDws col:nth-child(1) {
        width: auto !important;
    }

    /* 名称 */
    #cs-table-craftBase col:nth-child(2),
    #cs-table-craftResult col:nth-child(2),
    #cs-table-craftMaGearDws col:nth-child(2) {
        width: 3em !important;
    }

    /* 種類 */
    #cs-table-craftBase col:nth-child(3),
    #cs-table-craftResult col:nth-child(3),
    #cs-table-craftMaGearDws col:nth-child(3) {
        width: 2.2em !important;
    }

    /* 重量 */
    #cs-table-craftBase col:nth-child(4),
    #cs-table-craftResult col:nth-child(4),
    #cs-table-craftMaGearDws col:nth-child(4) {
        width: 4.5em !important;
    }

    /* 準備 */
    #cs-table-craftBase col:nth-child(5),
    #cs-table-craftResult col:nth-child(5),
    #cs-table-craftMaGearDws col:nth-child(5) {
        width: 4.5em !important;
    }

    /* 使用 */
    #cs-table-craftBase col:nth-child(6),
    #cs-table-craftResult col:nth-child(6),
    #cs-table-craftMaGearDws col:nth-child(6) {
        width: 2.2em !important;
    }

    /* 射程 */
    #cs-table-craftBase col:nth-child(7),
    #cs-table-craftResult col:nth-child(7),
    #cs-table-craftMaGearDws col:nth-child(7) {
        width: 4.8em !important;
    }

    /* 対象 */
    #cs-table-craftBase col:nth-child(8),
    #cs-table-craftResult col:nth-child(8),
    #cs-table-craftMaGearDws col:nth-child(8) {
        width: 5.2em !important;
    }

    /* 判定 */

    /* 素材パーツ、デザイン、クオリティ */
    #cs-table-craftMaterial col:nth-child(1) {
        width: 5.5em !important;
    }

    #cs-table-craftMaterial col:nth-child(2) {
        width: 2.5em !important;
    }

    #cs-table-craftMaterial col:nth-child(4) {
        width: 6em !important;
    }

    #cs-table-craftDesign col:nth-child(1) {
        width: 5.5em !important;
    }

    #cs-table-craftDesign col:nth-child(3) {
        width: 6.2em !important;
    }

    #cs-table-craftQuality col:nth-child(1) {
        width: 5.5em !important;
    }

    #cs-table-craftQuality col:nth-child(3) {
        width: 6.5em !important;
    }

    /* Ma-GEARパーツ */
    #cs-table-craftMaGearParts col:nth-child(1) {
        width: 6.5em !important;
    }

    /* 名称 */
    #cs-table-craftMaGearParts col:nth-child(2) {
        width: 2.5em !important;
    }

    /* 係数 */
    #cs-table-craftMaGearParts col:nth-child(3) {
        width: 2.5em !important;
    }

    /* 魔導 */
    #cs-table-craftMaGearParts col:nth-child(4) {
        width: auto !important;
    }

    /* 解説 */
    #cs-table-craftMaGearParts col:nth-child(5) {
        width: 6.5em !important;
    }

    /* 価格 */

    #cs-table-craftMaGearEffect col:nth-child(1) {
        width: 6.5em !important;
    }

    /* 入力エリアの全体調整 */
    .cs-itemcraft-wrapper textarea,
    .cs-itemcraft-wrapper input,
    .cs-itemcraft-wrapper output,
    .cs-itemcraft-wrapper .is-rg,
    .cs-itemcraft-wrapper .is-md {
        font-size: 10px !important;
        padding: 1px 2px !important;
    }
}

/* ==========================================================================
   Index.html からの移植
   ========================================================================== */

.is-stored {
  opacity: 0.5;
  background-color: rgba(0, 0, 0, 0.2) !important;
}

.is-stored textarea,
.is-stored input,
.is-stored select {
  background-color: transparent !important;
}

/* アイテムカウンター用スタイル */
.item-counter-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
  padding: 2px 2px;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  font-size: 10px;
  color: #aaaab1;
}

.item-count-inputs {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.item-count-inputs input.max-count {
  width: 16px !important;
  height: 12px !important;
  font-size: 10px !important;
  text-align: left !important;
  color: #aaaab1 !important;
}

.item-usage-checkboxes {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  max-height: 21px;
  overflow-y: auto;
}

/* カスタムチェックボックス: サイズを厳密に固定 */
.item-usage-checkboxes input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  width: 9px !important;
  height: 9px !important;
  min-width: 9px !important;
  max-width: 9px !important;
  min-height: 9px !important;
  max-height: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #0ff !important;
  background: #1a1a1e !important;
  display: inline-block !important;
  border-radius: 0 !important;
  flex: 0 0 12px !important;
  box-sizing: border-box !important;
  transition: all 0.2s;
}

.item-usage-checkboxes input[type="checkbox"]:checked {
  background: #0ff !important;
  box-shadow: 0 0 4px #0ff !important;
}

.item-usage-checkboxes input[type="checkbox"]:hover {
  border-color: #fff;
  box-shadow: 0 0 2px #fff;
}

.item-usage-checkboxes::-webkit-scrollbar {
  width: 3px;
}

.item-usage-checkboxes::-webkit-scrollbar-thumb {
  background: #0ff;
  border-radius: 1px;
}

/* ストレージ（保管中）のチェックボックス */
.item-usage-checkboxes input[type="checkbox"].is-stored-checked {
  border-color: #ffbf00 !important;
  cursor: default !important;
  pointer-events: none !important;
}

.item-usage-checkboxes input[type="checkbox"].is-stored-checked:checked {
  background: #ffbf00 !important;
  box-shadow: 0 0 4px #ffbf00 !important;
}

