* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: #1b1f23;
    background: #f6f7f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

.page {
    flex: 1 0 auto;
}

a {
    color: #165d8f;
    text-decoration: none;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 30px;
    background: #ffffff;
    border-bottom: 1px solid #dde2e8;
}

.simple-public-topbar {
    justify-content: center;
    padding: 14px 20px;
}

.home-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    justify-content: space-between;
    min-height: 66px;
    padding-inline: clamp(18px, 5vw, 72px);
}

.home-brand {
    font-size: 22px;
}

.home-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
}

.home-nav a {
    color: #223044;
}

.home-nav a:hover {
    color: #0f6b55;
}

.home-nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 999px;
    padding: 6px 16px;
    background: #19b394;
    color: #ffffff !important;
    font-weight: 900;
}

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

.brand {
    color: #102236;
    font-size: 20px;
    font-weight: 700;
}

.account-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    background: #edf6f2;
    color: #19523f;
    font-size: 14px;
    font-weight: 700;
}

.account-badge.muted {
    background: #eef1f4;
    color: #46515f;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    border-top: 1px solid #dde2e8;
    padding: 18px clamp(18px, 4vw, 48px);
    background: #ffffff;
    color: #53606f;
    font-size: 14px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.site-footer a {
    color: #334155;
    font-weight: 700;
    text-decoration: none;
}

.site-footer a:hover {
    color: #0f6b55;
}

.nav-post-link {
    color: #165d8f;
    font-weight: 700;
}

.nav-post-link:hover {
    color: #0f4f40;
}

.home-page {
    width: 100vw;
    margin: -28px calc(50% - 50vw) -28px;
    overflow: hidden;
    background: linear-gradient(180deg, #f5fbf8 0%, #ffffff 52%, #f7f9fb 100%);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
    align-items: center;
    justify-items: stretch;
    gap: clamp(32px, 5vw, 72px);
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 170px);
    margin: 0 auto;
    padding: clamp(58px, 8vw, 104px) 0 clamp(46px, 7vw, 82px);
}

.home-hero-copy {
    max-width: 640px;
    text-align: left;
    margin-inline: 0;
}

.home-entry-label {
    margin: 0 0 10px;
    color: #5b6878;
    font-size: 15px;
    font-weight: 800;
}

.home-hero h1 {
    margin: 0 0 14px;
    color: #102236;
    font-size: clamp(40px, 6.2vw, 76px);
    line-height: 1.08;
    letter-spacing: 0;
}

.home-lead {
    margin: 0;
    max-width: 560px;
    color: #526071;
    font-size: clamp(17px, 2vw, 20px);
}

.home-beta-note {
    display: inline-flex;
    align-items: center;
    margin: 20px 0 0;
    border: 1px solid #badfd4;
    border-radius: 999px;
    padding: 8px 14px;
    background: #eef9f5;
    color: #0f6b55;
    font-size: 14px;
    font-weight: 800;
}

.home-entry-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 30px;
}

.home-primary-button {
    min-width: 220px;
    justify-content: center;
    padding: 14px 28px;
    font-size: 18px;
}

.home-secondary-button {
    justify-content: center;
    padding: 14px 24px;
    font-size: 18px;
}

.home-hero-visual {
    width: 100%;
    border: 1px solid #d9e4df;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(30, 72, 94, 0.16);
    overflow: hidden;
}

.home-browser-bar {
    display: flex;
    gap: 8px;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #fbfdff;
}

.home-browser-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #d9e2ea;
}

.home-dashboard-mock {
    padding: clamp(18px, 3vw, 30px);
}

.home-mock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.home-mock-header strong {
    color: #102236;
    font-size: 18px;
}

.home-mock-header span {
    color: #5c6978;
    font-size: 14px;
    font-weight: 800;
}

.home-mock-grid {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 10px;
    align-items: center;
}

.home-mock-side {
    color: #526071;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

.home-mock-slot {
    min-height: 64px;
    border-radius: 12px;
    padding: 10px 14px;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(16, 34, 54, 0.12);
}

.home-mock-slot span,
.home-mock-slot strong {
    display: block;
    white-space: nowrap;
}

.home-mock-slot span {
    font-size: 13px;
    font-weight: 900;
    opacity: 0.9;
}

.home-mock-slot strong {
    margin-top: 2px;
    font-size: 18px;
}

.home-mock-slot.is-open { background: #2f80ed; }
.home-mock-slot.is-reserved { background: #db5aa9; }
.home-mock-slot.is-done { background: #8d98a7; }

.home-mock-panel {
    margin-top: 22px;
    border-left: 5px solid #19a886;
    border-radius: 12px;
    padding: 18px 20px;
    background: #eef9f5;
}

.home-mock-panel span {
    display: block;
    color: #0f6b55;
    font-size: 13px;
    font-weight: 900;
}

.home-mock-panel strong {
    display: block;
    margin-top: 4px;
    color: #102236;
    font-size: 18px;
}

.home-feature-section,
.home-flow-section,
.home-knowhow-section {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(54px, 8vw, 88px) 0;
}

.home-section-heading {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.home-section-heading h2 {
    margin: 0;
    color: #102236;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.16;
}

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-feature-card {
    min-height: 240px;
    border: 1px solid #dfe7ee;
    border-radius: 18px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(16, 34, 54, 0.06);
}

.home-feature-card span,
.home-flow-list span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e7f7f2;
    color: #0f6b55;
    font-weight: 900;
}

.home-feature-card h3 {
    margin: 22px 0 10px;
    color: #102236;
    font-size: 22px;
}

.home-feature-card p,
.home-flow-list p {
    margin: 0;
    color: #5a6675;
}

.home-flow-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.home-flow-list li {
    border-top: 4px solid #19a886;
    border-radius: 14px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(16, 34, 54, 0.05);
}

.home-flow-list strong {
    display: block;
    margin: 14px 0 6px;
    color: #102236;
    font-size: 18px;
}

.home-knowhow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-knowhow-card {
    min-height: 220px;
    border: 1px solid #d8e5df;
    border-radius: 18px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(16, 34, 54, 0.055);
}

.home-knowhow-card h3 {
    margin: 0 0 12px;
    color: #102236;
    font-size: 21px;
}

.home-knowhow-card p {
    margin: 0;
    color: #5a6675;
}

@media (max-width: 920px) {
    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .home-hero-copy {
        max-width: 760px;
        text-align: center;
        margin-inline: auto;
    }

    .home-lead {
        margin-inline: auto;
    }

    .home-entry-actions {
        justify-content: center;
    }

    .home-feature-grid,
    .home-flow-list,
    .home-knowhow-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .home-topbar {
        align-items: center;
        flex-direction: row;
        gap: 14px;
        padding-inline: 16px;
    }

    .home-brand {
        font-size: 19px;
    }

    .home-nav {
        gap: 10px;
        font-size: 13px;
    }

    .home-nav-cta {
        display: none;
    }

    .home-page {
        width: 100vw;
        margin: -14px calc(50% - 50vw) -14px;
    }

    .home-hero,
    .home-feature-section,
    .home-flow-section,
    .home-knowhow-section {
        width: min(100% - 24px, 1180px);
    }

    .home-hero {
        padding-top: 42px;
    }

    .home-entry-actions {
        display: grid;
        gap: 10px;
    }

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

    .home-hero-visual {
        border-radius: 16px;
    }

    .home-mock-grid {
        grid-template-columns: 42px 1fr;
    }

    .home-feature-grid,
    .home-flow-list,
    .home-knowhow-grid {
        grid-template-columns: 1fr;
    }

    .home-feature-card,
    .home-knowhow-card {
        min-height: auto;
    }
}

.bot-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.submit-wait-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16, 34, 54, 0.42);
}

.submit-wait-overlay[hidden] {
    display: none;
}

.submit-wait-box {
    display: grid;
    justify-items: center;
    gap: 14px;
    width: min(360px, 100%);
    border-radius: 8px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(16, 34, 54, 0.24);
    text-align: center;
}

.submit-wait-box p {
    margin: 0;
    color: #102236;
    font-weight: 800;
}

.submit-wait-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #d6dee7;
    border-top-color: #0f6b55;
    border-radius: 999px;
    animation: submit-wait-spin 800ms linear infinite;
}

@keyframes submit-wait-spin {
    to {
        transform: rotate(360deg);
    }
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.stat-card {
    border: 1px solid #e0e6ec;
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfd;
}

.stat-card span {
    display: block;
    color: #53606f;
    font-size: 14px;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    color: #102236;
    font-size: 28px;
    line-height: 1.2;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.settings-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 180px;
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 18px;
    background: #fbfcfd;
}

.settings-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.settings-card p {
    margin: 0;
    color: #53606f;
    font-size: 14px;
    line-height: 1.55;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px 18px;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.button.compact {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 14px;
}

.button-row {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.action-dropdown {
    position: relative;
    display: inline-block;
    min-width: 78px;
}

.action-dropdown summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 6px;
    padding: 7px 12px;
    background: #53606f;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    list-style: none;
    white-space: nowrap;
}

.action-dropdown summary::-webkit-details-marker {
    display: none;
}

.action-dropdown summary::after {
    content: "▼";
    margin-left: 8px;
    font-size: 10px;
}

.action-dropdown[open] summary::after {
    content: "▲";
}

.action-dropdown-menu {
    position: absolute;
    right: 0;
    z-index: 50;
    display: grid;
    min-width: 180px;
    margin-top: 6px;
    border: 1px solid #d6dee7;
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(16, 34, 54, 0.16);
    text-align: left;
}

.action-dropdown-menu a {
    border-radius: 6px;
    padding: 9px 10px;
    color: #102236;
    font-weight: 800;
    white-space: nowrap;
}

.action-dropdown-menu a:hover {
    background: #edf6f2;
    color: #0f6b55;
}

.experiment-list-area {
    min-height: calc(100vh - 260px);
    overflow: visible;
}

.experiment-list-area .table {
    margin-bottom: 80px;
}

.danger-zone {
    border: 1px solid #e2b9b9;
    border-radius: 8px;
    background: #fff7f7;
}

.text-end > .button,
.text-end > form,
.text-end > a {
    margin: 3px;
}

.weekday-grid,
.template-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.check-tile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid #cbd3dc;
    border-radius: 6px;
    padding: 7px 10px;
    background: #fff;
    color: #102236;
    font-weight: 700;
}

.check-tile.wide {
    min-width: 180px;
}

.check-tile input {
    width: auto;
    margin: 0;
}

.management-section {
    border-top: 1px solid #e0e6ec;
    padding-top: 22px;
    margin-top: 24px;
}

.form-section {
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 20px;
    background: #fbfcfd;
}

.management-section.primary-section {
    border-top: 0;
    padding-top: 0;
}

.dashboard-section {
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 20px;
    background: #fbfcfd;
}

.dashboard-section .table {
    margin-bottom: 0;
}

.collapsible-section {
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 0;
    background: #fff;
}

.collapsible-section + .collapsible-section,
.collapsible-section + .management-section,
.management-section + .collapsible-section {
    margin-top: 18px;
}

.collapsible-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.collapsible-summary::-webkit-details-marker {
    display: none;
}

.collapsible-summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid #cbd3dc;
    border-radius: 999px;
    color: #46515f;
    font-weight: 900;
}

.collapsible-section[open] .collapsible-summary::after {
    content: "-";
}

.collapsible-summary h2 {
    margin-top: 0;
    margin-bottom: 4px;
}

.collapsible-section > .slot-admin-menu,
.collapsible-section > form,
.collapsible-section > .actions,
.collapsible-section > .empty-state,
.collapsible-section > .table-responsive,
.collapsible-section > .setting-panel {
    margin: 0 20px 20px;
}

.collapsible-section > .setting-panel {
    border-radius: 6px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin-top: 0;
    margin-bottom: 4px;
}

.setting-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}


.experiment-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.experiment-member-toggle.is-fixed {
    background: #f7fafc;
    border-color: #d9e2ec;
}

.experiment-member-toggle input[type="checkbox"]:disabled + .setting-toggle-copy {
    opacity: 0.82;
}

.form-setting-list {
    display: grid;
    gap: 14px;
}

.form-setting-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(120px, auto);
    gap: 12px;
    align-items: stretch;
}

.form-setting-row.custom-question-row {
    grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr) minmax(120px, auto);
}

.setting-toggle {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 68px;
    border: 1px solid #d6dee7;
    border-radius: 8px;
    padding: 14px 16px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.setting-toggle:hover {
    border-color: #aebfce;
    box-shadow: 0 2px 8px rgba(16, 34, 54, 0.06);
}

.setting-toggle input[type="checkbox"] {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.setting-toggle-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.setting-toggle strong {
    color: #102236;
    font-size: 14px;
    line-height: 1.35;
}

.setting-toggle small {
    color: #53606f;
    font-size: 13px;
    line-height: 1.35;
}

.switch-ui {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: #cbd3dc;
    box-shadow: inset 0 0 0 1px rgba(16, 34, 54, 0.06);
    transition: background 140ms ease;
}

.switch-ui::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 34, 54, 0.28);
    transition: transform 140ms ease;
}

.setting-toggle:has(input[type="checkbox"]:checked) {
    border-color: #91c7b8;
    background: #f3fbf8;
}

.setting-toggle:has(input[type="checkbox"]:checked) .switch-ui {
    background: #0f6b55;
}

.setting-toggle:has(input[type="checkbox"]:checked) .switch-ui::after {
    transform: translateX(20px);
}

.required-label {
    color: #b42318;
    font-size: 0.78em;
    font-weight: 700;
    margin-left: 0.4rem;
}

.js-online-settings.is-disabled {
    opacity: 0.62;
}

.js-online-settings.is-disabled::after {
    content: "実験種別をオンライン実験にすると入力できます。";
    display: block;
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.compact-toggle {
    justify-content: center;
    min-width: 128px;
}

.custom-question-row .input {
    margin: 0;
}

.custom-question-row input[type="text"] {
    min-height: 58px;
}

.tox.tox-tinymce {
    border-color: #cbd3dc;
    border-radius: 8px;
    overflow: hidden;
}

.tox .tox-toolbar,
.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary {
    background: #f2f5f8;
}

.tox .tox-edit-area__iframe {
    background: #ffffff;
}

.compact-heading {
    align-items: center;
}

.slot-admin-menu {
    display: grid;
    gap: 14px;
}

.slot-admin-menu-group {
    display: grid;
    grid-template-columns: 160px repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    align-items: center;
}

.slot-admin-menu-group > span {
    color: #46515f;
    font-size: 14px;
    font-weight: 800;
}

.menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid #cbd3dc;
    border-radius: 6px;
    padding: 9px 12px;
    background: #fff;
    color: #102236;
    font-weight: 800;
}

.menu-button.active {
    border-color: #0f6b55;
    background: #edf6f2;
    color: #0f4f40;
}

.setting-panel {
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 20px;
    background: #fbfcfd;
}

.setting-panel h2 {
    margin-top: 0;
}

.slot-day-group {
    border: 1px solid #dde2e8;
    border-radius: 8px;
    margin: 16px 0;
    overflow: hidden;
    background: #fff;
}

.slot-day-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: #f3f6f8;
    border-bottom: 1px solid #dde2e8;
}

.slot-day-heading h3 {
    margin: 0;
    font-size: 20px;
}

.slot-day-heading span {
    color: #53606f;
    font-weight: 700;
}

.slot-date-section {
    border: 1px solid #d6dee7;
    border-radius: 8px;
    margin: 18px 0;
    background: #ffffff;
    overflow: hidden;
}

.slot-date-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #f8fafc;
    cursor: pointer;
}

.slot-date-section-summary h3 {
    margin: 0;
    font-size: 22px;
}

.slot-date-section-summary > span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 10px;
    background: #e8edf3;
    color: #53606f;
    font-weight: 800;
}

.slot-date-section .slot-day-group {
    margin: 16px;
}

.small-id {
    margin: 4px 0 10px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
}

.empty-state {
    border: 1px dashed #b9c4cf;
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfd;
    color: #53606f;
    font-weight: 700;
}

.empty-state.small {
    margin: 16px;
    padding: 12px 14px;
}

.experiment-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.experiment-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 18px;
    background: #fbfcfd;
}

.experiment-card h2 {
    margin-top: 0;
}

.public-description {
    margin: 18px 0;
}

.public-description p {
    line-height: 1.75;
}

.public-compact-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 14px 0 16px;
    padding: 10px 12px;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    background: #fbfcfd;
    color: #102236;
    font-size: 14px;
    line-height: 1.6;
}

.public-compact-facts span {
    display: inline-flex;
    gap: 4px;
    align-items: baseline;
}

.public-compact-facts strong {
    white-space: nowrap;
}

.public-experiment-page .page-heading {
    margin-bottom: 14px;
}

.public-experiment-page h1 {
    margin-bottom: 6px;
}

.public-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
}

.summary-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dbe3ea;
    border-radius: 999px;
    padding: 6px 12px;
    background: #fbfcfd;
    line-height: 1.25;
}

.summary-item span {
    color: #53606f;
    font-size: 13px;
    font-weight: 700;
}

.summary-item strong {
    color: #102236;
    font-size: 14px;
}

.public-reservation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
}

.has-selected-date .public-reservation-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
}

.public-info-column {
    min-width: 0;
}

.public-experiment-page.is-online-experiment .public-reservation-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 980px;
}

.online-entry-card {
    margin-top: 18px;
    border: 1px solid #d7e5f0;
    border-radius: 8px;
    padding: 18px;
    background: #f7fbff;
}

.online-entry-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.online-entry-card p {
    margin: 0 0 12px;
    color: #53606f;
    font-weight: 600;
}

.compact-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 12px 0 14px;
}

.has-selected-date .day-slots {
    order: 1;
}

.public-experiment-page .calendar-section {
    order: 2;
}

.calendar-section,
.day-slots {
    margin-top: 22px;
}

.public-experiment-page .calendar-section,
.has-selected-date .day-slots {
    margin-top: 6px;
}

.public-experiment-page .calendar-section {
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfd;
    width: 380px;
    max-width: 100%;
}

.public-experiment-page .section-title-block h2 {
    font-size: 18px;
}

.public-experiment-page .section-title-block p {
    font-size: 13px;
    line-height: 1.45;
}

.public-experiment-page .calendar-heading {
    gap: 8px;
    margin-bottom: 8px;
}

.public-experiment-page .calendar-heading h2 {
    font-size: 17px;
}

.public-experiment-page .calendar-nav {
    font-size: 14px;
}

.public-experiment-page .calendar-weekday,
.public-experiment-page .calendar-cell {
    min-height: 46px;
}

.public-experiment-page .calendar-weekday {
    min-height: 30px;
    padding: 5px 2px;
    font-size: 14px;
}

.public-experiment-page .calendar-cell {
    padding: 3px 2px;
}

.public-experiment-page .calendar-day {
    font-size: 13px;
}

.public-experiment-page .availability-mark {
    min-width: 24px;
    min-height: 24px;
    font-size: 18px;
}

.public-inquiry-section {
    margin-top: 2rem;
    padding: 0;
    border: 2px solid #b9d7ef;
    border-radius: 10px;
    background: #f8fbff;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(16, 34, 54, 0.06);
}

.public-inquiry-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
    list-style: none;
}

.public-inquiry-summary::-webkit-details-marker {
    display: none;
}

.public-inquiry-summary small {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.public-inquiry-summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
}

.public-inquiry-details[open] .public-inquiry-summary {
    border-bottom: 1px solid var(--line);
}

.public-inquiry-details[open] .public-inquiry-summary::after {
    content: "-";
}

.public-inquiry-body {
    padding: 1.35rem;
    background: #ffffff;
}

.public-inquiry-form {
    margin-top: 1rem;
}

.public-inquiry-form textarea {
    min-height: 150px;
}

.section-title-block {
    margin-bottom: 10px;
}

.section-title-block h2 {
    margin: 0 0 4px;
}

.section-title-block p {
    margin: 0;
    color: #53606f;
    font-size: 14px;
    font-weight: 600;
}

.calendar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.calendar-heading h2 {
    margin: 0;
}

.calendar-nav {
    color: #165d8f;
    font-size: 18px;
    font-weight: 800;
}

.availability-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #30343a;
    border-left: 1px solid #30343a;
}

.calendar-weekday,
.calendar-cell {
    min-height: 74px;
    border-right: 1px solid #30343a;
    border-bottom: 1px solid #30343a;
    background: #fff;
    text-align: center;
}

.calendar-weekday {
    min-height: 42px;
    padding: 8px 4px;
    color: #2b3036;
    font-size: 19px;
    font-weight: 800;
}

.calendar-cell {
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 5px 4px;
}

.calendar-cell.blank {
    background: #f0f1f2;
}

.calendar-cell.limited {
    background: #fffdf0;
}

.calendar-cell.selected {
    background: #eaf5fb;
    box-shadow: inset 0 0 0 2px #58a6d6;
}

.calendar-day {
    font-size: 18px;
    font-weight: 700;
}

.weekday-0 {
    color: #e6503d;
}

.weekday-6 {
    color: #3467d6;
}

.availability-mark,
.slot-reserve-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    min-width: 34px;
    min-height: 34px;
    border-radius: 999px;
    color: #1b1f23;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.availability-mark:hover,
.slot-reserve-mark:hover {
    background: #e7f2fb;
}

.availability-mark.muted,
.slot-reserve-mark.muted {
    color: #888;
}

.slot-choice-table th,
.slot-choice-table td {
    text-align: center;
    font-size: 18px;
    vertical-align: middle;
}

.day-slots .slot-choice-table {
    width: min(100%, 340px);
    table-layout: fixed;
}

.day-slots .slot-choice-table th:first-child,
.day-slots .slot-choice-table td:first-child {
    width: 210px;
}

.day-slots .slot-choice-table th:last-child,
.day-slots .slot-choice-table td:last-child {
    width: 96px;
}

.day-slots {
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfd;
}

.day-slots h2 {
    margin-top: 0;
}

.agreement-check {
    margin-top: 16px;
}

.plain-agreement-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #102236;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    cursor: default;
}

.plain-agreement-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.plain-agreement-check a {
    font-weight: 700;
}

.plain-agreement-note {
    margin: 8px 0 0 28px;
    color: #53606f;
    font-size: 13px;
    line-height: 1.5;
}

.copy-url-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 8px;
}

.copy-url-row input {
    min-width: 0;
    font-size: 14px;
}

.copy-url-row button {
    flex: 0 0 auto;
}

.copy-url-row .copy-open-button {
    flex: 0 0 auto;
}

.experiment-list-area th,
.experiment-list-area td {
    vertical-align: middle;
}

.experiment-status-col {
    width: 92px;
    min-width: 92px;
    white-space: nowrap;
}

.experiment-status-col .status-pill {
    white-space: nowrap;
}

.experiment-listed-col {
    width: 96px;
    min-width: 96px;
    white-space: nowrap;
}

.experiment-creator-col {
    width: 150px;
    min-width: 150px;
}

.experiment-recruitment-col {
    width: 150px;
    min-width: 150px;
}

.experiment-slot-count-col {
    width: 76px;
    min-width: 76px;
    text-align: center;
    white-space: nowrap;
}

.experiment-created-col {
    width: 108px;
    min-width: 108px;
    white-space: nowrap;
}

.experiment-created-col .sort-link,
.experiment-created-col span {
    display: inline-block;
    font-size: 13px;
    line-height: 1.35;
    color: #46515f;
}

.experiment-action-col {
    width: 116px;
    min-width: 116px;
}

.experiment-recruitment-col > span,
.date-pair {
    display: grid;
    gap: 2px;
    white-space: nowrap;
}

.date-pair {
    font-size: 13px;
    line-height: 1.35;
    color: #46515f;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    font-weight: 700;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto;
}

.panel,
.job-card,
.profile {
    background: #ffffff;
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(16, 34, 54, 0.04);
}

.wide-panel {
    width: min(calc(100vw - 48px), 1480px);
    margin-left: calc(50% - min(calc(100vw - 48px), 1480px) / 2);
}

.participants-table-area {
    min-height: calc(100vh - 300px);
}

.participants-table {
    min-width: 1280px;
}

.participants-table-online {
    min-width: 1160px;
}

.participants-table .external-key-cell {
    width: 150px;
    max-width: 150px;
    color: #46515f;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.participant-row-number-col {
    width: 56px;
    min-width: 56px;
    text-align: center;
}

.participant-slot-time-col {
    width: 118px;
    min-width: 118px;
    white-space: nowrap;
}

.participant-slot-time-col span {
    display: block;
    line-height: 1.35;
}

.participant-name-col {
    width: 150px;
    min-width: 150px;
}

.participant-custom-answer-col {
    min-width: 120px;
    max-width: 180px;
}

.participant-id-display-col {
    width: 96px;
    min-width: 96px;
    max-width: 120px;
    overflow-wrap: anywhere;
}

.participant-action-col,
.participants-table th:last-child,
.participants-table td:last-child {
    width: 72px;
    min-width: 72px;
    text-align: center;
}

.participant-delete-form {
    justify-content: center;
}

.tiny-action-button {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.1;
}

.participant-mail-link {
    font-weight: 700;
    color: #1f5f93;
    text-decoration: none;
}

.participant-mail-link:hover {
    text-decoration: underline;
}

.status-autosubmit-form {
    min-width: 132px;
}

.status-autosubmit-form .input {
    min-width: 132px;
}

.two-line-button {
    line-height: 1.12;
    white-space: normal;
    text-align: center;
}

.participant-edit-form .detail-item {
    min-height: 76px;
}

.status-autosubmit-form select {
    width: 132px;
}

.toast-flash-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast-flash-container .alert {
    margin: 0;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(12, 27, 44, 0.18);
    font-weight: 700;
    pointer-events: auto;
    animation: toast-fade-out 4.5s ease forwards;
}

@keyframes toast-fade-out {
    0%,
    72% {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
    100% {
        opacity: 0;
        transform: translateY(8px);
        visibility: hidden;
    }
}

h1 {
    margin: 0 0 18px;
    font-size: 30px;
    line-height: 1.3;
}

h2 {
    font-size: 23px;
    line-height: 1.35;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.search-panel summary {
    cursor: pointer;
    color: #102236;
    font-size: 18px;
    font-weight: 800;
}

.search-panel .filters {
    margin-top: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #46515f;
    font-size: 14px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd3dc;
    border-radius: 6px;
    padding: 12px 13px;
    background: #ffffff;
    font: inherit;
}

.large-input {
    min-height: 48px;
    font-size: 18px;
}

.multi-date-picker {
    cursor: pointer;
    background: #ffffff;
}

.flatpickr-calendar {
    font-size: 17px;
    width: 340px;
}

.flatpickr-day {
    max-width: 44px;
    height: 44px;
    line-height: 44px;
}

.flatpickr-time input {
    font-size: 18px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 12px;
}

.time-grid select {
    min-height: 48px;
    font-size: 18px;
}

button,
.button,
input[type="submit"] {
    font-size: 17px;
}

textarea {
    min-height: 120px;
}

button,
.button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    color: #ffffff;
    background: #0f6b55;
    cursor: pointer;
    font-weight: 700;
}

.button.secondary,
button.secondary {
    background: #53606f;
}

.button.success,
button.success {
    background: #237a57;
}

.button.danger,
button.danger {
    background: #a13d3d;
}

.button.tone-basic {
    background: #2f7668;
}

.button.tone-slots {
    background: #1f6aa5;
}

.button.tone-participants {
    background: #6f4fa3;
}

.button.tone-edit {
    background: #5f6d7a;
}

.sort-link {
    color: #102236;
    font-weight: 800;
}

.sort-link:hover {
    color: #0f6b55;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

.status-experiment-draft {
    background: #fff4dc;
    color: #705000;
}

.status-experiment-published,
.status-listed {
    background: #e8f4ee;
    color: #19523f;
}

.status-experiment-closed {
    background: #e7edf5;
    color: #334155;
}

.status-experiment-archived,
.status-unlisted {
    background: #eef1f4;
    color: #46515f;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #53606f;
    font-size: 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 18px 0 22px;
}

.detail-item {
    border: 1px solid #e0e6ec;
    border-radius: 8px;
    padding: 13px 14px;
    background: #fbfcfd;
}

.detail-label {
    display: block;
    color: #53606f;
    font-size: 14px;
    font-weight: 700;
}

.detail-value {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.readonly-metric {
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f8fafc;
}

.readonly-metric span {
    display: block;
    color: #53606f;
    font-size: 13px;
    font-weight: 700;
}

.readonly-metric strong {
    display: block;
    margin-top: 4px;
    color: #102236;
    font-size: 22px;
}

.note-box {
    margin: 16px 0;
    border-left: 4px solid #0f6b55;
    border-radius: 6px;
    padding: 12px 14px;
    background: #edf6f2;
}

.video-box {
    margin: 18px 0;
    border: 1px solid #d7e2db;
    border-radius: 8px;
    padding: 14px 16px;
    background: #f7fbf9;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dde2e8;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid #e7ebef;
    text-align: left;
    vertical-align: top;
}

th {
    background: #eef2f5;
    font-size: 14px;
}

.message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #e8f4ee;
}

.error,
.message.error {
    background: #f8e8e8;
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    background: #edf2f7;
    font-size: 13px;
    font-weight: 700;
}

.status.open {
    background: #e8f4ee;
    color: #19523f;
}

.status.draft {
    background: #fff4dc;
    color: #705000;
}

.status.withdrawn {
    background: #f8e8e8;
    color: #7b2d2d;
}

.status.closed {
    background: #e7edf5;
    color: #334155;
}

.status.capacity_closed {
    background: #fef0d8;
    color: #744210;
}

.status.withdrawal_pending {
    background: #fff4dc;
    color: #705000;
}

.back-button {
    margin-bottom: 18px;
    background: #53606f;
}

.inline-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.cancel-request {
    margin-top: 16px;
    border: 1px solid #efd2d2;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff8f8;
}

.cancel-request summary {
    display: inline-flex;
    cursor: pointer;
    list-style: none;
}

.cancel-request summary::-webkit-details-marker {
    display: none;
}

.cancel-request form {
    margin-top: 12px;
}

.inline-form .input {
    min-width: 220px;
}

.compact-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.compact-form .input {
    min-width: 110px;
    margin: 0;
}

.compact-form select {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 14px;
}

.log-message {
    max-width: 420px;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    border: 1px solid #e0e6ec;
    border-radius: 6px;
    padding: 10px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
}

.link-button {
    appearance: none;
    border: 0;
    padding: 0;
    background: none;
    color: #0f5e9c;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-button:hover {
    color: #083f6d;
}

.mail-log-dialog {
    width: min(820px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 40px));
    border: 0;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 24px 70px rgba(16, 34, 54, 0.28);
}

.mail-log-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.mail-log-dialog-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.mail-log-dialog-close button {
    width: 36px;
    height: 36px;
    border: 1px solid #dbe3ea;
    border-radius: 999px;
    background: #ffffff;
    color: #53606f;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.mail-log-dialog-header {
    padding: 24px 64px 16px 24px;
    border-bottom: 1px solid #e5ebf1;
    background: #f8fafc;
}

.mail-log-dialog-header h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.mail-log-dialog-header p,
.mail-log-dialog-meta {
    margin: 0;
    color: #53606f;
    font-size: 13px;
    font-weight: 700;
}

.mail-log-dialog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 14px 24px 0;
}

.mail-log-body {
    margin: 0;
    padding: 18px 24px 24px;
    max-height: 520px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: #102236;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    line-height: 1.7;
}

.template-variable-grid {
    display: grid;
    grid-template-columns: minmax(180px, max-content) 1fr;
    gap: 6px 14px;
    margin-top: 8px;
}

.template-variable-grid code {
    border-radius: 4px;
    padding: 3px 6px;
    background: #ffffff;
    color: #0f4f40;
    font-weight: 800;
}

.chat-panel {
    display: grid;
    gap: 12px;
}

.chat-message {
    max-width: 76%;
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f8fafc;
}

.chat-message.mine {
    margin-left: auto;
    background: #edf6f2;
    border-color: #cfe2d9;
}

.chat-meta {
    color: #53606f;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.external-chat-link {
    color: #0f5f9f;
    font-weight: 700;
    word-break: break-all;
}

.external-key-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
}

.import-details {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.import-details summary {
    cursor: pointer;
    font-weight: 700;
}

.import-details pre {
    margin: 0.75rem 0 0;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.completion-note {
    border-color: #b7dac9;
    background: #f0faf5;
}

@media (max-width: 720px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .simple-public-topbar {
        align-items: center;
        padding: 12px 16px;
    }

    .page {
        width: min(100% - 18px, 1120px);
        margin: 14px auto;
    }

    .wide-panel {
        width: 100%;
        margin-left: 0;
    }

    .panel.public-experiment-page {
        padding: 14px;
    }

    .public-experiment-page .page-heading {
        margin-bottom: 10px;
    }

    .public-experiment-page h1 {
        font-size: 24px;
    }

    .public-summary-strip {
        gap: 6px;
    }

    .summary-item {
        padding: 5px 9px;
    }

    .form-section {
        padding: 14px;
    }

    .form-setting-row,
    .form-setting-row.custom-question-row {
        grid-template-columns: 1fr;
    }

    .compact-toggle {
        justify-content: flex-start;
    }

    .compact-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .public-reservation-layout,
    .has-selected-date .public-reservation-layout {
        grid-template-columns: 1fr;
    }

    .public-experiment-page .calendar-section {
        width: 100%;
    }

    .section-title-block p {
        font-size: 14px;
    }

    .slot-admin-menu-group {
        grid-template-columns: 1fr;
    }

    .calendar-weekday,
    .calendar-cell {
        min-height: 50px;
    }

    .calendar-weekday {
        min-height: 34px;
        padding: 6px 2px;
        font-size: 14px;
    }

    .calendar-cell {
        padding: 3px 2px;
    }

    .calendar-day {
        font-size: 14px;
    }

    .availability-mark,
    .slot-reserve-mark {
        min-width: 26px;
        min-height: 26px;
        font-size: 19px;
    }

    .day-slots {
        padding: 12px;
    }

    .copy-url-row {
        flex-direction: column;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .public-experiment-page .slot-choice-table {
        display: table;
        width: 100%;
        table-layout: fixed;
        overflow: visible;
    }

    .public-experiment-page .slot-choice-table th,
    .public-experiment-page .slot-choice-table td {
        width: auto;
    }
}


.slot-week-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 6px 0 18px;
}

.week-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    background: #ffffff;
    color: #102236;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.slot-week-title {
    min-width: 260px;
    text-align: center;
}

.slot-week-title strong {
    color: #102236;
    font-size: 18px;
    line-height: 1.25;
}

.slot-week-title span {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.slot-week-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 0 0 14px;
    color: #475569;
    font-weight: 800;
}

.slot-week-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.slot-week-legend i {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 5px;
}

.legend-open { background: #2f80ed; }
.legend-partial { background: #38bdf8; }
.legend-reserved { background: #db5aa9; }
.legend-closed { background: #f59e0b; }
.legend-cancelled { background: #5f6d7a; }
.legend-completed { background: #a8b0ba; }

.slot-week-board {
    overflow-x: auto;
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(16, 34, 54, 0.06);
}

.slot-week-times,
.slot-week-row {
    display: grid;
    grid-template-columns: 136px minmax(980px, 1fr);
}

.slot-week-day-spacer,
.slot-week-day-label {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #ffffff;
    border-right: 1px solid #d8e0e8;
}

.slot-week-time-axis {
    position: relative;
    height: 54px;
    min-width: 980px;
    border-bottom: 2px solid #d8e0e8;
}

.slot-week-axis-line,
.slot-week-grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    pointer-events: none;
}

.slot-week-axis-line.is-hour,
.slot-week-grid-line.is-hour {
    background: rgba(100, 116, 139, 0.22);
}

.slot-week-axis-line.is-half,
.slot-week-grid-line.is-half {
    background: rgba(100, 116, 139, 0.08);
}

.slot-week-time-label {
    position: absolute;
    top: 13px;
    transform: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    text-align: left;
}

.slot-week-row {
    min-height: 88px;
    border-bottom: 1px solid #e3e8ef;
}

.slot-week-row:last-child {
    border-bottom: 0;
}

.slot-week-row.is-today .slot-week-day-label {
    background: #edf6f2;
}

.slot-week-day-label {
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 10px 8px;
    color: #102236;
}

.slot-week-day-label strong {
    font-size: 20px;
    line-height: 1.2;
}

.slot-week-day-label span {
    color: #64748b;
    font-weight: 800;
}

.slot-week-lane {
    position: relative;
    min-width: 980px;
}

.slot-week-event {
    position: absolute;
    top: 16px;
    min-width: 0;
    height: 54px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    container-type: inline-size;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    padding: 7px 6px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 8px 16px rgba(16, 34, 54, 0.16);
    cursor: pointer;
}

.slot-week-event span {
    font-size: clamp(8px, 11cqw, 11px);
    font-weight: 900;
    opacity: 0.92;
}

.slot-week-event strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(10px, 15cqw, 14px);
    line-height: 1.12;
}

.slot-week-event.is-open { background: #2f80ed; }
.slot-week-event.is-partial { background: #38bdf8; }
.slot-week-event.is-reserved { background: #db5aa9; }
.slot-week-event.is-closed { background: #f59e0b; }
.slot-week-event.is-completed { background: #98a1ad; }
.slot-week-event.is-cancelled { background: #5f6d7a; }

.slot-week-event:hover,
.slot-week-event:focus {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.slot-week-modal .detail-value {
    overflow-wrap: anywhere;
}

.slot-week-modal-actions {
    gap: 10px;
}

.slot-week-modal-actions form {
    margin: 0;
}

@media (max-width: 760px) {
    .slot-week-title strong {
        font-size: 22px;
    }

    .slot-week-times,
    .slot-week-row {
        grid-template-columns: 118px minmax(840px, 1fr);
    }

    .slot-week-day-label {
        padding: 8px 6px;
    }

    .slot-week-day-label strong {
        font-size: 17px;
    }
}


.slot-week-day-label {
    justify-items: center;
    text-align: center;
}

.slot-week-day-label strong {
    font-size: 15px;
    line-height: 1.12;
    white-space: nowrap;
}

.slot-week-day-label span {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 1.1;
}

.slot-day-mail-button {
    width: 100%;
    min-height: 30px;
    margin-top: 6px;
    padding: 4px 6px;
    font-size: 12px;
    line-height: 1.2;
}

.slot-week-event span,
.slot-week-event strong {
    width: 100%;
    white-space: nowrap;
}


@container (max-width: 86px) {
    .slot-week-event span {
        letter-spacing: -0.02em;
    }

    .slot-week-event strong {
        letter-spacing: -0.01em;
    }
}


.slot-week-status-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}


.slot-week-status-form button:disabled,
.slot-week-status-form button.is-disabled {
    cursor: not-allowed;
    opacity: 0.42;
    filter: grayscale(0.25);
}

.is-disabled-panel {
    opacity: 0.54;
    filter: grayscale(0.18);
}

.is-disabled-panel input,
.is-disabled-panel select,
.is-disabled-panel textarea,
.is-disabled-panel button {
    cursor: not-allowed;
}

.list-meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.pagination-status {
    min-width: 74px;
    text-align: center;
    color: #475569;
    font-weight: 800;
}

.button.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.participant-mail-list-section {
    margin: 18px 0;
}

.participant-mail-list-section h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.participant-mail-list {
    display: grid;
    gap: 8px;
}

.participant-mail-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(170px, 1.25fr) minmax(110px, 0.9fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    background: #ffffff;
}

.participant-mail-row span,
.participant-mail-row a:not(.button) {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.participant-mail-row .participant-phone {
    color: #53606f;
    font-size: 0.9rem;
}

.compact-empty-state {
    padding: 12px;
}

.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.slot-unavailable-reason {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.experiment-mail-template-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.mail-template-card {
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    background: #ffffff;
    padding: 0;
    overflow: hidden;
}

.mail-template-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 16px 18px;
    background: #f8fafc;
    font-weight: 800;
}

.mail-template-card > summary::marker {
    color: #64748b;
}

.mail-template-card[open] > summary {
    border-bottom: 1px solid #e2e8f0;
}

.mail-template-card > :not(summary) {
    margin: 16px 18px;
}

.mail-template-card textarea {
    min-height: 180px;
}

.compact-toggle {
    margin: 12px 18px;
}

.previous-day-mail-summary {
    background: #f8fafc;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.metric-card {
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.metric-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin-top: 4px;
    color: #102236;
    font-size: 22px;
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.compact-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
    font-weight: 800;
}

.previous-day-mail-table th:first-child,
.previous-day-mail-table td:first-child {
    width: 72px;
    text-align: center;
}

.mail-preview-box {
    display: grid;
    gap: 12px;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    background: #ffffff;
    padding: 16px;
}

.mail-preview-box span {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.mail-preview-box strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.mail-preview-box pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #102236;
    font-family: inherit;
    line-height: 1.7;
}

@media (max-width: 760px) {
    .participant-mail-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .participant-mail-row .button {
        justify-content: center;
    }

    .section-heading-row {
        display: grid;
    }
}
