/*---------------------------------------------------------------------------
上部ボタンメニューのスタイル
---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------
メインコンテナのレスポンシブ調整
---------------------------------------------------------------------------*/

/* メインコンテナ基本設定 */
#contents {
    height: auto;
    min-height: 100vh;
    margin-right: 15px;
    margin-left: 15px;
    animation: opa1 2s both;
    padding-bottom: 60px; /* フッターのための余白 */
}

/* トップページ以外のコンテンツ */
body:not(.home) #contents {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    margin-top: 100px; /* 上部ボタンメニューの高さ分 */
    padding: 25px;
    overflow: hidden;
}

/* mainブロックの調整 */
main {
    display: block;
    padding-top: 30px;
    max-width: 100%;
    overflow-x: hidden;
}

/* トップページのmain */
.home main {
    padding-right: 15px;
    overflow: visible;
}

/* section間のスペース調整 */
section + section {
    padding-top: 25px;
    margin-top: 25px;
    border-top: 1px solid #eee;
}

/* box1の調整 */
.box1 {
    box-shadow: 1px 3px 12px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 25px;
}

/* テーブルの調整 */
.ta1 {
    width: 100%;
    overflow-x: auto;
    display: block;
    margin-bottom: 25px;
}

.ta1 th, .ta1 td {
    min-width: 120px;
    padding: 12px 15px;
}

/* listコンテナの調整 */
.list-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.list:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.list figure {
    width: 100%;
    margin: 0 0 15px 0;
    border-radius: 8px;
    overflow: hidden;
}

.list h4 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

/* FAQの調整 */
.faq dt {
    margin-bottom: 15px;
    padding: 12px 20px 12px 50px;
    border-radius: 8px;
}

.faq dd {
    padding: 10px 20px 25px 50px;
}

/* ボタンの調整 */
.btn a, .btn input {
    display: inline-block;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 8px;
    min-width: 140px;
    text-align: center;
}

/*---------------------------------------------------------------------------
レスポンシブ対応 - 段階的に調整
---------------------------------------------------------------------------*/

/* 小型タブレット/大きなスマホ (481px〜768px) */
@media screen and (min-width: 481px) {
    #contents {
        margin-right: 25px;
        margin-left: 25px;
    }
    
    body:not(.home) #contents {
        margin-top: 110px;
        padding: 30px;
    }
    
    .box1 {
        padding: 30px;
    }
    
    .list-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .list {
        padding: 25px;
    }
}

/* タブレット (769px〜1024px) */
@media screen and (min-width: 769px) {
    #contents {
        margin-right: 40px;
        margin-left: 40px;
    }
    
    body:not(.home) #contents {
        margin-top: 120px;
        padding: 40px;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    main {
        padding-top: 40px;
    }
    
    .home main {
        padding-right: 40px;
    }
    
    section + section {
        padding-top: 35px;
        margin-top: 35px;
    }
    
    .box1 {
        padding: 35px;
        margin-bottom: 35px;
    }
    
    .list-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .ta1 th {
        width: 25%;
    }
    
    /* 2カラムレイアウト */
    .two-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }
    
    .two-columns > * {
        margin-bottom: 0;
    }
}
/* リファクタリング用追加スタイル */

/* リードテキスト */
.lead {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #444;
}

/* イントロテキスト */
.intro {
    font-size: 1em;
    margin-bottom: 30px;
    color: #666;
}

/* カードアイコン */
.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
    text-align: center;
}

/* カード内のタイトル */
.card h3 {
    font-size: 1.2em;
    margin: 0 0 10px 0;
    color: #333;
    text-align: center;
}

/* カード内のテキスト */
.card p {
    font-size: 0.9em;
    line-height: 1.5;
    color: #666;
    text-align: center;
}

/* 特徴リスト */
.feature-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 25px;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #60bc9d;
    font-weight: bold;
}

/* ハイライトボックス */
.highlight-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid #60bc9d;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.callout {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

/* 特徴カード */
.feature-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.feature-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.feature-card p {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px 15px;
    border-radius: 5px;
    color: #856404;
    margin: 15px 0 0 0;
}

/* 画像コンテナ修正 */
.image-container {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.03);
}

/* ボタン修正 */
.btn_cnt {
    text-align: center;
    margin-top: 25px;
}

.btn {
    display: inline-block;
    background: linear-gradient(to right, #60bc9d, #85cfb6);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(96, 188, 157, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 188, 157, 0.4);
    color: white;
}

.btn i {
    margin-right: 8px;
}

/* レスポンシブ調整 */
@media screen and (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .two-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-list li {
        padding: 6px 0;
        font-size: 0.9em;
    }
    
    .highlight-box {
        padding: 15px;
    }
    
    .card h3 {
        font-size: 1.1em;
    }
    
    .card-icon {
        font-size: 35px;
    }
}

/* タブレット以上 */
@media screen and (min-width: 769px) {
    .media-text {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: center;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* デスクトップ */
@media screen and (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* デスクトップ (1025px〜1200px) */
@media screen and (min-width: 1025px) {
    #contents {
        margin-right: 60px;
        margin-left: 60px;
    }
    
    body:not(.home) #contents {
        margin-top: 130px;
        padding: 50px;
    }
    
    main {
        padding-top: 50px;
    }
    
    .home main {
        padding-right: 60px;
    }
    
    .list-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ta1 th {
        width: 20%;
    }
    
    /* 3カラムレイアウト */
    .three-columns {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

/* 大きなデスクトップ (1201px〜) */
@media screen and (min-width: 1201px) {
    #contents {
        margin-right: 80px;
        margin-left: 80px;
    }
    
    body:not(.home) #contents {
        margin-top: 140px;
        padding: 60px;
    }
    
    main {
        padding-top: 60px;
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .box1 {
        padding: 40px;
        margin-bottom: 40px;
    }
    
    .list-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 35px;
    }
}

/* 超大型デスクトップ (1800px〜) */
@media screen and (min-width: 1800px) {
    #contents {
        max-width: 1800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    body:not(.home) #contents {
        padding: 70px;
    }
    
    main {
        padding-top: 70px;
    }
}

/*---------------------------------------------------------------------------
トップページ専用のレスポンシブ調整
---------------------------------------------------------------------------*/

/* トップページの背景画像調整 */
body.home {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* トップページのメインコンテンツ */
.home #contents {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 100vh;
    padding-bottom: 100px;
    margin-left: 40px;
}

/* トップページのボックス1 */
.home .box1 {
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* トップページのレスポンシブ調整 */
@media screen and (max-width: 768px) {
    .home #contents {
        margin-left: 20px;
        padding-bottom: 60px;
    }
    
    .home .box1 {
        max-width: 100%;
        margin-right: 20px;
    }
}

@media screen and (min-width: 1025px) {
    .home #contents {
        margin-left: 80px;
        padding-bottom: 120px;
    }
    
    .home .box1 {
        max-width: 700px;
    }
}

/*---------------------------------------------------------------------------
特殊なレイアウトユーティリティクラス
---------------------------------------------------------------------------*/

/* フル幅コンテンツ */
.full-width {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 40px 20px;
}

/* コンテンツ制限 */
.content-limited {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* カードグリッド */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* メディアとテキストのレイアウト */
.media-text {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

@media screen and (min-width: 768px) {
    .media-text {
        grid-template-columns: 1fr 1fr;
    }
    
    .media-text.reverse {
        direction: rtl;
    }
    
    .media-text.reverse > * {
        direction: ltr;
    }
}

/*---------------------------------------------------------------------------
コンテンツの流動的な幅調整
---------------------------------------------------------------------------*/

/* コンテンツ幅の自動調整 */
.auto-width {
    width: auto;
    max-width: 100%;
}

/* レスポンシブ画像 */
.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ビデオコンテナ */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin-bottom: 25px;
    border-radius: 8px;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/*---------------------------------------------------------------------------
印刷用スタイル
---------------------------------------------------------------------------*/

@media print {
    #contents {
        margin: 0;
        padding: 20px;
        box-shadow: none;
        background: white !important;
    }
    
    body:not(.home) #contents {
        margin-top: 0;
        border-radius: 0;
    }
    
    .top-button-container,
    #menubar_hdr,
    .btn,
    .pagetop {
        display: none !important;
    }
    
    main {
        padding-top: 0;
    }
}
/*---------------------------------------------------------------------------
上部ボタンメニューの調整 - コンパクト化
---------------------------------------------------------------------------*/

/* ボタンコンテナ */
.top-button-container {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99;
    padding: 8px 10px; /* パディングを小さく */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #eee;
    justify-content: center;
    gap: 6px; /* ギャップを小さく */
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 60px; /* 最小高さを設定 */
    max-height: 70px; /* 最大高さを制限 */
    align-items: center; /* 垂直方向中央揃え */
}

/* ロゴ画像の調整 */
.top-button-container #logo {
    display: inline-block;
    margin: 0 10px 0 0;
    padding: 0;
    line-height: 0;
}

.top-button-container #logo img {
    max-height: 40px; /* ロゴの高さを制限 */
    width: auto;
    object-fit: contain;
}

/* 各ボタン - よりコンパクトに */
.top-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #555;
    padding: 6px 10px; /* パディングを小さく */
    border-radius: 10px;
    background: #f8f8f8;
    border: 1px solid #ddd; /* ボーダーを細く */
    min-width: 60px; /* 最小幅を小さく */
    max-width: 85px; /* 最大幅を小さく */
    flex: 0 0 auto; /* 均等に広がらないように */
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    height: 45px; /* 高さを固定 */
}

/* ボタンアイコン */
.button-icon {
    font-size: 16px; /* アイコンを小さく */
    margin-bottom: 3px;
    display: block;
}

/* ボタンテキスト */
.button-text {
    font-size: 10px; /* フォントサイズを小さく */
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ボタンホバー時 */
.top-button:hover {
    background: linear-gradient(135deg, #85cfb6, #60bc9d);
    color: white;
    border-color: #60bc9d;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(96, 188, 157, 0.3);
}

/* アクティブなボタン */
.top-button.active {
    background: linear-gradient(135deg, #60bc9d, #85cfb6);
    color: white;
    border-color: #85cfb6;
    box-shadow: 0 2px 6px rgba(96, 188, 157, 0.4);
}

/* メインコンテンツの位置調整 - 重ならないように十分なマージン */
#contents {
    margin-top: 70px !important; /* 強制的にマージンを設定 */
    transition: margin-top 0.3s ease;
}

/* トップページの場合 */
.home #contents {
    margin-top: 70px !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: calc(100vh - 70px); /* 高さを調整 */
    padding-bottom: 100px;
    margin-left: 40px;
}

/* メインコンテンツ内の要素がはみ出ないように */
main {
    padding-top: 20px; /* 上部パディングを小さく */
    width: 100%;
    box-sizing: border-box;
}

/* スクロールバー非表示 */
.top-button-container::-webkit-scrollbar {
    height: 4px;
}

.top-button-container::-webkit-scrollbar-thumb {
    background: rgba(96, 188, 157, 0.3);
    border-radius: 2px;
}

/*---------------------------------------------------------------------------
レスポンシブ対応 - モバイル優先
---------------------------------------------------------------------------*/

/* スマホ縦向き */
@media screen and (max-width: 480px) {
    .top-button-container {
        padding: 6px 8px;
        gap: 4px;
        min-height: 55px;
        max-height: 60px;
    }
    
    .top-button {
        padding: 4px 8px;
        min-width: 55px;
        max-width: 70px;
        height: 40px;
        border-radius: 8px;
    }
    
    .top-button-container #logo {
        margin: 0 5px 0 0;
    }
    
    .top-button-container #logo img {
        max-height: 35px;
    }
    
    .button-icon {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .button-text {
        font-size: 9px;
    }
    
    #contents {
        margin-top: 60px !important;
    }
    
    .home #contents {
        margin-top: 60px !important;
        min-height: calc(100vh - 60px);
        margin-left: 20px;
        padding-bottom: 60px;
    }
}

/* タブレット */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .top-button-container {
        padding: 8px 12px;
        gap: 8px;
        min-height: 65px;
        max-height: 70px;
    }
    
    .top-button {
        padding: 6px 12px;
        min-width: 65px;
        max-width: 90px;
        height: 45px;
    }
    
    .button-icon {
        font-size: 18px;
    }
    
    .button-text {
        font-size: 11px;
    }
    
    #contents {
        margin-top: 70px !important;
    }
    
    .home #contents {
        margin-top: 70px !important;
        min-height: calc(100vh - 70px);
    }
}
/*---------------------------------------------------------------------------
上部ボタンメニュー - 超コンパクトバージョン
---------------------------------------------------------------------------*/

/* ボタンコンテナ - 非常にコンパクトに */
.top-button-container {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    padding: 4px 6px; /* さらに小さく */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #eee;
    justify-content: center;
    gap: 4px; /* ギャップを最小限に */
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 48px; /* 高さを小さく */
    max-height: 50px; /* 最大高さを制限 */
    align-items: center;
}

/* ロゴ画像 - 小さく */
.top-button-container #logo {
    display: inline-block;
    margin: 0 6px 0 0;
    padding: 0;
    line-height: 0;
}

.top-button-container #logo img {
    max-height: 32px; /* ロゴをさらに小さく */
    width: auto;
    object-fit: contain;
}

/* 各ボタン - 超コンパクト */
.top-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #555;
    padding: 4px 8px; /* パディングを最小限に */
    border-radius: 8px; /* 角丸を小さく */
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    min-width: 52px; /* 最小幅を小さく */
    max-width: 72px; /* 最大幅を小さく */
    flex: 0 0 auto;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 38px; /* 高さを小さく */
}

/* ボタンアイコン - 小さく */
.button-icon {
    font-size: 14px; /* アイコンを小さく */
    margin-bottom: 2px;
    display: block;
    line-height: 1;
}

/* ボタンテキスト - 非常に小さく */
.button-text {
    font-size: 9px; /* フォントサイズをさらに小さく */
    font-weight: 500;
    line-height: 1;
    text-align: center;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px; /* 文字間を詰める */
}

/* ボタンホバー時 */
.top-button:hover {
    background: linear-gradient(135deg, #85cfb6, #60bc9d);
    color: white;
    border-color: #60bc9d;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(96, 188, 157, 0.3);
}

/* アクティブなボタン */
.top-button.active {
    background: linear-gradient(135deg, #60bc9d, #85cfb6);
    color: white;
    border-color: #85cfb6;
    box-shadow: 0 1px 4px rgba(96, 188, 157, 0.4);
}

/* メインコンテンツの位置調整 */
#contents {
    margin-top: 52px !important; /* 高さに合わせて調整 */
    transition: margin-top 0.3s ease;
}

/* トップページの場合 */
.home #contents {
    margin-top: 52px !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: calc(100vh - 52px);
    padding-bottom: 80px;
    margin-left: 20px;
}

/* スクロールバー非表示 */
.top-button-container::-webkit-scrollbar {
    height: 2px;
}

.top-button-container::-webkit-scrollbar-thumb {
    background: rgba(96, 188, 157, 0.3);
    border-radius: 1px;
}

/*---------------------------------------------------------------------------
レスポンシブ対応 - 超コンパクト
---------------------------------------------------------------------------*/

/* スマホ縦向き (〜480px) */
@media screen and (max-width: 480px) {
    .top-button-container {
        padding: 3px 4px;
        gap: 3px;
        min-height: 42px;
        max-height: 44px;
    }
    
    .top-button {
        padding: 3px 6px;
        min-width: 48px;
        max-width: 65px;
        height: 34px;
        border-radius: 6px;
    }
    
    .top-button-container #logo {
        margin: 0 4px 0 0;
    }
    
    .top-button-container #logo img {
        max-height: 28px;
    }
    
    .button-icon {
        font-size: 12px;
        margin-bottom: 1px;
    }
    
    .button-text {
        font-size: 8px;
        letter-spacing: -0.3px;
    }
    
    #contents {
        margin-top: 44px !important;
    }
    
    .home #contents {
        margin-top: 44px !important;
        min-height: calc(100vh - 44px);
        margin-left: 15px;
        padding-bottom: 50px;
    }
}

/* スマホ横向き / 小型タブレット (481px〜768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .top-button-container {
        padding: 4px 8px;
        gap: 5px;
        min-height: 46px;
        max-height: 48px;
    }
    
    .top-button {
        padding: 4px 8px;
        min-width: 50px;
        max-width: 70px;
        height: 36px;
        border-radius: 7px;
    }
    
    .top-button-container #logo img {
        max-height: 30px;
    }
    
    .button-icon {
        font-size: 13px;
    }
    
    .button-text {
        font-size: 8.5px;
    }
    
    #contents {
        margin-top: 48px !important;
    }
    
    .home #contents {
        margin-top: 48px !important;
        min-height: calc(100vh - 48px);
        margin-left: 25px;
        padding-bottom: 60px;
    }
}

/* タブレット (769px〜1024px) */
@media screen and (min-width: 769px) {
    .top-button-container {
        padding: 5px 10px;
        gap: 6px;
        min-height: 50px;
        max-height: 52px;
        justify-content: flex-start;
        padding-left: 160px; /* ロゴのスペース */
    }
    
    .top-button {
        padding: 5px 10px;
        min-width: 55px;
        max-width: 80px;
        height: 38px;
        border-radius: 8px;
    }
    
    .top-button-container #logo {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
    
    .top-button-container #logo img {
        max-height: 32px;
    }
    
    .button-icon {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .button-text {
        font-size: 9px;
    }
    
    #contents {
        margin-top: 52px !important;
    }
    
    .home #contents {
        margin-top: 52px !important;
        min-height: calc(100vh - 52px);
        margin-left: 40px;
        padding-bottom: 80px;
    }
}

/* デスクトップ (1025px〜1200px) */
@media screen and (min-width: 1025px) {
    .top-button-container {
        padding-left: 170px;
        padding-right: 30px;
    }
    
    .top-button {
        min-width: 60px;
        max-width: 85px;
        height: 40px;
    }
    
    .top-button-container #logo img {
        max-height: 34px;
    }
    
    .button-icon {
        font-size: 15px;
    }
    
    .button-text {
        font-size: 9.5px;
    }
}

/* 大型デスクトップ (1201px〜) */
@media screen and (min-width: 1201px) {
    .top-button-container {
        padding-left: 180px;
        padding-right: 40px;
        min-height: 52px;
        max-height: 54px;
    }
    
    .top-button {
        min-width: 65px;
        max-width: 90px;
        height: 42px;
    }
    
    .top-button-container #logo img {
        max-height: 36px;
    }
    
    .button-icon {
        font-size: 16px;
    }
    
    .button-text {
        font-size: 10px;
    }
    
    #contents {
        margin-top: 54px !important;
    }
    
    .home #contents {
        margin-top: 54px !important;
        min-height: calc(100vh - 54px);
    }
}

/*---------------------------------------------------------------------------
スクロール時のさらなるコンパクト化
---------------------------------------------------------------------------*/

.top-button-container.scrolled {
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
    min-height: 40px;
    max-height: 42px;
}

.top-button-container.scrolled .top-button {
    height: 32px;
    padding: 2px 6px;
    min-width: 45px;
    max-width: 70px;
}

.top-button-container.scrolled .button-icon {
    font-size: 11px;
    margin-bottom: 1px;
}

.top-button-container.scrolled .button-text {
    font-size: 7.5px;
}

.top-button-container.scrolled #logo img {
    max-height: 26px;
}

/* スクロール時のコンテンツ調整 */
.top-button-container.scrolled ~ #contents {
    margin-top: 42px !important;
}

.home .top-button-container.scrolled ~ #contents {
    margin-top: 42px !important;
    min-height: calc(100vh - 42px);
}

/*---------------------------------------------------------------------------
アクセシビリティ対応 - タッチターゲットの最小サイズ確保
---------------------------------------------------------------------------*/

/* タップしやすさを確保するための疑似要素 */
.top-button::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    z-index: -1;
}

/* フォーカス状態 */
.top-button:focus {
    outline: 2px solid #60bc9d;
    outline-offset: 2px;
}

/*---------------------------------------------------------------------------
JavaScriptで制御するためのユーティリティクラス
---------------------------------------------------------------------------*/

/* ミニモード - さらに小さく */
.top-button-container.mini-mode {
    min-height: 40px;
    max-height: 42px;
    padding: 3px 5px;
    gap: 3px;
}

.top-button-container.mini-mode .top-button {
    height: 32px;
    padding: 2px 5px;
    min-width: 45px;
    max-width: 65px;
    border-radius: 6px;
}

.top-button-container.mini-mode .button-icon {
    font-size: 11px;
    margin-bottom: 1px;
}

.top-button-container.mini-mode .button-text {
    font-size: 7.5px;
}

.top-button-container.mini-mode #logo img {
    max-height: 26px;
}

/* ミニモード時のコンテンツ調整 */
.top-button-container.mini-mode ~ #contents {
    margin-top: 42px !important;
}

.home .top-button-container.mini-mode ~ #contents {
    margin-top: 42px !important;
    min-height: calc(100vh - 42px);
}

/*---------------------------------------------------------------------------
極小モード - 限界まで小さく（ユーザー設定用）
---------------------------------------------------------------------------*/

.top-button-container.tiny-mode {
    min-height: 36px;
    max-height: 38px;
    padding: 2px 4px;
    gap: 2px;
}

.top-button-container.tiny-mode .top-button {
    height: 28px;
    padding: 1px 4px;
    min-width: 40px;
    max-width: 60px;
    border-radius: 5px;
}

.top-button-container.tiny-mode .button-icon {
    font-size: 10px;
    margin-bottom: 0;
}

.top-button-container.tiny-mode .button-text {
    font-size: 7px;
    letter-spacing: -0.4px;
}

.top-button-container.tiny-mode #logo img {
    max-height: 24px;
}

/* 極小モード時のコンテンツ調整 */
.top-button-container.tiny-mode ~ #contents {
    margin-top: 38px !important;
}

.home .top-button-container.tiny-mode ~ #contents {
    margin-top: 38px !important;
    min-height: calc(100vh - 38px);
}
/* デスクトップ */
@media screen and (min-width: 769px) {
    .top-button-container {
        padding: 10px 15px;
        gap: 10px;
        min-height: 70px;
        max-height: 75px;
        justify-content: flex-start;
        padding-left: 180px; /* ロゴのスペースを確保 */
    }
    
    .top-button {
        padding: 8px 15px;
        min-width: 70px;
        max-width: 100px;
        height: 50px;
        border-radius: 12px;
    }
    
    .top-button-container #logo {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
    
    .top-button-container #logo img {
        max-height: 45px;
    }
    
    .button-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .button-text {
        font-size: 12px;
    }
    
    #contents {
        margin-top: 75px !important;
    }
    
    .home #contents {
        margin-top: 75px !important;
        min-height: calc(100vh - 75px);
    }
}

/* 大きなデスクトップ */
@media screen and (min-width: 1024px) {
    .top-button-container {
        padding-left: 200px;
        padding-right: 40px;
    }
    
    .top-button {
        min-width: 80px;
        max-width: 110px;
        height: 55px;
    }
    
    .top-button-container #logo img {
        max-height: 50px;
    }
}

/*---------------------------------------------------------------------------
スクロール時の効果
---------------------------------------------------------------------------*/

.top-button-container.scrolled {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
}

.top-button-container.scrolled .top-button {
    height: 42px;
    padding: 5px 10px;
}

.top-button-container.scrolled #logo img {
    max-height: 35px;
}

/*---------------------------------------------------------------------------
特別な調整 - コンテンツが隠れないように
---------------------------------------------------------------------------*/

/* box1が上部に隠れないように */
.box1 {
    position: relative;
    z-index: 1;
}

/* ページトップボタンの調整 */
.pagetop {
    bottom: 30px;
    right: 20px;
}

/* フッターメニューの調整 */
#footermenu {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/*---------------------------------------------------------------------------
JavaScript用のクラス
---------------------------------------------------------------------------*/

/* メニューがスクロール時にコンパクトになる */
.top-button-container.compact {
    min-height: 55px;
    max-height: 60px;
    padding: 5px 10px;
}

.top-button-container.compact .top-button {
    height: 40px;
    padding: 4px 8px;
    min-width: 50px;
    max-width: 75px;
}

.top-button-container.compact .button-icon {
    font-size: 14px;
    margin-bottom: 2px;
}

.top-button-container.compact .button-text {
    font-size: 9px;
}