/* モバイル最適化スタイル */

@media (max-width: 1024px) {
    /* タッチ操作を最適化 */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .toolbar {
        padding: 0.5rem;
    }

    .toolbar-title {
        font-size: 1rem;
    }

    .toolbar-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-height: 40px;
    }

    .help-panel {
        display: none; /* モバイルでは非表示 */
    }
}

@media (max-width: 640px) {
    .toolbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .toolbar-title {
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }

    .toolbar-title span {
        font-size: 1.2rem;
    }

    .toolbar-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
        width: 100%;
    }

    .toolbar-btn {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.4rem 0.2rem;
        font-size: 0.65rem;
        min-height: auto;
        gap: 0.1rem;
        white-space: nowrap;
    }

    .toolbar-btn span {
        font-size: 1rem;
    }

    .toolbar-checkbox {
        flex-direction: column;
        padding: 0.4rem 0.2rem;
        font-size: 0.65rem;
        gap: 0.1rem;
    }

    .toolbar-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .toolbar-checkbox span {
        text-align: center;
        line-height: 1.1;
    }

    /* 削除エリアの位置調整 */
    .delete-area {
        bottom: 2rem;
        right: 1rem;
        width: 140px;
        height: 100px;
        font-size: 0.8rem;
    }

    .delete-icon {
        font-size: 2rem;
    }

    .delete-text {
        font-size: 0.75rem;
    }
}

/* 横向き画面 */
@media (max-height: 500px) and (orientation: landscape) {
    .toolbar {
        padding: 0.5rem;
    }

    .toolbar-title {
        font-size: 1rem;
    }

    .toolbar-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* タッチデバイス特有のスタイル */
@media (hover: none) and (pointer: coarse) {
    /* タッチターゲットを大きく */
    .toolbar-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* スクロールバーを隠す */
    ::-webkit-scrollbar {
        display: none;
    }

    * {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}
