﻿        :root {
            --primary-color: #2563eb;
            --bg-color: #f3f4f6;
            --paper-bg: #ffffff;
            --error-color: #ef4444;
            --border-color: #d1d5db;
            --accent-color: #f59e0b;
        }

        * {
            box-sizing: border-box;
            font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
        }

        body {
            background-color: var(--bg-color);
            margin: 0;
            padding: 20px;
            color: #374151;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
        }

        /* タブ切り替え */
        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .tab-btn {
            flex: 1;
            padding: 15px;
            border: none;
            background: #e5e7eb;
            cursor: pointer;
            font-size: 18px;
            font-weight: bold;
            border-radius: 8px 8px 0 0;
            transition: 0.3s;
        }

        .tab-btn.active {
            background: var(--paper-bg);
            color: var(--primary-color);
            border-bottom: 3px solid var(--primary-color);
        }

        /* メインペーパー */
        .paper {
            background: var(--paper-bg);
            padding: 40px;
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            border-radius: 8px;
            min-height: 600px;
        }

        .section {
            display: none;
        }

        .section.active {
            display: block;
        }

        h2 {
            border-left: 5px solid var(--primary-color);
            padding-left: 10px;
            margin-bottom: 20px;
            font-size: 20px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            font-size: 14px;
        }

        input[type="text"],
        input[type="email"],
        input[type="number"],
        input[type="tel"],
        select,
        textarea {
            width: 100%;
            padding: 10px;
            border: 2px solid var(--border-color);
            border-radius: 6px;
            font-size: 16px;
        }

        /* 項目行 */
        .item-row {
            background: #f9fafb;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 15px;
            position: relative;
            border: 1px solid #e5e7eb;
        }

        .btn-delete {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--error-color);
            color: white;
            border: none;
            padding: 5px 12px;
            border-radius: 4px;
            cursor: pointer;
        }

        .btn-add {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            width: 100%;
            margin-top: 10px;
        }

        .preset-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 10px;
            margin-bottom: 20px;
        }

        .btn-preset {
            background: #fff;
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
            padding: 8px;
            border-radius: 6px;
            font-size: 13px;
            cursor: pointer;
        }

        /* サマリー */
        .summary-area {
            text-align: right;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 2px solid #eee;
        }

        .summary-row {
            display: flex;
            justify-content: flex-end;
            gap: 20px;
            font-size: 18px;
            margin-bottom: 5px;
        }

        .total-row {
            font-size: 28px;
            font-weight: bold;
            color: var(--primary-color);
        }

        #save-status {
            position: fixed;
            top: 20px;
            right: 20px;
            background: #059669;
            color: white;
            padding: 10px 20px;
            border-radius: 5px;
            display: none;
            z-index: 1000;
        }

        /* 印刷用スタイル */
        @media print {
            .tabs, .btn-add, .btn-delete, .preset-container, #save-status, .config-ui, .no-print, h2, .form-group label:not(.print-label), .radio-group, .history-area {
                display: none !important;
            }

            body { background: white; padding: 0; }
            .container { max-width: 100%; margin: 0; }
            .paper { box-shadow: none; padding: 0; border: none; }

            .print-only {
                display: block !important;
            }

            input, select, textarea {
                border: none !important;
                padding: 0 !important;
                height: auto !important;
                background: transparent !important;
                appearance: none;
            }

            .print-table {
                width: 100%;
                border-collapse: collapse;
                margin-top: 20px;
            }
            .print-table th {
                background-color: #f0f4f8 !important;
                border: 1px solid #000;
                padding: 8px;
                text-align: center;
            }
            .print-table td {
                border: 1px solid #000;
                padding: 8px;
            }
        }

        .print-only { display: none; }

        .stamp-box {
            width: 70px;
            height: 70px;
            border: 2px solid rgba(255, 0, 0, 0.5);
            color: rgba(255, 0, 0, 0.5);
            text-align: center;
            line-height: 1.2;
            padding: 10px 5px;
            font-size: 14px;
            font-weight: bold;
            position: absolute;
            right: 10px;
            top: 10px;
        }
