/* 1. 拡張マージン・パディング */
/* より細かなマージン設定 */
.u-mb-1 { margin-bottom: 0.1em !important; }
.u-mb-2 { margin-bottom: 0.2em !important; }
.u-mb-3 { margin-bottom: 0.3em !important; }
.u-mb-4 { margin-bottom: 0.4em !important; }
.u-mb-6 { margin-bottom: 0.6em !important; }
.u-mb-7 { margin-bottom: 0.7em !important; }
.u-mb-8 { margin-bottom: 0.8em !important; }
.u-mb-35 { margin-bottom: 3.5em !important; }
.u-mb-45 { margin-bottom: 4.5em !important; }

/* より細かなマージントップ設定 */
.u-mt-1 { margin-top: 0.1em !important; }
.u-mt-2 { margin-top: 0.2em !important; }
.u-mt-3 { margin-top: 0.3em !important; }
.u-mt-4 { margin-top: 0.4em !important; }
.u-mt-6 { margin-top: 0.6em !important; }
.u-mt-7 { margin-top: 0.7em !important; }
.u-mt-8 { margin-top: 0.8em !important; }
.u-mt-35 { margin-top: 3.5em !important; }
.u-mt-45 { margin-top: 4.5em !important; }

/* 左右マージン */
.u-ml-5 { margin-left: 0.5em !important; }
.u-ml-10 { margin-left: 1em !important; }
.u-ml-auto { margin-left: auto !important; }
.u-mr-5 { margin-right: 0.5em !important; }
.u-mr-10 { margin-right: 1em !important; }
.u-mr-auto { margin-right: auto !important; }

/* 全方向マージン */
.u-m-0 { margin: 0 !important; }
.u-m-5 { margin: 0.5em !important; }
.u-m-10 { margin: 1em !important; }

/* パディング */
.u-p-0 { padding: 0 !important; }
.u-p-5 { padding: 0.5em !important; }
.u-p-10 { padding: 1em !important; }
.u-p-15 { padding: 1.5em !important; }
.u-p-20 { padding: 2em !important; }

.u-pt-5 { padding-top: 0.5em !important; }
.u-pt-10 { padding-top: 1em !important; }
.u-pb-5 { padding-bottom: 0.5em !important; }
.u-pb-10 { padding-bottom: 1em !important; }

.u-px-5 { padding-left: 0.5em !important; padding-right: 0.5em !important; }
.u-px-10 { padding-left: 1em !important; padding-right: 1em !important; }
.u-py-5 { padding-top: 0.5em !important; padding-bottom: 0.5em !important; }
.u-py-10 { padding-top: 1em !important; padding-bottom: 1em !important; }

/* 2. 表示・非表示の拡張 */
/* より詳細なレスポンシブ表示制御 */
.u-hide { display: none !important; }
.u-show { display: block !important; }
.u-show-inline { display: inline !important; }
.u-show-flex { display: flex !important; }

/* タブレット専用 */
@media (min-width: 600px) and (max-width: 959px) {
    .tb-only { display: block !important; }
    .tb-hide { display: none !important; }
}

/* より細かなブレークポイント */
@media (max-width: 480px) {
    .xs-hide { display: none !important; }
    .xs-only { display: block !important; }
}

@media (min-width: 1400px) {
    .xl-hide { display: none !important; }
    .xl-only { display: block !important; }
}

/* 3. フレックスボックス拡張 */
/* フレックスボックス */
.u-flex { display: flex !important; }
.u-flex-wrap { flex-wrap: wrap !important; }
.u-flex-nowrap { flex-wrap: nowrap !important; }
.u-flex-column { flex-direction: column !important; }
.u-flex-row { flex-direction: row !important; }

/* 配置 */
.u-justify-start { justify-content: flex-start !important; }
.u-justify-end { justify-content: flex-end !important; }
.u-justify-center { justify-content: center !important; }
.u-justify-between { justify-content: space-between !important; }
.u-justify-around { justify-content: space-around !important; }

.u-align-start { align-items: flex-start !important; }
.u-align-end { align-items: flex-end !important; }
.u-align-center { align-items: center !important; }
.u-align-stretch { align-items: stretch !important; }

/* フレックス比率 */
.u-flex-1 { flex: 1 !important; }
.u-flex-2 { flex: 2 !important; }
.u-flex-3 { flex: 3 !important; }
.u-flex-auto { flex: auto !important; }
.u-flex-none { flex: none !important; }

/* ギャップ */
.u-gap-5 { gap: 0.5em !important; }
.u-gap-10 { gap: 1em !important; }
.u-gap-15 { gap: 1.5em !important; }
.u-gap-20 { gap: 2em !important; }


/* 4. グリッドレイアウト */
/* グリッドレイアウト */
.u-grid { display: grid !important; }
.u-grid-2 { display: grid !important; grid-template-columns: 1fr 1fr !important; }
.u-grid-3 { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; }
.u-grid-4 { display: grid !important; grid-template-columns: 1fr 1fr 1fr 1fr !important; }

/* レスポンシブグリッド */
.u-grid-auto { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important; }
.u-grid-auto-sm { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }

/* グリッドギャップ */
.u-grid-gap-5 { gap: 0.5em !important; }
.u-grid-gap-10 { gap: 1em !important; }
.u-grid-gap-15 { gap: 1.5em !important; }
.u-grid-gap-20 { gap: 2em !important; }


/* 5. 幅・高さ */
/* 幅 */
.u-w-25 { width: 25% !important; }
.u-w-33 { width: 33.333% !important; }
.u-w-50 { width: 50% !important; }
.u-w-66 { width: 66.666% !important; }
.u-w-75 { width: 75% !important; }
.u-w-100 { width: 100% !important; }
.u-w-auto { width: auto !important; }
.u-w-fit { width: fit-content !important; }

/* 最大幅 */
.u-max-w-xs { max-width: 20rem !important; }
.u-max-w-sm { max-width: 24rem !important; }
.u-max-w-md { max-width: 28rem !important; }
.u-max-w-lg { max-width: 32rem !important; }
.u-max-w-xl { max-width: 36rem !important; }
.u-max-w-2xl { max-width: 42rem !important; }
.u-max-w-full { max-width: 100% !important; }

/* 高さ */
.u-h-auto { height: auto !important; }
.u-h-100 { height: 100% !important; }
.u-min-h-screen { min-height: 100vh !important; }


/* 6. 位置・配置 */
/* ポジション */
.u-relative { position: relative !important; }
.u-absolute { position: absolute !important; }
.u-fixed { position: fixed !important; }
.u-sticky { position: sticky !important; }

/* z-index */
.u-z-0 { z-index: 0 !important; }
.u-z-10 { z-index: 10 !important; }
.u-z-20 { z-index: 20 !important; }
.u-z-30 { z-index: 30 !important; }
.u-z-40 { z-index: 40 !important; }
.u-z-50 { z-index: 50 !important; }

/* 中央配置 */
.u-center-x {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}
.u-center-y {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
.u-center-xy {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* 7. 境界線・影の拡張 */
/* 境界線の詳細設定 */
.u-border-0 { border: none !important; }
.u-border-1 { border: 1px solid var(--color_border) !important; }
.u-border-2 { border: 2px solid var(--color_border) !important; }

.u-border-t { border-top: 1px solid var(--color_border) !important; }
.u-border-b { border-bottom: 1px solid var(--color_border) !important; }
.u-border-l { border-left: 1px solid var(--color_border) !important; }
.u-border-r { border-right: 1px solid var(--color_border) !important; }

/* 角丸 */
.u-rounded-0 { border-radius: 0 !important; }
.u-rounded-sm { border-radius: 2px !important; }
.u-rounded { border-radius: 4px !important; }
.u-rounded-md { border-radius: 6px !important; }
.u-rounded-lg { border-radius: 8px !important; }
.u-rounded-xl { border-radius: 12px !important; }
.u-rounded-full { border-radius: 50% !important; }

/* 影 */
.u-shadow-none { box-shadow: none !important; }
.u-shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important; }
.u-shadow { box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important; }
.u-shadow-md { box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important; }
.u-shadow-lg { box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important; }

/* 8. トランジション・アニメーション */
/* トランジション */
.u-transition { transition: all 0.3s ease !important; }
.u-transition-fast { transition: all 0.15s ease !important; }
.u-transition-slow { transition: all 0.5s ease !important; }

/* ホバーエフェクト拡張 */
.u-hover-scale:hover { transform: scale(1.05) !important; }
.u-hover-scale-sm:hover { transform: scale(1.02) !important; }
.u-hover-scale-lg:hover { transform: scale(1.1) !important; }

.u-hover-shadow:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important; }
.u-hover-lift:hover { transform: translateY(-2px) !important; }

/* アニメーション */
.u-pulse { animation: pulse 2s infinite !important; }
.u-bounce { animation: bounce 1s infinite !important; }
.u-fade-in { animation: fadeIn 0.5s ease-in !important; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-30px,0); }
    70% { transform: translate3d(0,-15px,0); }
    90% { transform: translate3d(0,-4px,0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* 9. 背景・グラデーション */
/* 背景色の透明度 */
.u-bg-main-10 { background-color: rgba(var(--color_main_rgb), 0.1) !important; }
.u-bg-main-20 { background-color: rgba(var(--color_main_rgb), 0.2) !important; }
.u-bg-main-30 { background-color: rgba(var(--color_main_rgb), 0.3) !important; }

/* グラデーション */
.u-bg-gradient-main {
    background: linear-gradient(135deg, var(--color_main) 0%, var(--color_main_thin) 100%) !important;
}
.u-bg-gradient-gray {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* パターン背景 */
.u-bg-dots {
    background-image: radial-gradient(circle, #ddd 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
}
.u-bg-lines {
    background-image: linear-gradient(45deg, transparent 35%, #ddd 35%, #ddd 65%, transparent 65%) !important;
    background-size: 20px 20px !important;
}

/* 10. テキスト・フォント拡張 */
/* 行間 */
.u-lh-tight { line-height: 1.25 !important; }
.u-lh-snug { line-height: 1.375 !important; }
.u-lh-normal { line-height: 1.5 !important; }
.u-lh-relaxed { line-height: 1.625 !important; }
.u-lh-loose { line-height: 2 !important; }

/* 文字間隔 */
.u-tracking-tight { letter-spacing: -0.05em !important; }
.u-tracking-normal { letter-spacing: 0 !important; }
.u-tracking-wide { letter-spacing: 0.05em !important; }
.u-tracking-wider { letter-spacing: 0.1em !important; }

/* テキスト装飾 */
.u-underline { text-decoration: underline !important; }
.u-line-through { text-decoration: line-through !important; }
.u-no-underline { text-decoration: none !important; }

/* テキスト変形 */
.u-uppercase { text-transform: uppercase !important; }
.u-lowercase { text-transform: lowercase !important; }
.u-capitalize { text-transform: capitalize !important; }

/* 省略 */
.u-truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* 複数行省略 */
.u-line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.u-line-clamp-3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}


/* 11. カスタムボックス */
/* 情報ボックス */
.custom-info-box {
    background: #e1f5fe;
    border-left: 4px solid #0288d1;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 4px 4px 0;
}

.custom-warning-box {
    background: #fff3e0;
    border-left: 4px solid #f57c00;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 4px 4px 0;
}

.custom-success-box {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 4px 4px 0;
}

.custom-error-box {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 4px 4px 0;
}

/* コードボックス */
.custom-code-box {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1em;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    margin: 1.5em 0;
}

/* 強調ボックス */
.custom-highlight-box {
    background: linear-gradient(90deg, var(--color_main) 0%, var(--color_main_thin) 100%);
    color: white;
    padding: 1.5em;
    border-radius: 8px;
    margin: 2em 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
