/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* コンテナ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* フォームラッパー */
.form-wrapper {
    max-width: 500px;
    margin: 50px auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-wrapper.store-form {
    max-width: 700px;
}

.mypage-wrapper {
    max-width: 800px;
    margin: 50px auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.store-list-wrapper {
    max-width: 1000px;
    margin: 50px auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 見出し */
h1 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: #2c3e50;
}

h2 {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.required {
    color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    resize: vertical;
    font-family: inherit;
}

/* ボタン */
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-info {
    background-color: #3498db;
    color: #fff;
}

.btn-info:hover {
    background-color: #2980b9;
}

.btn-warning {
    background-color: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-small {
    display: inline-block;
    width: auto;
    padding: 6px 12px;
    font-size: 14px;
    margin: 2px;
}

/* メッセージ */
.error-message {
    padding: 12px;
    margin-bottom: 20px;
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
}

.success-message {
    padding: 12px;
    margin-bottom: 20px;
    background-color: #efe;
    border: 1px solid #cfc;
    border-radius: 4px;
    color: #3c3;
}

/* リンク */
.links {
    margin-top: 30px;
    text-align: center;
}

.links p {
    margin: 10px 0;
}

.links a {
    color: #3498db;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* ユーザー情報テーブル */
.user-info {
    margin-bottom: 40px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.info-table th {
    width: 40%;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

/* メニューリスト */
.menu-list {
    list-style: none;
}

.menu-list li {
    margin-bottom: 15px;
}

.menu-list a {
    display: block;
}

/* 店舗一覧 */
.action-buttons {
    margin-bottom: 30px;
    text-align: right;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: #999;
}

.store-table-wrapper {
    overflow-x: auto;
}

.store-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.store-table thead {
    background-color: #f8f9fa;
}

.store-table th,
.store-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.store-table th {
    font-weight: 600;
    color: #555;
}

.store-table tbody tr:hover {
    background-color: #f8f9fa;
}

.action-cell {
    white-space: nowrap;
}

/* バッジ */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #27ae60;
    color: #fff;
}

.badge-danger {
    background-color: #e74c3c;
    color: #fff;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-wrapper,
    .mypage-wrapper,
    .store-list-wrapper {
        margin: 20px auto;
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .info-table th,
    .info-table td {
        padding: 10px;
        font-size: 14px;
    }
    
    .info-table th {
        width: 35%;
    }
    
    .store-table {
        font-size: 14px;
    }
    
    .store-table th,
    .store-table td {
        padding: 8px;
    }
    
    .btn-small {
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .form-wrapper,
    .mypage-wrapper,
    .store-list-wrapper {
        padding: 15px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select,
    .btn {
        font-size: 14px;
    }
    
    .info-table {
        font-size: 13px;
    }
    
    .info-table th {
        width: 30%;
    }
    
    .store-table {
        font-size: 12px;
    }
    
    .store-table th,
    .store-table td {
        padding: 6px;
    }
    
    .action-cell {
        white-space: normal;
    }
    
    .btn-small {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
}



/* ドラッグ中のスタイル */
.ui-sortable-helper {
    opacity: 0.8;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.ui-sortable-placeholder {
    border: 2px dashed #3498db;
    background-color: rgba(52, 152, 219, 0.1);
    visibility: visible !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .image-preview-container {
        gap: 10px;
        padding: 10px;
    }
    
    .image-delete-btn {
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .image-preview-container {
        gap: 8px;
        padding: 8px;
    }
    
    .image-delete-btn {
        width: 22px;
        height: 22px;
        font-size: 16px;
    }
}

/* カテゴリアコーディオン */
.category-accordion {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.category-group {
    border-bottom: 1px solid #ddd;
}

.category-group:last-child {
    border-bottom: none;
}

.category-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.3s;
}

.category-header:hover {
    background-color: #e9ecef;
}

.category-header::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
}

.category-group.active .category-header::after {
    transform: translateY(-50%) rotate(180deg);
}

.category-content {
    display: none;
    padding: 20px;
    background-color: #fff;
}

/* 2列表示（PC・タブレット） */
.category-content {
    display: none;
    padding: 20px;
    background-color: #fff;
}

.category-content {
    column-count: 2;
    column-gap: 30px;
}

.category-checkbox {
    display: block;
    padding: 8px 0;
    cursor: pointer;
    font-weight: normal;
    color: #555;
    break-inside: avoid;
    page-break-inside: avoid;
}

.category-checkbox:hover {
    color: #3498db;
}

.category-checkbox input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: auto;
}

.no-category {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* タブレットでは2列維持 */
    .category-header {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .category-content {
        padding: 15px;
        column-gap: 20px;
    }
    
    .category-checkbox {
        padding: 6px 0;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* スマホでは1列表示 */
    .category-header {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .category-header::after {
        right: 12px;
    }
    
    .category-content {
        padding: 12px;
        column-count: 1;
        column-gap: 0;
    }
    
    .category-checkbox {
        padding: 5px 0;
        font-size: 13px;
    }
}
/* エリア選択ラッパー */
.area-select-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.area-select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    transition: border-color 0.3s;
}

.area-select:focus {
    outline: none;
    border-color: #3498db;
}

.area-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .area-select-wrapper {
        gap: 10px;
    }
    
    .area-select {
        min-width: 150px;
        padding: 10px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .area-select-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .area-select {
        width: 100%;
        min-width: auto;
        padding: 10px;
        font-size: 14px;
    }
}

/* 駅選択エリア */
.station-group {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.station-search-btn {
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.station-search-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.station-search-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.station-info {
    flex: 1;
    min-width: 0;
}

.station-name-display {
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 42px;
    color: #333;
    font-size: 14px;
}

.station-name-display:empty::before {
    content: '駅が選択されていません';
    color: #999;
}

.station-time-input {
    margin-top: 10px;
}

.station-time-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* モーダル */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
    border: none;
    padding: 0;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-search {
    margin-bottom: 20px;
}

.modal-search input {
    width: calc(100% - 90px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    vertical-align: middle;
}

.modal-search button {
    width: 80px;
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    vertical-align: middle;
    transition: background-color 0.3s;
}

.modal-search button:hover {
    background-color: #2980b9;
}

#stationSearchResults {
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

.search-loading,
.search-error,
.search-no-result {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.search-error {
    color: #e74c3c;
}

.station-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.station-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.station-item:last-child {
    border-bottom: none;
}

.station-item:hover {
    background-color: #f0f8ff;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .station-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .station-search-btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 10px;
        padding: 15px;
    }
    
    .modal-search input {
        width: calc(100% - 70px);
        padding: 10px;
        font-size: 14px;
    }
    
    .modal-search button {
        width: 60px;
        padding: 10px;
        font-size: 14px;
    }
}

/* CSV一括登録 */
.csv-mapping {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.csv-mapping h2 {
    margin-top: 0;
}

.mapping-boxes {
    display: flex;
    gap: 10px;
    padding: 20px;
    background-color: #fff;
    border: 2px dashed #ddd;
    border-radius: 4px;
    margin-top: 15px;
}

.mapping-box {
    flex: 1;
    padding: 20px;
    background-color: #fff;
    border: 2px solid #3498db;
    border-radius: 4px;
    text-align: center;
    cursor: move;
    user-select: none;
    transition: all 0.3s;
}

.mapping-box:hover {
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mapping-placeholder {
    background-color: #ddd;
    border: 2px dashed #999;
    opacity: 0.5;
}

.box-label {
    font-weight: bold;
    font-size: 14px;
}

.csv-preview {
    margin: 30px 0;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.preview-table th,
.preview-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.preview-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.preview-table tr:nth-child(even) {
    background-color: #fafafa;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .mapping-boxes {
        flex-direction: column;
    }
    
    .mapping-box {
        width: 100%;
    }
}


/* カテゴリアコーディオン（2列表示） */
.category-accordion.category-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.category-group {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    overflow: hidden;
}

.category-header {
    padding: 12px 15px;
    margin: 0;
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    user-select: none;
    transition: background 0.3s;
}

.category-header:hover {
    background: linear-gradient(to bottom, #e8e8e8, #d8d8d8);
}

.category-group.active .category-header {
    background: linear-gradient(to bottom, #4CAF50, #45a049);
    color: white;
    border-bottom-color: #45a049;
}

.category-content {
    display: none;
    padding: 15px;
    background-color: #fafafa;
}

.category-checkbox {
    display: block;
    padding: 8px 0;
    cursor: pointer;
}

.category-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.no-category {
    color: #999;
    font-style: italic;
}

/* CSV一括登録 */
.csv-mapping {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(to bottom, #f9f9f9, #ffffff);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.csv-mapping h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 20px;
}

.csv-mapping > p {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

/* カラムラベル */
.mapping-columns {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 10px;
}

.column-label {
    flex: 1;
    text-align: center;
    font-weight: bold;
    font-size: 13px;
    color: #666;
    padding: 8px;
    background-color: #f0f0f0;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* マッピングボックス（アイコン風） */
.mapping-boxes {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mapping-box {
    flex: 1;
    padding: 20px 10px;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    border: 2px solid #3498db;
    border-radius: 12px;
    text-align: center;
    cursor: move;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 
                0 0 0 1px rgba(255,255,255,0.5) inset;
}

.mapping-box:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2), 
                0 0 0 1px rgba(255,255,255,0.8) inset;
    border-color: #2980b9;
    background: linear-gradient(to bottom, #ffffff, #e8f4f8);
}

.mapping-box:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.box-icon {
    font-size: 32px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.box-label {
    font-weight: bold;
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.3;
}

.mapping-placeholder {
    background: linear-gradient(135deg, #e0e0e0 25%, #f0f0f0 25%, #f0f0f0 50%, #e0e0e0 50%, #e0e0e0 75%, #f0f0f0 75%, #f0f0f0);
    background-size: 20px 20px;
    border: 2px dashed #999;
    border-radius: 12px;
    opacity: 0.7;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

/* プレビューテーブル */
.csv-preview {
    margin: 30px 0;
}

.csv-preview h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.preview-table-wrapper {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.preview-table th,
.preview-table td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
    font-size: 14px;
}

.preview-table th {
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

.preview-table tr:nth-child(even) {
    background-color: #fafafa;
}

.preview-table tr:hover {
    background-color: #f0f7ff;
}

.preview-table td:first-child {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .category-accordion.category-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mapping-boxes {
        flex-direction: column;
        gap: 10px;
    }
    
    .mapping-box {
        width: 100%;
    }
    
    .mapping-columns {
        display: none;
    }
    
    .column-label {
        display: none;
    }
    
    .preview-table {
        font-size: 12px;
    }
    
    .preview-table th,
    .preview-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .csv-mapping {
        padding: 15px;
    }
    
    .box-icon {
        font-size: 24px;
    }
    
    .box-label {
        font-size: 11px;
    }
}
/* ============================================
   メニュー最大数・プラン関連スタイル
    ============================================ */

/* プラン情報バー */
.plan-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
}

/* プランごとのバッジ色（s_authの値に対応） */
.plan-auth-0 {
    background-color: #6c757d;
    color: white;
}

.plan-auth-1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.plan-auth-2 {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: white;
}

.plan-count {
    color: #495057;
}

.plan-count strong {
    color: #e74c3c;
    font-size: 16px;
}

/* 情報メッセージ */
.info-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    color: #0c5460;
    font-size: 14px;
}

/* 警告メッセージ */
.warning-message {
    padding: 14px 16px;
    margin-bottom: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 5px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

.warning-message strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

/* プレビュー件数以上の表示 */
.preview-more {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #6c757d;
    font-size: 13px;
    text-align: center;
}

   ============================================ */

/* 緯度経度入力セクション */
.latlon-section {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.latlon-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

/* GoogleマップリンクとURL入力 */
.map-link-wrapper {
    margin-bottom: 12px;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1e40af;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
}

.map-link:hover {
    background: #1e3a8a;
}

.map-link.disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
}

.map-url-wrapper {
    margin-bottom: 12px;
}

.map-url-wrapper label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.map-url-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    transition: border-color .2s;
}

.map-url-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.map-url-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.extract-btn {
    padding: 8px 16px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.extract-btn:hover {
    background: #0284c7;
}

.extract-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

/* 緯度経度入力フィールド */
.latlon-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.latlon-input-group label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.latlon-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color .2s;
}

.latlon-input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* 緯度経度の探し方ガイド */
.latlon-guide-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 12px;
}

.latlon-guide-toggle:hover {
    background: #dbeafe;
}

.latlon-guide-toggle.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

.toggle-icon {
    font-size: 10px;
}

.latlon-guide {
    display: none;
    margin-bottom: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.guide-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

/* フローステップ（SVG/CSSモックアップ） */
.guide-flow {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flow-step-guide {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-number-guide {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.step-content-guide {
    flex: 1;
}

.step-content-guide h5 {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.step-content-guide p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* SVGモックアップエリア */
.mockup-visual {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    margin-top: 6px;
}

.mockup-visual svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ヒント */
.guide-hint {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    font-size: 11px;
    color: #92400e;
}

/* レスポンシブ */
@media (max-width: 640px) {
    .latlon-inputs {
        grid-template-columns: 1fr;
    }
    
    .flow-step-guide {
        flex-direction: column;
        align-items: stretch;
    }
}

/* メニュー一覧 */
.menu-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.menu-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.menu-table th,
.menu-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.menu-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.menu-kind-icon {
    font-size: 18px;
    margin-right: 5px;
}

.order-buttons {
    white-space: nowrap;
}

.btn-order {
    padding: 4px 8px;
    margin: 0 2px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.btn-order:hover {
    background-color: #f0f0f0;
}

.action-buttons {
    white-space: nowrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    margin: 0 2px;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* CSVマッピング */
.mapping-boxes {
    display: flex;
    gap: 10px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 2px dashed #ddd;
}

.mapping-box {
    flex: 1;
    padding: 20px;
    background-color: #fff;
    border: 2px solid #3498db;
    border-radius: 4px;
    text-align: center;
    cursor: move;
    user-select: none;
}

.mapping-box:hover {
    background-color: #e3f2fd;
}

.mapping-placeholder {
    background-color: #ddd;
    border: 2px dashed #999;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .menu-table {
        font-size: 14px;
    }
    
    .menu-table th,
    .menu-table td {
        padding: 8px 4px;
    }
    
    .mapping-boxes {
        flex-direction: column;
    }
}


/* カラムマッピング共通 */
.csv-mapping {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.csv-mapping h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1e293b;
}

.csv-mapping p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 15px;
}

.mapping-columns {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.column-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ドラッグ可能なマッピングボックス（アップロード後） */
.mapping-boxes {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    min-height: 120px;
}

.mapping-box {
    flex: 1;
    max-width: 110px;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: move;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mapping-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.mapping-box.ui-sortable-helper {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 静的マッピングボックス（アップロード前・参考表示） */
.mapping-boxes-static {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 10px;
    min-height: 120px;
}

.mapping-box-static {
    flex: 1;
    max-width: 110px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    opacity: 0.7;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.box-icon {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1;
}

.box-label {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.mapping-note {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    font-style: italic;
}

/* プレビューテーブル */
.csv-preview {
    margin: 30px 0;
}

.csv-preview h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1e293b;
}

.preview-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.preview-table thead th {
    background: #f1f5f9;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.preview-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.preview-table tbody tr:last-child td {
    border-bottom: none;
}

.preview-table tbody tr:hover {
    background: #f8fafc;
}

.preview-more {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    color: #6c757d;
    font-size: 13px;
    text-align: center;
}

/* プラン情報 */
.plan-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.plan-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 12px;
}

.plan-auth-0 {
    background-color: #6c757d;
    color: white;
}

.plan-auth-1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.plan-auth-2 {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: white;
}

.plan-count {
    color: #495057;
}

.plan-count strong {
    color: #e74c3c;
    font-size: 16px;
}

/* メッセージ */
.info-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    color: #0c5460;
    font-size: 14px;
}

.warning-message {
    padding: 14px 16px;
    margin-bottom: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 5px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

.warning-message strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .mapping-boxes,
    .mapping-boxes-static {
        flex-wrap: wrap;
        gap: 8px;
        padding: 15px;
    }
    
    .mapping-box,
    .mapping-box-static {
        max-width: calc(50% - 4px);
    }
    
    .mapping-columns {
        flex-wrap: wrap;
    }
    
    .column-label {
        flex: 0 0 calc(50% - 5px);
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .mapping-box,
    .mapping-box-static {
        max-width: 100%;
    }
    
    .column-label {
        flex: 0 0 100%;
    }
}
