@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Shippori+Mincho&display=swap');

:root {
    --main-bg-color: #fff6e1;
    --bs-primary: #5AA0D6;
    --bs-primary-dark: #047bd6;
    --bs-primary-rgb: 90, 160, 214;
    --bs-secondary: #fe94af;
    --bs-secondary-dark: #fe2e63;
    --bs-secondary-rgb: 254, 148, 175;
    --bs-tertiary: #C19AC7;
    --bs-tertiary-dark: #b64ac7;
    --bs-tertiary-rgb: 193, 154, 199;
    --bs-gray: #989CA0;
    --bs-gray-rgb: 152, 156, 160;
    --bs-gray-light: #d6d7d9;

    --box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);

    --bs-font-family :"Noto Sans JP", sans-serif;
    --bs-font-family-ttl :"Shippori Mincho", serif;

    --bs-danger: #e32700;
    --bs-danger-dark: #b01e00;

    --bs-success: #a1cb62;
    --bs-success-dark: #66981c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 400;
/*    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 50%, #f3e5f5 100%);*/
    background: var(--main-bg-color);
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

header h1 .logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    header h1 .logo {
        max-width: 280px;
    }
}

.controls {
    background: #F9F6ED;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.save-button-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #555;
}

.control-group input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    width: 80px;
}

.control-group button {
    padding: 8px 16px;
    background: var(--bs-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.control-group button:hover {
    background: var(--bs-primary-dark);
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.participants-panel {
    background: #F9F6ED;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.participants-panel h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    font-family: var(--bs-font-family-ttl);
    font-size: 1.6rem;
}

.participant-count {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
    color: #666;
    font-weight: normal;
    font-family: var(--bs-font-family);
}

.seating-progress-container {
    margin: 10px 0 15px 0;
}

.seating-progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.seating-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #45a049 100%);
    transition: width 0.3s ease-out;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.search-participant-section,
.add-participant-section {
    margin-bottom: 10px;
}

.section-toggle {
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: color 0.2s;
}

.section-toggle:hover {
    color: #333;
}

.section-title {
    flex: 1;
    text-align: left;
}

.toggle-icon {
    transition: transform 0.2s ease;
    font-size: 10px;
    color: #999;
    margin-left: 8px;
}

.section-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.search-participant,
.add-participant {
    margin-top: 8px;
    overflow: hidden;
    transition: max-height 0.25s ease-out, opacity 0.25s ease-out, margin 0.25s ease-out;
    max-height: 1000px;
    opacity: 1;
}

.search-participant.collapsed,
.add-participant.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
}

.search-participant input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    margin-bottom: 10px;
}

.search-participant input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.status-filter,
.relation-filter {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.status-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

.status-filter-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--bs-primary);
}

.status-filter-label span {
    font-weight: 500;
}

.add-participant {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.add-participant input {
    flex: 1;
    min-width: 120px;
}

.relation-radio {
    display: flex;
    gap: 15px;
    align-items: center;
    min-width: 120px;
}

.relation-radio label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.relation-radio input[type="radio"] {
    width: 16px;
    min-width: inherit;
    height: 16px;
    accent-color: #9c27b0;
    cursor: pointer;
}

.bulk-add-section {
    margin-bottom: 20px;
    text-align: center;
}

.btn-bulk-add {
    padding: 10px 20px;
    background: var(--bs-secondary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-bulk-add:hover {
    background: var(--bs-secondary-dark);
}

.add-participant input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.add-participant button {
    padding: 10px 16px;
    background: var(--bs-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.add-participant button:hover {
    background: var(--bs-primary-dark);
}

.participants-list {
    max-height: 400px;
    padding: 5px 5px 5px 0;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.participant-item {
    background: #eeeff0;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 2px solid #eeeff0;
    cursor: grab;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.participant-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.participant-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.participant-name {
    font-weight: 600;
    font-size: 14px;
}

.participant-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.participant-relation {
    font-size: 12px;
    color: #666;
}

.relation-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.relation-badge.groom {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.relation-badge.bride {
    background: linear-gradient(135deg, #ff9ec7 0%, #ff7eb3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 126, 179, 0.3);
}

.participant-title {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.participant-item:hover {
    border-color: var(--bs-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.2);
}

.participant-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.participant-item .remove-btn {
    background: var(--bs-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 6px;
    right: 6px;
}

.participant-item .remove-btn:hover {
    background: var(--bs-danger-dark);
}

.participant-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.seated {
    background: #4caf50;
    color: white;
}

.status-badge.unseated {
    background: var(--bs-gray);
    color: white;
}

.participant-item.seated {
    border-color: #4caf50;
    background: #f1f8e9;
}

.participant-item.seated:hover {
    border-color: #45a049;
    background: #e8f5e8;
}

.seating-area {
    background: #F9F6ED;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 1;
}

.seating-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.seating-area h3 {
    margin-bottom: 40px;
    color: #333;
    text-align: center;
    font-family: var(--bs-font-family-ttl);
    font-size: 1.6rem;
    letter-spacing: 0.1em;
}

.seating-settings-btn {
    background: var(--bs-primary);
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 44px;
    height: 44px;
}

.seating-settings-btn:hover {
    background: var(--bs-primary-dark);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.seating-settings-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.seating-chart {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.table-row {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.table {
    background: linear-gradient(145deg, #eeeff0, #f7f7f7);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--box-shadow);
    border: 2px solid var(--bs-gray-light);
    position: relative;
}

.table-label {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.seats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

.seat {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    text-align: center;
    word-break: break-word;
    padding: 5px;
    font-weight: 600;
}

.seat:hover {
    border-color: var(--bs-tertiary);
    background: #f3e5f5;
}

.seat.occupied {
    background: var(--bs-success);
    color: white;
    border-color: var(--bs-success-dark);
    cursor: grab;
}

.seat.occupied:hover {
    transform: scale(1.05);
    cursor: grab;
}

.seat.occupied:active {
    cursor: grabbing;
}

.seat.drag-over {
    border-color: #ff9800;
    background: #fff3e0;
    transform: scale(1.1);
}

/* ハンバーガーメニュー */
.menu-container {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-action-btn {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    transition: all 0.3s;
    background: transparent;
}

.header-action-btn.btn-save {
    background: transparent;
    color: var(--bs-primary);
}

.header-action-btn.btn-save:hover {
    background: transparent;
    transform: scale(1.1);
    opacity: 0.8;
}


.btn-text {
    display: inline-block;
}

.header-action-btn:hover {
    background: var(--bs-primary-dark);
    transform: scale(1.05);
}

.header-action-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

.menu-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hamburger-menu {
    background: var(--bs-primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: var(--box-shadow);
    transition: all 0.3s;
    position: relative;
}

.menu-label {
    font-size: 12px;
    color: var(--bs-primary);
    font-weight: 500;
    white-space: nowrap;
}

.hamburger-menu:hover {
    background: var(--bs-primary-dark);
    transform: scale(1.05);
}

.hamburger-icon,
.hamburger-icon-close {
    width: 24px;
    height: 24px;
    stroke: white;
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

.hamburger-icon-close {
    opacity: 0;
    transform: rotate(90deg);
}

.hamburger-menu.active .hamburger-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.hamburger-menu.active .hamburger-icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

.menu-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: #F9F6ED;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-out;
    overflow: hidden;
}

.menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    width: 100%;
    padding: 15px 20px;
    border: none;
    background: white;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.menu-item-svg {
    width: 100%;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.menu-item:hover {
    background: #f8f9fa;
}

.menu-item-danger {
    color: var(--bs-danger);
}

.menu-item-danger:hover {
    background: #ffe6e6;
}

.menu-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

.menu-item-danger .menu-icon {
    stroke: var(--bs-danger);
}

.menu-text {
    flex: 1;
    font-weight: 500;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: var(--bs-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--bs-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
}

.btn-secondary {
    background: var(--bs-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--bs-secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
}

.btn-danger {
    background: var(--bs-danger);
    color: white;
}

.btn-danger:hover {
    background: var(--bs-danger-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-export {
    background: #9c27b0;
    color: white;
}

.btn-export:hover {
    background: #7b1fa2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
}

.btn-import {
    background: #ff9800;
    color: white;
}

.btn-import:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

.btn-gray {
    border: 2px solid var(--bs-gray);
    background: #fff;
}

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

.modal-content {
    background-color: #F9F6ED;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-body .control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-body .control-group label {
    font-weight: 600;
    color: #555;
    min-width: 200px;
}

.modal-body .control-group input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    width: 100px;
}

.modal-header {
    background: #e91e63;
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
}

.modal-instruction {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.modal-instruction code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.required-fields-note {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.required-fields-note strong {
    color: #856404;
    font-weight: 600;
}

.required-field {
    color: var(--bs-danger);
    font-weight: 600;
    background: #ffe6e6;
    padding: 2px 6px;
    border-radius: 4px;
}

.optional-field {
    color: #666;
    font-size: 13px;
    display: block;
    margin-top: 5px;
}

#bulkParticipantData {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    margin-bottom: 20px;
}

#bulkParticipantData:focus {
    outline: none;
    border-color: #9c27b0;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    /* モバイルでは参加者パネルを非表示 */
    .participants-panel {
        display: none;
    }
    
    /* 座席エリアを上に配置 */
    .seating-area {
        order: -1;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .table-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .seats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .seat {
        width: 60px;
        height: 60px;
        font-size: 10px;
    }
    
    /* モバイルで座席エリアを前面に */
    .seating-area {
        z-index: 2;
        position: relative;
    }
    
    /* 座席のタップ領域を確保 */
    .seat {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(90, 160, 214, 0.3);
    }
    
    /* フローティングボタン */
    .mobile-toggle-btn {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999;
        background: var(--bs-primary);
        color: white;
        border: none;
        border-radius: 50px;
        padding: 15px 25px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        align-items: center;
        gap: 10px;
        font-size: 16px;
        font-weight: 600;
        transition: all 0.3s;
    }
    
    .mobile-toggle-btn:hover {
        background: var(--bs-primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    }
    
    .mobile-toggle-btn .toggle-icon {
        font-size: 20px;
    }

    /* 右下フロートログボタン */
    .log-float-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 998;
        width: 56px;
        height: 56px;
        background: var(--bs-primary);
        color: white;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.3s;
    }

    .log-float-btn:hover {
        background: var(--bs-primary-dark);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    }

    .log-float-btn svg {
        width: 24px;
        height: 24px;
        stroke: white;
    }
    
    /* ボトムシートオーバーレイ */
    .mobile-sheet-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .mobile-sheet-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* ボトムシート */
    .mobile-bottom-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #F9F6ED;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
        z-index: 998;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }
    
    .mobile-bottom-sheet.active {
        transform: translateY(0);
    }
    
    .bottom-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 2px solid #eee;
        background: var(--bs-secondary);
        color: white;
        border-radius: 20px 20px 0 0;
    }
    
    .bottom-sheet-header h3 {
        margin: 0;
        color: white;
        font-family: var(--bs-font-family-ttl);
        font-size: 1.4rem;
    }
    
    .close-sheet-btn {
        background: transparent;
        border: none;
        color: white;
        font-size: 32px;
        width: 40px;
        height: 40px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.3s;
    }
    
    .close-sheet-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .bottom-sheet-content {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
    }
    
    .bottom-sheet-content .participants-list {
        max-height: none;
    }
    
    /* モバイル用選択ヒント */
    .mobile-selection-hint {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bs-primary);
        color: white;
        padding: 15px 20px;
        z-index: 1000;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-selection-hint.active {
        transform: translateY(0);
    }
    
    .mobile-selection-hint .hint-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        max-width: 100%;
    }
    
    .mobile-selection-hint p {
        margin: 0;
        flex: 1;
        font-size: 14px;
    }
    
    .btn-cancel-selection {
        padding: 8px 16px;
        background: white;
        color: var(--bs-primary);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 600;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .btn-cancel-selection:hover {
        background: #f0f0f0;
    }
    
    /* 参加者アイテムの選択状態 */
    .participant-item.selected {
        border-color: var(--bs-primary);
        background: #e3f2fd;
        box-shadow: 0 0 0 3px rgba(90, 160, 214, 0.3);
    }
    
    .participant-item.selected .participant-name {
        font-weight: 700;
        color: var(--bs-primary-dark);
    }
}

/* 操作ログパネル */
.log-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 400px;
    max-height: 60vh;
    background: white;
    border-radius: 15px 0 0 0;
    box-shadow: -4px -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.log-panel.active {
    transform: translateY(0);
}

.log-panel-header {
    background: var(--bs-primary);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-panel-header h3 {
    margin: 0;
    color: white;
    font-size: 1.2rem;
    font-family: var(--bs-font-family-ttl);
}

.log-panel-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-clear-logs {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-clear-logs:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-close-log {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.btn-close-log:hover {
    background: rgba(255, 255, 255, 0.2);
}

.log-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(60vh - 60px);
}

.log-empty {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

.log-entry {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.log-time {
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}

.log-action {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.log-text {
    flex: 1;
}

.log-text strong {
    color: var(--bs-primary-dark);
    font-weight: 600;
}

/* デスクトップではフローティングボタンとボトムシートを非表示 */
@media (min-width: 769px) {
    .mobile-toggle-btn,
    .mobile-bottom-sheet,
    .mobile-sheet-overlay,
    .mobile-selection-hint {
        display: none !important;
    }
}

/* 右下フロートログボタン */
.log-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
    width: 56px;
    height: 56px;
    background: var(--bs-primary);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.log-float-btn:hover {
    background: var(--bs-primary-dark);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.log-float-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

@media (max-width: 768px) {
    .log-float-btn {
        bottom: 90px; /* モバイル参加者リストボタンの上に配置 */
    }
}

@media (max-width: 768px) {
    .log-panel {
        width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
    }
    
    .log-panel-header {
        border-radius: 20px 20px 0 0;
    }

    .log-float-btn {
        bottom: 90px; /* モバイル参加者リストボタンの上に配置 */
    }
}
