/* モバイル設定 */
@media (max-width: 575.98px) {
    #mobileSearchbtn.mobile-show {
        display: block;
    }

    #myTable.mobile-show {
        display: table !important;
    }

    input[type="text"],
    input[type="date"],
    select {
        width: 150px;
        height: 30px;
    }

    input[type="radio"] {
        width: 30px;
        height: 20px;
    }

    .image-column img {
        object-fit: cover;
        width: 200px;
        height: auto;
    }

    .shop-name {
        font-size: 15px;
        line-height: 25px;
        word-break: break-word;
        font-weight: bold;
        margin-bottom: 30px;
    }

    .shop-createdt {
        font-size: 15px;
        color: #B12704;
        font-weight: bold;
    }

    .subtitle {
        display: none;
    }

}

@media (min-width: 576px) {
    div.subtitle {
        font-weight: bold;
        text-shadow: #666;
        border-bottom: 1px solid #cc546c;
        margin-bottom: 1em;
    }

    #mobileSearchbtn.mobile-show {
        display: none;
    }

    #myTable.mobile-show {
        display: none !important;
    }

    input[type="radio"] {
        width: 100px;
        height: 30px;
    }

    .image-column img {
        object-fit: cover;
        width: 50%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .shop-name {
        font-size: 25px;
        line-height: 30px;
        word-break: break-word;
        font-weight: bold;
        margin-bottom: 30px;
    }

    .shop-createdt {
        font-size: 18px;
        color: #B12704;
        font-weight: bold;
    }
}

.signin-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-family: inherit;
    color: #fff;
    background-color: #cc546c;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none;
}

.signin-btn:hover {
    background-color: #a23d54;
    color: #fff;
    transform: scale(1.05);
}

.mobile-container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 3rem;
    text-align: center;
    display: block;
}


.mobile-login_box {
    width: 100%;
}

.login_box {
    /* border: 2px solid #4A90E2; */
    background-color: #f5f5f5;
    border-radius: 50px;
    /* box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3); */
    box-sizing: border-box;
    padding: 10px;
    width: 50%;
    margin: 0 auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.login_box>* {
    max-width: 100%;
}

.login_container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 40px;
    text-align: center;
}

.center-content {
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    height: 300px;
    padding: 10px;
    box-sizing: border-box;
}

.inner-content {
    margin-top: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.mobile-inner-content {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.search_btn {
    margin-top: auto;
    margin-left: auto;
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-family: inherit;
    color: #fff;
    background-color: #cc546c;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none;
}

.search_btn:hover {
    opacity: 0.5;
    color: #fff;
}

.simple-table {
    margin-top: 20px;
    width: 100%;
    /* table-layout: fixed; */
    border-collapse: collapse;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
}

.simple-table th,
.simple-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.simple-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.shop-info {
    width: 50%;
    text-align: left;
}

.shop-info div {
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}


.shop-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

.paging_btn {
    display: inline-block;
    font-size: 16px;
    font-family: inherit;
    color: #fff;
    background-color: #cc546c;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none;
    width: 40px;
}

.paging_btn:disabled {
    opacity: 50%;
    cursor: default;
}

.paging_btn:hover {
    opacity: 50%;
    color: #fff;
}

.subtitle::before {
    content: "";
    display: inline-block;
    box-sizing: border-box;
    width: 8px;
    height: 8px;
    border-style: solid;
    border-width: 2px 2px 0 0;
    border-color: #cc546c;
    transform: rotate(45deg);
    margin-right: .4em;
    vertical-align: middle;
    margin-bottom: 0.2em;
}

div.subtitle {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: bold;
    border-bottom: 1px solid #cc546c;
}

/* Scoped Styles for Tag Selector */
:root {
    --tag-primary: #4a90e2;
    --tag-border: #ced4da; /* Matches Bootstrap default */
    --tag-bg: #f4f7f9;
}

/* Fix body lock for Modal */
body.is-locked { overflow: hidden; }

/* Grid within the Table Cell */
.tag-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Auto-responsive grid */
    gap: 8px;
    width: 100%;
}

.tag-input-group {
    display: flex;
    flex-direction: column;
}

.tag-label {
    font-size: 0.75rem;
    font-weight: bold;
    color: #666;
    margin-bottom: 2px;
}

.editable-area {
    width: 100%;
    height: 34px; /* Standard input height */
    cursor: pointer;
    border: 1px solid var(--tag-border);
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 8px;
    box-sizing: border-box;
    position: relative;
    min-width: 0;
}

.editable-area::after {
    font-size: 0.5rem;
    color: #999;
    position: absolute;
    right: 8px;
}

.preview-text {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: calc(100% - 15px);
    color: #333;
}
.preview-text.empty { color: #aaa; }

/* --- Modal Styles (Z-Index increased to overlay table headers) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000; /* High Z-index for overlay */
    align-items: flex-end;
    justify-content: center;
}
body.is-locked .modal-overlay { display: flex; }

.modal-content {
    background: white;
    width: 100%;
    height: 80vh;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

@media (min-width: 768px) {
    .modal-overlay { align-items: center; }
    .modal-content { width: 450px; height: 600px; border-radius: 8px; }
}

.sheet-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.sheet-content { flex: 1; overflow-y: auto; padding: 10px; }

/* Tree View Styles */
.item-row {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
}
.item-row:hover { background: #f1f1f1; }
.item-row:active { background: #e9ecef; }
.item-row.selected { background: #e3f2fd; color: var(--tag-primary); }

.is-parent { background: #fafafa; border-bottom: 1px solid #eee; margin-top: 4px; }
.is-parent .item-text { font-weight: 600; }

.indent-1 { padding-left: 5px; }
.indent-2 { padding-left: 25px; border-left: 2px solid #eee; margin-left: 5px; }
.indent-3 { padding-left: 45px; border-left: 2px solid #eee; margin-left: 5px; }

.check-box {
    width: 18px; height: 18px;
    border: 2px solid #adb5bd;
    border-radius: 3px;
    margin-right: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; color: white; flex-shrink: 0; background: #fff;
}
.selected .check-box { background: var(--tag-primary); border-color: var(--tag-primary); }
.item-text { font-size: 0.9rem; }