* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Noto Sans JP",
        "Yu Gothic",
        sans-serif;

    background: #eef8f3;
    color: #263238;
}


/* =========================
   Header
========================= */

.header {
    height: 68px;

    display: flex;
    align-items: center;

    padding: 0 24px;

    background: #ffffff;

    border-bottom: 1px solid #dcebe4;

    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #dff3e8;

    border-radius: 14px;

    font-size: 22px;
}

.service-name {
    font-size: 18px;
    font-weight: 700;
}

.tagline {
    margin-top: 2px;

    font-size: 11px;

    color: #78909c;
}

.header-room {
    margin-left: auto;

    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 14px;
    font-weight: 600;
}

.header-room span:last-child {
    padding: 6px 12px;

    background: #e7f6ee;

    color: #39745a;

    border-radius: 999px;
}

.menu-button {
    display: none;

    margin-left: 14px;

    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 12px;

    background: #e7f6ee;

    font-size: 22px;

    cursor: pointer;
}


/* =========================
   Layout
========================= */

.layout {
    display: flex;

    min-height: calc(100vh - 68px);
}

.seat-area {
    flex: 1;

    min-width: 0;

    padding: 28px;
}

.seat-area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 24px;
}

.seat-area-header h1 {
    margin: 0;

    font-size: 24px;
}

.seat-area-header p {
    margin: 7px 0 0;

    color: #78909c;

    font-size: 13px;
}

.working-badge {
    padding: 10px 16px;

    background: #ffffff;

    border: 1px solid #dcebe4;

    border-radius: 14px;

    font-size: 13px;
}

.working-badge strong {
    margin: 0 3px;

    font-size: 18px;
}


/* =========================
   Seat Grid
========================= */

.seat-grid {
    display: grid;

    grid-template-columns: repeat(5, minmax(150px, 1fr));

    gap: 18px;
}

.seat-card {
    min-height: 150px;

    padding: 16px;

    border: 2px solid transparent;

    border-radius: 22px;

    background: #ffffff;

    box-shadow: 0 4px 16px rgba(60, 90, 75, 0.08);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}


.seat-card:hover {
    transform: translateY(-2px);

    box-shadow: 0 7px 20px rgba(60, 90, 75, 0.12);
}

.seat-card.available {
    border-color: #d8ebe1;
}

.seat-card.selected {
    border-color: #69a987;

    background: #f4fcf7;
}

.seat-card.occupied {
    cursor: default;
}

/* 着席中 */
.seat-card.occupied:has(.seat-status.seated) {
    background: #f7faf8;
}

/* 作業中 */
.seat-card.occupied:has(.seat-status.working) {
    background: #e4f3e9;
}

/* 休憩中 */
.seat-card.occupied:has(.seat-status.paused) {
    background: #fff8e9;
}

/* 自分の席 */
.seat-card.my-seat {
    border-color: #5d9d7a;
}

/* 自分：着席中 */
.seat-card.my-seat:has(.seat-status.seated) {
    background: #f7faf8;
}

/* 自分：作業中 */
.seat-card.my-seat:has(.seat-status.working) {
    background: #e4f3e9;
}

/* 自分：休憩中 */
.seat-card.my-seat:has(.seat-status.paused) {
    background: #fff8e9;
}

.seat-number {
    font-size: 20px;
    font-weight: 700;
}

.seat-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #78909c;
}

.seat-user {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
}

.seat-status {
    display: inline-block;
    margin-top: 7px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.seat-status.seated {
    background: #eef2f0;
    color: #607068;
}

.seat-status.working {
    background: #ffffff;
    color: #39745a;
    border: 1px solid #b8d7c2;
}

.seat-status.paused {
    background: #fff3dc;
    color: #9a6b22;
}

.loading {
    grid-column: 1 / -1;
    padding: 50px;
    text-align: center;
    color: #78909c;
}

.seat-category {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5f766b;
    line-height: 1.4;
}

/* =========================
   Sidebar
========================= */

.sidebar {
    width: 320px;

    flex-shrink: 0;

    padding: 24px;

    background: #fffdf8;

    border-left: 1px solid #e5e8e5;

    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}

.sidebar-header h2 {
    margin: 0;

    font-size: 18px;
}

.close-button {
    display: none;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 10px;

    background: #eeeeee;

    font-size: 24px;

    cursor: pointer;
}


/* =========================
   Panels
========================= */

.panel {
    margin-bottom: 16px;

    padding: 17px;

    background: #ffffff;

    border: 1px solid #ebe9df;

    border-radius: 18px;
}

.panel-label {
    margin-bottom: 8px;

    font-size: 12px;

    color: #78909c;
}

.current-time {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.user-name {
    font-weight: 600;
    text-align: center;
}

.status-text {
    font-weight: 600;
}

.selected-seat {
    margin-bottom: 12px;

    font-size: 20px;

    font-weight: 700;
}

.work-timer {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin: 12px 0 16px;
}

.work-total {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: -8px 0 16px;
}

.timeline-panel {
    overflow: hidden;
}

#timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-loading {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 10px 0;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 12px;
    padding: 0 0 14px 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-time {
    position: relative;
    padding-top: 3px;
    color: #8b95a7;
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
}

.timeline-content {
    position: relative;
    padding-left: 18px;
    min-height: 34px;
    line-height: 1.4;
}

.timeline-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9aa4b2;
    box-shadow: 0 0 0 3px #eef1f5;
}

.timeline-item:not(:last-child) .timeline-content::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 17px;
    bottom: -14px;
    width: 1px;
    background: #e2e6ec;
}

.timeline-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3f4856;
}

.timeline-event {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6f7887;
}

.timeline-icon {
    display: inline-flex;
    width: 20px;
    justify-content: center;
    font-weight: 600;
}

.timeline-seated .timeline-content::before {
    background: #4a90e2;
}

.timeline-seated .timeline-icon {
    color: #4a90e2;
}

.timeline-started .timeline-content::before {
    background: #45a36b;
}

.timeline-started .timeline-icon {
    color: #45a36b;
}

.timeline-paused .timeline-content::before {
    background: #e6a23c;
}

.timeline-paused .timeline-icon {
    color: #e6a23c;
}

.timeline-ended .timeline-content::before {
    background: #d96565;
}

.timeline-ended .timeline-icon {
    color: #d96565;
}

.timeline-left .timeline-content::before {
    background: #9aa4b2;
}

.timeline-left .timeline-icon {
    color: #7f8998;
}

.timeline-more-button {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 8px 12px;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    background: #f8f9fb;
    color: #687386;
    font-size: 12px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.timeline-more-button:hover {
    background: #eef2f6;
    border-color: #d2d9e2;
    color: #4f5b6b;
}

.timeline-more-button:active {
    background: #e7ebf0;
}

/* =========================
   Buttons
========================= */

button {
    font-family: inherit;
}

.primary-button,
.secondary-button,
.danger-button {
    width: 100%;

    min-height: 46px;

    border: 0;

    border-radius: 13px;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;
}

.primary-button {
    background: #4d9670;
    color: #ffffff;
}

.primary-button:disabled {
    background: #cbd8d1;
    cursor: not-allowed;
}

.secondary-button:disabled,
.danger-button:disabled {
    background: #e1e5e3;
    color: #9aa5a0;
    cursor: not-allowed;
    opacity: 0.7;
}

.secondary-button {
    background: #e8f3ed;
    color: #39745a;
    margin-top: 10px;
}

.danger-button {
    background: #fff0ef;
    color: #c5524d;
    margin-top: 10px;
}

.registration-card p {
    margin: 0 0 14px;

    font-size: 12px;

    line-height: 1.7;

    color: #607d8b;
}


/* =========================
   Overlay
========================= */

.overlay {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(30, 40, 35, 0.35);

    z-index: 150;
}


/* =========================
   Tablet
========================= */

@media (max-width: 1199px) {

    .seat-grid {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }

    .sidebar {
        width: 280px;
    }
}


/* =========================
   Mobile
========================= */

@media (max-width: 767px) {

    .header {
        height: 60px;

        padding: 0 14px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;

        font-size: 18px;
    }

    .service-name {
        font-size: 15px;
    }

    .tagline {
        display: none;
    }

    .header-room {
        font-size: 12px;

        gap: 7px;
    }

    .header-room span:last-child {
        padding: 5px 9px;
    }

    .menu-button {
        display: block;
    }

    .layout {
        min-height: calc(100vh - 60px);
    }

    .seat-area {
        width: 100%;

        padding: 16px;
    }

    .seat-area-header {
        margin-bottom: 16px;
    }

    .seat-area-header h1 {
        font-size: 20px;
    }

    .seat-area-header p {
        display: none;
    }

    .working-badge {
        display: none;
    }

    .seat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .seat-card {
        min-height: 130px;

        padding: 14px;

        border-radius: 18px;
    }

    .seat-number {
        font-size: 18px;
    }

    .sidebar {
        position: fixed;

        top: 0;
        right: -310px;
        bottom: 0;

        width: 290px;

        height: auto;
        max-height: 100dvh;

        z-index: 200;

        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;

        padding-bottom: 40px;

        transition: right 0.25s ease;

        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    }

    .sidebar.open {
        right: 0;
    }

    .close-button {
        display: block;
    }

    .overlay.open {
        display: block;
    }
}

.work-category {
    width: 100%;
    min-height: 46px;
    padding: 0 42px 0 14px;
    border: 1px solid #d6e2dc;
    border-radius: 13px;
    background: #ffffff;
    color: #34443d;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b8177 50%),
                      linear-gradient(135deg, #6b8177 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.work-category:focus {
    outline: none;
    border-color: #7eae95;
    box-shadow: 0 0 0 3px rgba(126, 174, 149, 0.15);
}

.seat-join-button {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 8px 6px;
    border: 0;
    border-radius: 10px;
    background: #4d9670;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* PC：マウス操作のときだけ表示 */
@media (hover: hover) and (pointer: fine) {
    .seat-card.available:hover .seat-join-button {
        display: block;
    }
}

/* スマホ・タブレット：タップしたら表示 */
.seat-card.available.show-join-button .seat-join-button {
    display: block;
}

/* =========================
   会員登録
========================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #eef8f3;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    padding: 34px;
    background: #fffdf8;
    border: 1px solid #e5e8e5;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(60, 90, 75, 0.08);
}

.auth-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dff3e8;
    border-radius: 16px;
    font-size: 26px;
}

.auth-card h1 {
    margin: 0;
    text-align: center;
    font-size: 24px;
}

.auth-description {
    margin: 10px 0 28px;
    color: #78909c;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

.auth-field {
    margin-bottom: 17px;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #d6e2dc;
    border-radius: 13px;
    background: #fff;
    color: #34443d;
    font-family: inherit;
    font-size: 14px;
}

.auth-field input:focus {
    outline: none;
    border-color: #7eae95;
    box-shadow: 0 0 0 3px rgba(126, 174, 149, 0.15);
}

.auth-message {
    min-height: 20px;
    margin-bottom: 8px;
    color: #c5524d;
    font-size: 12px;
    line-height: 1.6;
}

.auth-back {
    display: block;
    margin-top: 20px;
    color: #607d8b;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
}

.auth-back:hover {
    text-decoration: underline;
}

.registration-card a.secondary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    box-sizing: border-box;
}

/* =========================
   会員ページ
========================= */

.member-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.member-nav-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    color: #607d8b;
    text-decoration: none;
    font-size: 19px;
}

.member-nav-link:hover,
.member-nav-link.active {
    background: #e4f3e9;
}

.logout-button {
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;

    padding: 0;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e2c8c5;
    border-radius: 12px;

    background: #fff;
    color: #b6534d;

    cursor: pointer;
}

.logout-button svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logout-button:hover {
    background: #fff5f3;
}

.logout-button:hover {
    background: #fff5f3;
}

.member-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.member-page-header h1 {
    margin: 0;
    font-size: 28px;
}

.member-page-header p {
    margin: 8px 0 0;
    color: #78909c;
    font-size: 13px;
}

 /* =========================
    設定ページ
 ========================= */

 .setting-card {
     margin-top: 24px;
     padding: 24px;
     background: #fffdf8;
     border: 1px solid #e5e8e5;
     border-radius: 18px;
     box-shadow: 0 4px 18px rgba(60, 90, 75, 0.05);
 }

 .setting-card h2 {
     margin: 0 0 16px;
     font-size: 17px;
 }

 .setting-description {
     margin: -6px 0 18px;
     color: #78909c;
     font-size: 13px;
     line-height: 1.7;
 }

 .setting-field {
     margin-bottom: 16px;
 }

 .setting-field label {
     display: block;
     margin-bottom: 7px;
     font-size: 13px;
     font-weight: 700;
 }

 .setting-field input,
 .category-add-form input {
     width: 100%;
     min-height: 44px;
     padding: 0 13px;
     box-sizing: border-box;
     border: 1px solid #d6e2dc;
     border-radius: 12px;
     background: #fff;
     color: #34443d;
     font-family: inherit;
     font-size: 14px;
 }

 .setting-field input:focus,
 .category-add-form input:focus {
     outline: none;
     border-color: #7eae95;
     box-shadow: 0 0 0 3px rgba(126, 174, 149, 0.15);
 }

 .category-list {
     display: flex;
     flex-direction: column;
     gap: 8px;
     margin-bottom: 18px;
 }

 .category-item {
     min-height: 44px;
     padding: 0 12px 0 14px;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
     box-sizing: border-box;
     border: 1px solid #e3e9e5;
     border-radius: 12px;
     background: #fff;
     font-size: 13px;
 }

 .category-default {
     padding: 3px 8px;
     border-radius: 8px;
     background: #eef4f0;
     color: #78909c;
     font-size: 10px;
 }

 .category-item form {
     margin: 0;
 }

 .category-delete-button {
     padding: 5px 9px;
     border: 0;
     background: transparent;
     color: #c5524d;
     font-family: inherit;
     font-size: 11px;
     cursor: pointer;
 }

 .category-delete-button:hover {
     text-decoration: underline;
 }

 .category-add-form {
     display: flex;
     gap: 8px;
 }

 .category-add-form input {
     flex: 1;
 }

 .category-add-form .secondary-button {
     flex-shrink: 0;
     width: auto;
 }

 .setting-message {
     margin-top: 24px;
     padding: 12px 14px;
     border-radius: 12px;
     font-size: 13px;
 }

 .setting-message.success {
     background: #eaf6ee;
     color: #4f8a68;
 }

 .setting-message.error {
     background: #fff1ef;
     color: #b6534d;
 }

 .account-delete-card {
     margin-top: 40px;
     border-color: #ead6d3;
 }

 .account-delete-card h2 {
     color: #a94e49;
 }

.leave-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(30, 45, 38, 0.35);
}

.leave-modal {
    width: min(360px, 100%);
    padding: 24px;

    box-sizing: border-box;

    background: #fffdf8;
    border: 1px solid #e5e8e5;
    border-radius: 18px;

    box-shadow:
        0 12px 40px
        rgba(40, 60, 50, 0.18);
}

.leave-modal-title {
    color: #34443d;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
}

.leave-modal-message {
    margin-top: 10px;

    color: #78909c;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.leave-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin-top: 22px;
}

.leave-modal-actions button {
    min-height: 44px;

    border-radius: 12px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.leave-modal-cancel {
    border: 1px solid #dfe7e2;
    background: #fff;
    color: #60756b;
}

.leave-modal-confirm {
    border: 1px solid #e3b7b7;
    background: #fff1f1;
    color: #b14d4d;
}

/* =========================
   自習室セレクター
========================= */

.header-room {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-selector-button {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 7px 9px;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: inherit;

    font-family: inherit;
    font-size: inherit;
    font-weight: 700;

    cursor: pointer;
}

.room-selector-button:hover {
    background: #f1f7f3;
}

.room-selector-arrow {
    font-size: 9px;
    opacity: 0.6;
}

.room-selector-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;

    min-width: 190px;

    padding: 6px;

    background: #fffdf8;
    border: 1px solid #dfe7e2;
    border-radius: 12px;

    box-shadow:
        0 8px 24px
        rgba(50, 70, 60, 0.12);

    display: none;

    z-index: 1000;
}

.room-selector-menu.open {
    display: block;
}

.room-option {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 11px 12px;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: #45564e;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    text-align: left;
}

.room-option:hover {
    background: #f3f8f5;
}

.room-option.active {
    background: #e4f3e9;
    color: #47765b;
}

/* =========================
   自習室ごとのテーマ
========================= */

.room-theme-1 {
    --room-accent: #6f9f82;
    --room-soft: #e8f3eb;
    --room-bg: #f7fbf8;
}

.room-theme-2 {
    --room-accent: #6f91b5;
    --room-soft: #e9f1f8;
    --room-bg: #f7fafc;
}

.room-theme-3 {
    --room-accent: #b49a62;
    --room-soft: #f8f2df;
    --room-bg: #fcfaf4;
}

.room-theme-4 {
    --room-accent: #8f82ae;
    --room-soft: #f0edf7;
    --room-bg: #faf9fc;
}

/* =========================
   自習室テーマ反映
========================= */

.seat-area {
    background: var(--room-bg);
}

.seat-area-header h1 {
    color: var(--room-accent);
}

.working-badge {
    background: var(--room-soft);
    color: var(--room-accent);
}

.seat-card.selected {
    border-color: var(--room-accent);
    background: var(--room-soft);
}

.seat-card.my-seat {
    border-color: var(--room-accent);
    background: var(--room-soft);
}

.seat-card.my-seat .seat-number,
.seat-card.selected .seat-number {
    color: var(--room-accent);
}

.seat-join-button {
    background: var(--room-accent);
}

.bgm-section {
    margin-bottom: 18px;
}

.bgm-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #4f5f57;
}

.bgm-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bgm-select {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #dfe7e2;
    border-radius: 10px;
    background: #fff;
    color: #4f5f57;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.bgm-select:focus {
    outline: none;
    border-color: #8eb59d;
}

.bgm-button {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #dfe7e2;
    border-radius: 10px;
    background: #fff;
    color: #527563;
    font-size: 15px;
    cursor: pointer;
}

.bgm-button:hover:not(:disabled) {
    background: #eef6f1;
}

.bgm-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.bgm-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.bgm-volume span {
    flex-shrink: 0;
    font-size: 14px;
}

.bgm-volume input[type="range"] {
    flex: 1;
    width: 100%;
    accent-color: #6f9f82;
    cursor: pointer;
}

.category-visibility-form {
    margin: 0 0 18px;
    padding-bottom: 1px;
}

/* =========================
   汎用確認モーダル
========================= */

.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;

    background: rgba(35, 48, 43, 0.38);
}

.confirm-modal {
    width: min(100%, 360px);
    padding: 24px 22px 20px;

    box-sizing: border-box;

    background: #fffdf8;
    border: 1px solid #e5e8e5;
    border-radius: 18px;

    box-shadow: 0 12px 40px rgba(40, 60, 50, 0.18);

    animation: confirmModalShow 0.18s ease-out;
}

.confirm-modal-title {
    margin-bottom: 10px;

    color: #34443d;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.confirm-modal-message {
    margin-bottom: 22px;

    color: #78909c;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.confirm-modal-actions {
    display: flex;
    gap: 8px;
}

.confirm-modal-cancel,
.confirm-modal-confirm {
    flex: 1;

    min-height: 44px;
    padding: 0 12px;

    border-radius: 11px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.confirm-modal-cancel {
    border: 1px solid #dbe4df;
    background: #fff;
    color: #607068;
}

.confirm-modal-cancel:hover {
    background: #f5f8f6;
}

.confirm-modal-confirm {
    border: 1px solid #6f9f82;
    background: #6f9f82;
    color: #fff;
}

.confirm-modal-confirm:hover {
    background: #5f8f72;
}

/* =========================
   アバター設定
========================= */

.avatar-setting {
    display: flex;
    align-items: center;
    gap: 20px;
}

.setting-avatar {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #dfe7e2;
    background: #f4f7f5;
}

.setting-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
}

.avatar-setting-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.avatar-setting-form form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-setting-form input[type="file"] {
    max-width: 100%;
    font-family: inherit;
    font-size: 13px;
    color: #607068;
}

.avatar-setting-form input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 14px;
    border: 1px solid #dbe4df;
    border-radius: 9px;
    background: #f7faf8;
    color: #607068;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.avatar-setting-form input[type="file"]::file-selector-button:hover {
    background: #eef5f1;
}

@media (max-width: 767px) {

    .avatar-setting {
        align-items: flex-start;
        gap: 14px;
    }

    .setting-avatar {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
    }

    .avatar-setting-form {
        min-width: 0;
        flex: 1;
    }

    .avatar-setting-form form {
        flex-direction: column;
        align-items: stretch;
    }

    .avatar-setting-form input[type="file"] {
        width: 100%;
    }
}

/* =========================
   座席アバター
========================= */

.seat-card {
    position: relative;
}

.seat-avatar {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #dfe7e2;
    background: #f4f7f5;
}

.seat-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.pwa-install-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
}

.pwa-install-modal-content {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-sizing: border-box;
}

.pwa-install-modal-content h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.pwa-install-modal-content p {
    margin: 0 0 20px;
    line-height: 1.7;
}

#pwaInstallButton {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #6f9f82;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

#pwaInstallLaterButton {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: none;
    background: transparent;
    color: #666666;
    font-size: 14px;
    cursor: pointer;
}

.google-login {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
.google-login > div {
    width: min(400px, 100%);
    max-width: 100%;
}

@keyframes confirmModalShow {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

 @media (max-width: 600px) {

     .setting-card {
         padding: 20px 16px;
         border-radius: 16px;
     }

     .category-add-form {
         flex-direction: column;
     }

     .category-add-form .secondary-button {
         width: 100%;
     }
 }

@media (max-width: 600px) {

    .member-nav-link {
        width: 38px;
        height: 38px;
    }

    .member-page {
        padding: 28px 16px;
    }
}

@media (max-width: 480px) {

    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 26px 20px;
        border-radius: 20px;
    }
}