/* 共通 */
body, html {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 0;
    height: 100%;
    /* overflow: hidden; */
}
#area-wrapper {
    height: 100vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch; /* iOS の慣性スクロール対応 */
}

/* ロゴスタイル */
.logo {
    font-size: small;
    /* font-size: 1.8rem; */
    font-weight: bold;
    font-family: "Roboto", sans-serif;
    margin-bottom: 1rem;
}
.logo a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.logo a:hover {
    cursor: pointer;
    opacity: 0.7;
}

/* index.html */
@import url(https://fonts.googleapis.com/css?family=Roboto:300);
    .base {
        background: #76b852;
        background: rgb(141,194,111);
        background: linear-gradient(90deg, rgba(141,194,111,1) 0%, rgba(118,184,82,1) 50%);
        font-family: "Roboto", sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        place-content: center;
    }
    /* .login-page {
        width: 90%;
        padding: 8% 0 0;
        margin: auto;
    }
    .form {
        position: relative;
        z-index: 1;
        background: #FFFFFF;
        max-width: 90%;
        margin: 0 auto 100px;
        padding: 45px;
        text-align: center;
        box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
    }
    .form input {
        font-family: "Roboto", sans-serif;
        outline: 0;
        background: #f2f2f2;
        width: 100%;
        border: 0;
        margin: 0 0 15px;
        padding: 15px;
        box-sizing: border-box;
        font-size: 14px;
    }
    .form button {
        font-family: "Roboto", sans-serif;
        text-transform: uppercase;
        outline: 0;
        background: #4CAF50;
        width: 100%;
        border: 0;
        padding: 15px;
        color: #FFFFFF;
        font-size: 14px;
        -webkit-transition: all 0.3 ease;
        transition: all 0.3 ease;
        cursor: pointer;
    }
    .form button:hover,.form button:active,.form button:focus {
        background: #43A047;
    }
    .form .message {
        margin: 15px 0 0;
        color: #b3b3b3;
        font-size: 12px;
    }
    .form .message a {
        color: #4CAF50;
        text-decoration: none;
    }
    .form .login-form {
        display: none;
    } */
    /* .container {
        position: relative;
        z-index: 1;
        max-width: 300px;
        margin: 0 auto;
    }
    .container:before, .container:after {
        content: "";
        display: block;
        clear: both;
    }
    .container .info {
        margin: 50px auto;
        text-align: center;
    }
    .container .info h1 {
        margin: 0 0 15px;
        padding: 0;
        font-size: 36px;
        font-weight: 300;
        color: #1a1a1a;
    }
    .container .info span {
        color: #4d4d4d;
        font-size: 12px;
    }
    .container .info span a {
        color: #000000;
        text-decoration: none;
    }
    .container .info span .fa {
        color: #EF3B3A;
    } */

/* layout.html */
    /* 駐車スペース */
    .space {
        width: 100px;
        height: 100px;
        background-color: lightgray;
        position: absolute;
        border: 1px solid black;
        cursor: move;
        box-sizing: border-box;
    }
    /* 駐車上レイアウトの作成エリア（枠） */
    #area-wrapper {
        width: 100%;
        height: 100%;
        overflow: auto; /* スクロール可能 */
        touch-action: none; /* ピンチズーム対応 */
    }
    /* 駐車上レイアウトの作成エリア */
    #area {
        width: 1000px;
        height: 600px;
        position: relative;
        border: 1px solid black;
        margin-top: 20px;
        transform: scale(1); /* ズーム用 */
        transform-origin: top left;
        touch-action: none;
        background-color: #fff;
    }
    /* ボタンデザイン */
    /* スペースを追加ボタン,保存ボタン（レイアウト） */
    #add-space
    /* ,#save-layout
    ,#load-layout */
    {
        display: inline-block;
        padding: 12px 24px; /* タップ領域を確保 */
        background-color: #2196F3; /* 青 */
        color: white;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px; /* 角丸 */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影 */
        transition: transform 0.1s; /* タップ時のアニメーション */
        margin: 1%;
    }
    /* ズーム（拡大・縮小）ボタン: より明確で認識しやすいデザイン */
    #zoom-in, #zoom-out {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        background-color: #2196F3; /* 青 */
        color: white;
        font-size: 24px;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        border-radius: 50%;
        border: 2px solid #1976D2;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        transition: background-color 0.2s ease, transform 0.1s;
        margin: 1%;
    }
    #zoom-in:hover, #zoom-out:hover {
        background-color: #1976D2;
    }
    #zoom-in:active, #zoom-out:active {
        transform: scale(0.95);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    /* プルダウン（レイアウト） */
    #layout-select {
        display: inline-block;
        padding: 12px 24px; /* タップ領域を確保 */
        background-color: #fff; /* 青 */
        color: black;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
        cursor: pointer;
        margin: 1%;
    }
    /* 選択中レイアウトを削除ボタン */
    #delete-layout {
        display: inline-block;
        padding: 12px 24px; /* タップ領域を確保 */
        background-color: #f44336; /* 赤 */
        color: white;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px; /* 角丸 */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影 */
        transition: transform 0.1s; /* タップ時のアニメーション */
        margin: 1%;
    }
    /* エクスポート・インポートボタン */
    .like-button {
        display: inline-block;
        padding: 12px 24px;
        background-color: #4CAF50; /* グリーン系 */
        color: white;
        text-align: center;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px;
        margin: 1%;
        border: 2px solid #ccc;
        border-top-color: #fff;   /* 上: 白ハイライト */
        border-left-color: #fff;  /* 左: 白ハイライト */
        border-right-color: #999; /* 右: 灰色シャドウ */
        border-bottom-color: #999;/* 下: 灰色シャドウ */
        box-shadow: inset 0 1px 0 #ffffff99, 0 4px 8px rgba(0, 0, 0, 0.2);
        transition: transform 0.1s, box-shadow 0.2s;
    }

    .like-button:hover {
        background-color: #45a049;
    }

    .like-button:active {
        transform: scale(0.95);
        box-shadow: inset 0 1px 0 #ffffff99, 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    @media screen and (max-width: 768px) {
        .pc-only {
            display: none;
        }
    }
    /* マスタ編集UIの共通ボタン */
    .master-button {
        display: inline-block;
        padding: 8px 16px;
        background-color: #1976D2;
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        margin-left: 8px;
        margin-top: 4px;
        transition: background-color 0.2s ease, transform 0.1s ease;
    }
    .master-button:hover {
        background-color: #1565c0;
    }
    .master-button:active {
        transform: scale(0.95);
    }
    /* マスタ編集セクション */
    #master-editor-container section {
        border: 1px solid #ccc;
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 8px;
        background-color: #f9f9f9;
    }
    #master-editor-container section h3 {
        margin-top: 0;
        font-size: 16px;
        color: #333;
    }
    #master-editor-container ul {
        list-style-type: none;
        padding-left: 0;
    }
    #master-editor-container li {
        margin: 4px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        color: #333;
    }
    #master-editor-container input[type="text"] {
        margin-top: 8px;
        padding: 6px 10px;
        font-size: 14px;
        border-radius: 4px;
        border: 1px solid #ccc;
        width: 60%;
    }
    /* マスタ編集ボタン */
    /* #edit-all-masters {
        display: inline-block;
        padding: 12px 24px;
        background-color: #9C27B0;
        color: white;
        text-align: center;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px;
        margin: 1%;
        border: 2px solid #ccc;
        border-top-color: #fff;
        border-left-color: #fff;
        border-right-color: #666;
        border-bottom-color: #666;
        box-shadow: inset 0 1px 0 #ffffff99, 0 4px 8px rgba(0, 0, 0, 0.2);
        transition: transform 0.1s, box-shadow 0.2s, background-color 0.3s ease;
    }
    #edit-all-masters:hover {
      background-color: #7B1FA2;
    }
    #edit-all-masters:active {
        transform: scale(0.95);
        box-shadow: inset 0 1px 0 #ffffff99, 0 2px 4px rgba(0, 0, 0, 0.2);
    } */
    /* 非表示状態 */
    .hidden {
        display: none !important;
        opacity: 0;
        pointer-events: none; /* 非表示中は操作不可に */
        transition: opacity 0.4s ease;
        height: 0;
        overflow: hidden;
    }
    /* 表示状態 */
    .visible {
        display: block !important;
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.4s ease;
        height: auto;
    }
    /* 初期マスタを再読み込みボタン */
    #reset-masters {
        display: inline-block;
        padding: 12px 24px;
        background-color: #9C27B0; /* パープル */
        color: white;
        text-align: center;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px;
        margin: 1%;
        border: 2px solid #ba68c8; /* 明るい紫の縁取り */
        box-shadow: 0 0 10px #ba68c8, inset 0 1px 0 #ffffff99;
        animation: pulse-glow 1.8s infinite ease-in-out;
        transition: transform 0.1s, box-shadow 0.2s;
    }
    #reset-masters:hover {
        background-color: #7B1FA2;
    }
    #reset-masters:active {
        transform: scale(0.95);
        box-shadow: 0 0 6px #ba68c8, inset 0 1px 0 #ffffff99;
    }
    @keyframes pulse-glow {
        0% {
            box-shadow: 0 0 10px #ba68c8;
        }
        50% {
            box-shadow: 0 0 18px #ba68c8;
        }
        100% {
            box-shadow: 0 0 10px #ba68c8;
        }
    }
    /* スペースのデザイン */
    .status-label {
        position: absolute;
        bottom: 0;
        left: 0;
        font-size: 12px;
        background-color: transparent;
        color: #333;
    }
    /* モーダル */
    #modal-container {
        display: none;
        position: fixed;
        top:0;
        left:0;
        width:100%;
        height:100%;
        background: rgba(0,0,0,0.5);
        z-index:1000;
        place-content: center;
    }
    #modal-iframe {
        width: 90%;
        height: 90%;
        margin: 5% auto;
        display: block;
        background: white;
        border: none;
    }
    #modal-close {
        position: absolute;
        bottom: 10%;
        left: 50%;
        z-index: 1001;
        display: block;
        width: 30px;
        height: 30px;
        border: 2px solid #333; /* 枠の調整 */
        background: #fff; /* ボタンの背景色 */
    }
    #modal-close::before, #modal-close::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 3px; /* 棒の幅（太さ） */
        height: 27px; /* 棒の高さ */
        background: #333; /* バツ印の色 */
    }
    #modal-close::before {
        transform: translate(-50%,-50%) rotate(45deg);
    }
    #modal-close::after {
        transform: translate(-50%,-50%) rotate(-45deg);
    }

/* view.html */
    #detail-fields {
        max-height: 70%;
        overflow-y: auto;
    }
    /* #detail-fields テーブル */
    #detail-fields {
        width: 100%;
        border-collapse: collapse;
        font-size: 1rem;
        font-family: Arial, sans-serif;
    }
    #detail-fields th,
    #detail-fields td {
        padding: 8px 12px;
        border: 1px solid #ddd;
        vertical-align: top;
    }
    #detail-fields th {
        background-color: #f5f5f5;
        text-align: left;
        font-weight: 600;
        width: 35%;
        white-space: nowrap;
        color: #333;
    }
    #detail-fields tbody tr:hover {
        background-color: #e6f7ff;
    }
    #detail-fields td {
        color: #555;
        word-break: break-word;
    }
    /* 左列は交互色を維持 */
    #detail-fields tbody tr:nth-child(odd) th {
        background-color: #fafafa;
    }
    /* 右列は交互色なし（背景透明） */
    #detail-fields tbody tr:nth-child(odd) td {
        background-color: transparent;
    }
    /* ボタンデザイン */
    /* ボタン行のレイアウト用ラッパー */
    .button-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
        align-items: center;
    }
    /* 編集ボタン */
    #edit-button,#clear-button,#close-button {
        display: inline-block;
        padding: 12px 24px; /* タップ領域を確保 */
        background-color: #2196F3; /* 青 */
        color: white;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px; /* 角丸 */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影 */
        transition: transform 0.1s; /* タップ時のアニメーション */
        margin: 1%;
    }
    /* 保存ボタン（モーダル） */
    #save-button {
        display: inline-block;
        padding: 12px 24px; /* タップ領域を確保 */
        background-color: darkkhaki; /* 黄 */
        color: white;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px; /* 角丸 */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影 */
        transition: transform 0.1s; /* タップ時のアニメーション */
        margin: 1%;
    }
    /* 削除ボタン */
    #delete-button {
        display: inline-block;
        padding: 12px 24px; /* タップ領域を確保 */
        background-color: #f44336; /* 赤 */
        color: white;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
        cursor: pointer;
        border-radius: 8px; /* 角丸 */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影 */
        transition: transform 0.1s; /* タップ時のアニメーション */
        margin: 1%;
    }
    /* ボタンタップ時 */
    #edit-button:active,#clear-button:active,#close-button:active,#save-button:active,#delete-button:active {
        transform: scale(0.95); /* タップ時に少し縮小 */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* タップ時の影 */
    }