:root {
    --primary-purple: #653cff;
    --middle-violet: #a34deb;
    --accent-pink: #f36ca8;
    --background: #f8f7fc;
    --card: #ffffff;
    --selected-background: #f7f2ff;
    --heading: #17213b;
    --secondary-text: #5d6680;
    --border: #e0e3ef;
    --danger: #d93c70;
    --danger-soft: #fff0f6;
    --gradient-main: linear-gradient(90deg, #653cff 0%, #8642f2 45%, #a34deb 72%, #f36ca8 100%);
    --radius-main: 24px;
    --radius-sub: 16px;
    --radius-input: 10px;
    --space-section: 28px;
    --shadow-main: 0 24px 70px rgba(82, 66, 132, 0.14);
    --shadow-soft: 0 12px 34px rgba(82, 66, 132, 0.08);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--heading);
    background:
        radial-gradient(circle at 12% 0%, rgba(101, 60, 255, 0.1), transparent 32%),
        radial-gradient(circle at 100% 10%, rgba(243, 108, 168, 0.1), transparent 30%),
        var(--background);
    font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

button {
    touch-action: manipulation;
}

.app-shell {
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 16px 12px 32px;
}

.admin-layout {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 16px 12px 40px;
}

.panel,
.stat-card {
    background: var(--card);
    border: 1px solid rgba(224, 227, 239, 0.88);
    border-radius: var(--radius-main);
    box-shadow: var(--shadow-main);
}

.visitor-panel {
    padding: 30px 22px;
}

.panel {
    padding: 20px;
    margin-top: var(--space-section);
}

.topline {
    color: var(--primary-purple);
    font-family: Inter, "Noto Sans JP", sans-serif;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    color: var(--heading);
    letter-spacing: 0;
}

h1 {
    margin-top: 10px;
    font-family: Inter, "Noto Sans JP", sans-serif;
    font-size: 2.55rem;
    font-weight: 950;
    line-height: 1.05;
}

/* イベント名は長さが読めないので、1行に固定せず折り返す。
   文字の大きさは画面幅ではなくカードの幅（cqi）で決める */
.visitor-panel {
    container-type: inline-size;
}

.visitor-panel h1 {
    font-size: clamp(1.6rem, 10cqi, 2.6rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

h2 {
    position: relative;
    padding-left: 18px;
    font-size: 1.16rem;
    font-weight: 900;
    line-height: 1.2;
}

h2::before,
.form-section-title span::before,
.accent-field > span:first-child::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 28px;
    margin-right: 12px;
    border-radius: 999px;
    vertical-align: middle;
    background: var(--gradient-main);
}

h2::before {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.lead {
    margin: 18px 0 32px;
    color: var(--secondary-text);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.7;
}

.field {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    color: var(--heading);
    font-size: 0.92rem;
    font-weight: 850;
}

.visitor-name-field {
    margin-bottom: 30px;
}

.accent-field > span:first-child {
    display: flex;
    align-items: center;
    font-size: 1.16rem;
    font-weight: 900;
}

.input-shell,
.textarea-shell {
    position: relative;
    display: block;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    z-index: 1;
    color: #7d859c;
    font-size: 1.5rem;
    transform: translateY(-50%);
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    min-height: 52px;
    padding: 13px 14px;
    color: var(--heading);
    background: #fff;
    outline: none;
}

.input-shell input {
    padding-left: 58px;
    font-size: 1.05rem;
}

.field textarea {
    min-height: 108px;
    padding-bottom: 34px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: rgba(101, 60, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(101, 60, 255, 0.1);
}

.textarea-shell small {
    position: absolute;
    right: 14px;
    bottom: 10px;
    color: var(--secondary-text);
    font-size: 0.92rem;
    font-weight: 800;
}

.form-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    color: var(--heading);
    font-size: 1.16rem;
    font-weight: 950;
}

.form-section-title span {
    display: flex;
    align-items: center;
}

.form-section-title em {
    flex: 0 0 auto;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--primary-purple);
    background: #efe5ff;
    font-size: 0.88rem;
    font-style: normal;
    font-weight: 900;
}

.performer-grid {
    display: grid;
    gap: 12px;
    margin: 0 0 30px;
}

.performer-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 72px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    background: #fff;
    color: var(--heading);
    font-size: 1.22rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.performer-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkmark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    flex: 0 0 auto;
    border: 3px solid #a2a8ba;
    border-radius: 8px;
    background: #fff;
}

.checkmark::after {
    content: "✓";
    color: #fff;
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1;
    opacity: 0;
}

.performer-card:has(input:checked) {
    border-color: var(--primary-purple);
    background: var(--selected-background);
    box-shadow: 0 12px 32px rgba(101, 60, 255, 0.14);
}

.performer-card:has(input:checked) .checkmark {
    border-color: transparent;
    background: var(--gradient-main);
}

.performer-card:has(input:checked) .checkmark::after {
    opacity: 1;
}

.primary-button,
.ghost-button,
.danger-button {
    min-height: 52px;
    border-radius: 999px;
    border: 0;
    padding: 0 18px;
    font-weight: 900;
    cursor: pointer;
}

.primary-button {
    width: 100%;
    margin-top: 18px;
    color: #fff;
    background: var(--gradient-main);
    box-shadow: 0 14px 34px rgba(101, 60, 255, 0.24);
}

.submit-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    font-size: 1.35rem;
}

.submit-button span:last-child {
    position: absolute;
    right: 28px;
    font-size: 1.7rem;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary-purple);
    background: #efe5ff;
    text-decoration: none;
}

.danger-button {
    color: #fff;
    background: var(--danger);
}

.outline-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--danger);
    border: 1px solid var(--danger);
    background: #fff;
}

.outline-danger:not(:disabled):hover {
    background: var(--danger-soft);
}

.danger-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.fineprint {
    color: var(--secondary-text);
    font-size: 0.82rem;
    line-height: 1.6;
}

.error-text {
    color: var(--danger);
    font-weight: 800;
}

.admin-header,
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-header {
    margin-bottom: 20px;
}

.admin-header .ghost-button {
    align-self: flex-start;
    border-radius: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 96px;
    padding: 18px;
    border-radius: var(--radius-sub);
}

.stat-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    color: var(--primary-purple);
    background: #efe5ff;
    font-size: 1.8rem;
    font-weight: 900;
}

.stat-copy > span {
    display: block;
    color: var(--secondary-text);
    font-size: 0.9rem;
    font-weight: 850;
}

.stat-card strong {
    display: block;
    margin-top: 5px;
    font-size: 1.55rem;
    line-height: 1.1;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sub);
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

thead {
    background: #f7f6ff;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f7;
    text-align: left;
}

tr:last-child td {
    border-bottom: 0;
}

th {
    color: #5d6680;
    font-size: 0.86rem;
    font-weight: 850;
}

.money-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.history-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.history-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 10px;
}

.date-filter {
    display: grid;
    gap: 5px;
    color: var(--secondary-text);
    font-size: 0.82rem;
    font-weight: 850;
}

.date-filter input {
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    padding: 0 14px;
    background: #fff;
}

.select-all-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: var(--heading);
    font-weight: 850;
}

.select-all-row input,
.history-row input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-purple);
}

.history-day {
    display: grid;
    gap: 10px;
}

.history-day h3 {
    margin: 6px 0 0;
    font-size: 0.96rem;
    font-weight: 900;
}

.history-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    background: #fff;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 12px 16px;
}

.history-row::after {
    content: "›";
    margin-left: auto;
    color: #5a637d;
    font-size: 1.9rem;
    line-height: 1;
}

.history-item strong,
.history-item span span {
    display: inline;
}

.history-item strong {
    margin-right: 10px;
}

.history-item span span {
    color: var(--secondary-text);
    font-size: 0.84rem;
}

.toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    max-width: min(420px, calc(100vw - 32px));
    padding: 13px 15px;
    border-radius: 14px;
    color: #fff;
    background: var(--heading);
    box-shadow: var(--shadow-main);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(23, 33, 59, 0.18);
    backdrop-filter: blur(4px);
}

.confirm-modal {
    position: relative;
    width: min(100%, 360px);
    padding: 38px 22px 22px;
    border-radius: var(--radius-sub);
    background: #fff;
    box-shadow: 0 28px 80px rgba(66, 53, 111, 0.22);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    color: #5a637d;
    background: transparent;
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 999px;
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 1.8rem;
    font-weight: 900;
}

.confirm-modal h2 {
    padding: 0;
    font-size: 1.16rem;
}

.confirm-modal h2::before {
    display: none;
}

.confirm-modal p {
    margin: 8px 0 24px;
    color: var(--secondary-text);
    font-weight: 700;
}

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

.modal-cancel,
.modal-delete {
    min-height: 52px;
}

.modal-cancel {
    color: var(--heading);
    background: #f1f3fa;
}

.modal-delete {
    color: var(--danger);
    background: #ffd4e5;
}

@media (min-width: 640px) {
    .app-shell {
        padding-top: 36px;
    }

    .visitor-panel {
        padding: 42px;
    }

    .admin-layout {
        padding-top: 30px;
    }

    .stats-grid,
    .money-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-actions {
        grid-template-columns: 1fr auto;
    }
}

@media (min-width: 760px) {
    .app-shell {
        width: min(100%, 760px);
    }

    .visitor-panel {
        max-width: 640px;
        margin: 0 auto;
    }


    .lead {
        font-size: 1.18rem;
    }

    .panel {
        padding: 22px;
    }
}

@media (max-width: 560px) {
    .admin-header,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .form-section-title {
        align-items: flex-start;
        flex-direction: column;
    }


    .lead {
        font-size: 0.96rem;
    }
}

/* ---- Design alignment (mock: ENTRANCE CHECK / 収益分配) ---- */
svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

h1 {
    font-family: "Noto Sans JP", system-ui, sans-serif;
    font-weight: 900;
    letter-spacing: -0.01em;
}

/* Visitor */
.lead {
    font-weight: 400;
}

.accent-field > span:first-child,
.form-section-title {
    font-weight: 600;
}

.form-section-title span::before,
.accent-field > span:first-child::before {
    width: 5px;
    height: 26px;
    margin-right: 14px;
}

.input-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
}

.input-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.6;
}

.field input,
.field textarea {
    font-weight: 400;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #868ea5;
}

.form-section-title {
    flex-direction: row;
    align-items: center;
}

.form-section-title em {
    font-weight: 700;
}

.performer-card {
    font-weight: 600;
    box-shadow: none;
}

.checkmark {
    border-width: 2px;
    background-origin: border-box;
}

.checkmark::after {
    content: "";
    width: 8px;
    height: 15px;
    margin-top: -3px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.form-section-title span {
    white-space: nowrap;
}

.performer-card:has(input:checked) {
    border-color: transparent;
    background:
        linear-gradient(90deg, #f6f1ff, #fbf3fb) padding-box,
        var(--gradient-main) border-box;
    box-shadow: 0 10px 28px rgba(101, 60, 255, 0.1);
}

.textarea-shell small {
    font-weight: 500;
}

.submit-button {
    font-weight: 500;
    letter-spacing: 0.04em;
}

.submit-arrow {
    position: absolute;
    right: 28px;
    width: 28px;
    height: 28px;
    stroke-width: 1.8;
}

/* Admin: one outer card holding everything */
.admin-card {
    padding: 20px 14px 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(224, 227, 239, 0.7);
    border-radius: var(--radius-main);
    box-shadow: var(--shadow-main);
}

.admin-layout .admin-header {
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 18px;
}

.admin-header h1 {
    margin-top: 6px;
    font-size: 2.3rem;
}

.admin-header .ghost-button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
}

.stat-card {
    min-height: 90px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: none;
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-copy > span {
    font-size: 0.86rem;
    font-weight: 500;
}

.stat-card strong {
    font-size: 1.7rem;
    font-weight: 800;
}

.admin-card .panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(224, 227, 239, 0.7);
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(82, 66, 132, 0.06);
}

.admin-card h2 {
    font-size: 1.12rem;
    font-weight: 800;
}

.admin-card h2::before {
    height: 26px;
}

.admin-layout .section-heading {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.icon-button,
.admin-card .outline-danger {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
}

.icon-button {
    min-height: 36px;
}

.table-wrap {
    margin-top: 14px;
    border-radius: 10px;
}

table {
    min-width: 0;
}

th {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

td {
    font-size: 0.9rem;
}

th,
td {
    padding: 12px 16px;
}

.admin-card .field {
    gap: 6px;
    margin-top: 12px;
    color: #5d6680;
    font-size: 0.82rem;
    font-weight: 500;
}

.admin-card .field input,
.admin-card .field textarea {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.admin-card .field textarea {
    min-height: 84px;
    padding-bottom: 8px;
    line-height: 1.5;
}

.admin-card .money-grid {
    gap: 0 14px;
}

.admin-card .settings-form .primary-button {
    min-height: 44px;
    margin-top: 14px;
    font-weight: 600;
}

/* History */
.history-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.date-filter input {
    min-height: 40px;
    border-radius: 8px;
}

.select-all-row {
    margin-top: 14px;
    font-weight: 600;
}

.select-all-row input,
.history-row input {
    width: 20px;
    height: 20px;
}

.history-day h3 {
    font-size: 0.88rem;
    font-weight: 600;
}

.history-row {
    min-height: 48px;
    padding: 10px 16px;
}

.history-item strong {
    font-weight: 500;
}

/* Delete confirm */
.modal-icon svg {
    width: 26px;
    height: 26px;
}

.confirm-modal h2 {
    font-weight: 800;
}

.confirm-modal p {
    margin: 6px 0 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-cancel,
.modal-delete {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 700;
}

/* Wide screens: show the confirm as a popover next to the button that opened it */
.modal-backdrop.is-anchored {
    display: block;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
}

.modal-backdrop.is-anchored .confirm-modal {
    position: absolute;
    width: 300px;
    border: 1px solid var(--border);
}

@media (min-width: 640px) {
    .admin-card {
        padding: 28px;
    }

    .admin-header h1 {
        font-size: 2.6rem;
    }

    .history-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 400px) {
    .form-section-title,
    .accent-field > span:first-child {
        font-size: 1.04rem;
    }

    .form-section-title em {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 560px) {
    .admin-header h1 {
        font-size: 2rem;
    }

    .stat-card {
        gap: 10px;
        min-height: 76px;
        padding: 12px;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .stat-copy > span {
        font-size: 0.76rem;
    }

    .stat-card strong {
        font-size: 1.12rem;
    }

    .admin-card {
        padding: 18px 12px 20px;
    }

    .admin-card .panel {
        padding: 16px 14px;
    }

    .admin-layout .section-heading {
        flex-wrap: nowrap;
    }

    .admin-card h2 {
        white-space: nowrap;
    }

    .admin-layout .section-heading:has(.history-actions) {
        flex-wrap: wrap;
    }

    .history-actions {
        width: 100%;
        flex-wrap: nowrap;
    }

    .date-filter {
        flex: 1;
        white-space: nowrap;
    }

    .date-filter input {
        flex: 1;
        min-width: 0;
    }

    .icon-button,
    .admin-card .outline-danger {
        padding: 0 10px;
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 10px 8px;
    }

    th:first-child,
    td:first-child {
        padding-left: 12px;
    }
}

/* ---- Refined tone: lighter weights, hairlines, softer depth (colors unchanged) ---- */
svg {
    stroke-width: 1.5;
}

body {
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "palt";
}

.panel,
.stat-card {
    border-color: rgba(224, 227, 239, 0.6);
}

.visitor-panel {
    box-shadow: 0 18px 50px rgba(82, 66, 132, 0.08);
}

.topline {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.24em;
}

h1 {
    font-weight: 700;
    letter-spacing: 0.01em;
}


.lead {
    margin: 12px 0 28px;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* Section labels */
.accent-field > span:first-child,
.form-section-title {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.form-section-title span::before,
.accent-field > span:first-child::before,
h2::before {
    width: 3px;
    height: 16px;
    margin-right: 10px;
}

.form-section-title em {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
}

/* Inputs */
.field input,
.field textarea {
    min-height: 48px;
    border-color: #e6e8f1;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-shell input {
    padding-left: 48px;
    font-size: 0.95rem;
}

.input-icon {
    left: 14px;
}

.input-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.4;
}

.field input:focus,
.field textarea:focus {
    border-color: rgba(101, 60, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(101, 60, 255, 0.06);
}

.textarea-shell small {
    font-size: 0.75rem;
    font-weight: 400;
}

/* Performer choices */
.performer-grid {
    gap: 8px;
}

.performer-card {
    gap: 14px;
    min-height: 56px;
    padding: 12px 16px;
    border-color: #e6e8f1;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.checkmark {
    width: 22px;
    height: 22px;
    border-width: 1.5px;
    border-color: #c3c8d6;
    border-radius: 6px;
}

.checkmark::after {
    width: 5px;
    height: 10px;
    margin-top: -2px;
    border-width: 0 2px 2px 0;
}

.performer-card:has(input:checked) {
    box-shadow: 0 6px 18px rgba(101, 60, 255, 0.07);
}

/* Buttons */
.primary-button {
    font-weight: 500;
    letter-spacing: 0.08em;
    box-shadow: 0 8px 22px rgba(101, 60, 255, 0.16);
}

.submit-button {
    min-height: 52px;
    font-size: 1rem;
    font-weight: 500;
}

.submit-arrow {
    right: 22px;
    width: 20px;
    height: 20px;
}

.ghost-button,
.danger-button {
    font-weight: 500;
}

/* Admin */
.admin-card {
    box-shadow: 0 18px 50px rgba(82, 66, 132, 0.08);
}

.admin-header h1 {
    font-size: 1.9rem;
}

.admin-header .ghost-button,
.icon-button,
.admin-card .outline-danger {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
}

.btn-icon {
    width: 15px;
    height: 15px;
}

.stat-card {
    min-height: 76px;
    padding: 14px 16px;
    border-radius: 12px;
}

.stat-icon {
    width: 40px;
    height: 40px;
}

.stat-icon svg {
    width: 19px;
    height: 19px;
}

.stat-copy > span {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.stat-card strong {
    margin-top: 3px;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.admin-card .panel {
    border-color: rgba(224, 227, 239, 0.6);
    box-shadow: 0 4px 16px rgba(82, 66, 132, 0.04);
}

.admin-card h2 {
    padding-left: 13px;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.table-wrap {
    border-color: #eceef5;
}

th {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

td {
    font-size: 0.85rem;
}

.admin-card .field {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.admin-card .field input,
.admin-card .field textarea {
    min-height: 38px;
    font-size: 0.86rem;
}

.admin-card .settings-form .primary-button {
    min-height: 40px;
    font-size: 0.86rem;
    font-weight: 500;
}

.date-filter {
    font-size: 0.75rem;
    font-weight: 400;
}

.date-filter input {
    min-height: 34px;
    font-size: 0.8rem;
}

.select-all-row {
    font-size: 0.85rem;
    font-weight: 400;
}

.select-all-row input,
.history-row input {
    width: 16px;
    height: 16px;
}

.history-day h3 {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--secondary-text);
    letter-spacing: 0.04em;
}

.history-list,
.history-day {
    gap: 6px;
}

.history-item {
    border-color: #eceef5;
}

.history-row {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.86rem;
}

.history-row::after {
    font-size: 1.3rem;
    font-weight: 300;
}

.history-item strong {
    font-weight: 400;
}

.history-item span span {
    font-size: 0.75rem;
}

/* Delete confirm */
.confirm-modal {
    padding: 30px 18px 18px;
    box-shadow: 0 16px 48px rgba(66, 53, 111, 0.14);
}

.modal-close {
    font-size: 1.3rem;
    font-weight: 300;
}

.modal-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
}

.modal-icon svg {
    width: 20px;
    height: 20px;
}

.confirm-modal h2 {
    font-size: 1rem;
    font-weight: 600;
}

.confirm-modal p {
    font-size: 0.8rem;
    font-weight: 400;
}

.modal-cancel,
.modal-delete {
    min-height: 40px;
    font-size: 0.86rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .admin-header h1 {
        font-size: 2.1rem;
    }
}

@media (max-width: 560px) {
    .stat-card {
        min-height: 66px;
        padding: 10px 12px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
    }

    .stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .stat-copy > span {
        font-size: 0.75rem;
    }

    .stat-card strong {
        font-size: 1.05rem;
    }
}

/* Thinner headings */
h1 {
    font-weight: 500;
    letter-spacing: 0.02em;
}

.admin-card h2,
.confirm-modal h2 {
    font-weight: 500;
}

.accent-field > span:first-child,
.form-section-title,
.performer-card,
.history-day h3 {
    font-weight: 400;
}

.stat-card strong {
    font-weight: 500;
}

.primary-button,
.submit-button,
.ghost-button,
.danger-button,
.form-section-title em {
    font-weight: 400;
}

.topline {
    font-weight: 500;
}

.admin-card h2::before {
    width: 3px;
    height: 16px;
}

/* Checkbox: two-tone gradient so the pink end doesn't read as a stripe */
.performer-card:has(input:checked) .checkmark {
    background: linear-gradient(135deg, var(--primary-purple), var(--middle-violet));
}

/* 入場料の内訳チェック */
.split-check {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #e6e8f1;
    border-radius: 8px;
    background: #faf9fe;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.split-formula {
    color: var(--secondary-text);
}

.split-status {
    color: var(--primary-purple);
}

.split-check.is-error {
    border-color: rgba(217, 60, 112, 0.35);
    background: var(--danger-soft);
}

.split-check.is-error .split-status {
    color: var(--danger);
}

.split-fix {
    justify-self: start;
    margin-top: 4px;
    padding: 5px 10px;
    border: 1px solid rgba(217, 60, 112, 0.4);
    border-radius: 6px;
    color: var(--danger);
    background: #fff;
    font-size: 0.75rem;
    cursor: pointer;
}

.admin-card .field input.is-invalid {
    border-color: rgba(217, 60, 112, 0.45);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.split-formula-note {
    margin: 10px 2px 0;
    color: var(--secondary-text);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-align: left;
}

/* ---- Cloudflare 版で増えた部品 ---- */
.auth-form {
    display: grid;
    gap: 4px;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.segmented label {
    position: relative;
    cursor: pointer;
}

.segmented input {
    position: absolute;
    opacity: 0;
}

.segmented span {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid #e6e8f1;
    border-radius: var(--radius-input);
    color: var(--heading);
    background: #fff;
    font-weight: 400;
}

.segmented input:checked + span {
    border-color: rgba(101, 60, 255, 0.5);
    color: var(--primary-purple);
    background: var(--selected-background);
}

.segmented input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(101, 60, 255, 0.12);
}

.event-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}

.event-select {
    display: grid;
    flex: 1;
    gap: 6px;
    min-width: 0;
    color: #5d6680;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.event-select select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #e6e8f1;
    border-radius: 8px;
    color: var(--heading);
    background: #fff;
    font: inherit;
    font-size: 0.9rem;
}

.event-bar .icon-button {
    min-height: 40px;
}

.empty-state p {
    margin: 0;
    color: var(--secondary-text);
    font-size: 0.86rem;
}

.share-box {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
}

.qr {
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
    padding: 8px;
    border: 1px solid #eceef5;
    border-radius: 10px;
    background: #fff;
}

.qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.qr svg path {
    stroke: none;
}

.share-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.share-url {
    overflow-wrap: anywhere;
    color: var(--primary-purple);
    font-size: 0.86rem;
    text-decoration: none;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-copy .fineprint {
    margin: 0;
    font-size: 0.75rem;
}

.slot-list {
    display: grid;
    gap: 6px;
}

.slot-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.slot-row .slot-label {
    flex: 1;
    min-width: 0;
}

.slot-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    color: var(--secondary-text);
    background: transparent;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.slot-icon:hover {
    color: var(--primary-purple);
    background: var(--selected-background);
}

.slot-remove:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.slot-add {
    justify-self: start;
    margin-top: 4px;
}

.text-danger-button {
    display: block;
    margin: 14px auto 0;
    padding: 6px 10px;
    border: 0;
    color: var(--danger);
    background: transparent;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    opacity: 0.8;
}

.text-danger-button:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 560px) {
    .share-box {
        align-items: flex-start;
    }

    .qr {
        width: 92px;
        height: 92px;
    }
}

.auth-form .field {
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* 目当てなし（フリー）: 出演者リストの一番上に置く */
.free-card {
    margin-bottom: 8px;
    border-style: dashed;
    color: var(--secondary-text);
}

.free-card:has(input:checked) {
    color: var(--heading);
}

.stat-note-muted {
    color: var(--secondary-text);
}

.free-row td {
    color: var(--secondary-text);
    background: #faf9fe;
}

/* ---- ヘルプ・法的ページ：管理画面と同じ admin-card + panel で組む ---- */
.legal-page {
    font-size: 0.88rem;
    line-height: 1.85;
    letter-spacing: 0.02em;
}

.legal-page .panel > h2 + * {
    margin-top: 12px;
}

.legal-page h3 {
    margin: 14px 0 4px;
    color: var(--secondary-text);
    font-size: 0.82rem;
    font-weight: 500;
}

.legal-page p,
.legal-page ul,
.legal-page ol {
    margin: 6px 0;
}

.legal-page ul,
.legal-page ol {
    padding-left: 1.4em;
}

.legal-page a:not(.ghost-button) {
    color: var(--primary-purple);
}

.legal-lead {
    margin: 0;
    color: var(--secondary-text);
}

.legal-table {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
}

.legal-table dt {
    padding: 12px 0 2px;
    color: var(--secondary-text);
    font-size: 0.78rem;
}

.legal-table dd {
    margin: 0;
    padding: 0 0 12px;
    border-bottom: 1px solid #eceef5;
}

.legal-table dd:last-child {
    border-bottom: 0;
}

.legal-table dd ul {
    margin: 0;
}

.legal-table small {
    color: var(--secondary-text);
    font-size: 0.76rem;
}

.legal-page .todo {
    color: var(--danger);
}

.legal-date {
    margin-top: 18px !important;
    color: var(--secondary-text);
    font-size: 0.78rem;
    text-align: right;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    font-size: 0.75rem;
}

.site-footer a {
    color: var(--secondary-text);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--primary-purple);
}

@media (min-width: 640px) {
    .legal-table {
        grid-template-columns: 200px 1fr;
    }

    .legal-table dt {
        padding: 14px 16px 14px 0;
        border-bottom: 1px solid #eceef5;
    }

    .legal-table dd {
        padding: 14px 0;
    }

    .legal-table dt:nth-last-of-type(1) {
        border-bottom: 0;
    }
}

.visitor-notice {
    margin: 14px 0 0;
    color: var(--secondary-text);
    font-size: 0.75rem;
    line-height: 1.7;
    text-align: center;
}

.visitor-notice a {
    color: inherit;
}


.site-footer {
    margin: 0 auto;
    padding: 0 16px 32px;
}

/* ヘルプ */
.faq dt {
    margin-top: 16px;
    font-weight: 500;
}

.faq dt::before {
    content: "Q. ";
    color: var(--primary-purple);
}

.faq dd {
    margin: 4px 0 0;
    color: #4a5370;
}

/* アカウント欄 */
.account-info {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 6px 12px;
    margin: 14px 0 0;
    font-size: 0.86rem;
}

.account-info dt {
    color: var(--secondary-text);
    font-size: 0.78rem;
}

.account-info dd {
    margin: 0;
}

.account-panel .text-danger-button {
    margin: 18px 0 0;
    padding: 6px 0;
}

.legal-page .legal-lead {
    margin-bottom: 4px;
}

/* ---- 共通ヘッダー ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(224, 227, 239, 0.7);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(100%, 920px);
    min-height: 52px;
    margin: 0 auto;
    padding: 0 16px;
}

.brand {
    color: var(--primary-purple);
    font-family: Inter, "Noto Sans JP", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    gap: 2px;
}

.site-nav a {
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--secondary-text);
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--primary-purple);
}

.site-nav a[aria-current="page"] {
    color: var(--primary-purple);
    background: var(--selected-background);
}

.account-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.account-actions .text-danger-button {
    margin: 0;
}

@media (max-width: 400px) {
    .brand {
        letter-spacing: 0.14em;
    }

    .site-nav a {
        padding: 6px 7px;
        font-size: 0.76rem;
    }
}

/* ---- 退会ページ ---- */
.withdraw-panel {
    text-align: center;
}

.withdraw-panel .modal-icon {
    margin-top: 8px;
}

.admin-card .withdraw-title {
    padding: 0;
    font-size: 1.1rem;
}

.admin-card .withdraw-title::before {
    display: none;
}

.withdraw-message {
    margin: 10px 0 0;
    color: var(--heading);
    font-size: 0.92rem;
}

.withdraw-notes {
    max-width: 460px;
    margin: 18px auto 0;
    padding: 12px 16px 12px 32px;
    border-radius: 10px;
    color: var(--secondary-text);
    background: #faf9fe;
    font-size: 0.8rem;
    line-height: 1.8;
    text-align: left;
}

.withdraw-agree {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 0.86rem;
    cursor: pointer;
}

.withdraw-agree input {
    width: 16px;
    height: 16px;
    accent-color: var(--danger);
}

.withdraw-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 360px;
    margin: 18px auto 6px;
}

.withdraw-actions .ghost-button,
.withdraw-actions .danger-button {
    min-height: 44px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.withdraw-actions .ghost-button {
    color: var(--heading);
    background: #f1f3fa;
}

.withdraw-actions .danger-button:disabled {
    opacity: 0.4;
}

/* ---- 開催時間（日付をまたぐ場合は翌日表示） ---- */
.time-range > span small {
    display: block;
    margin-top: 2px;
    color: var(--primary-purple);
    font-size: 0.75rem;
}

.time-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-range-inputs input {
    flex: 1;
    min-width: 0;
}

.time-range-inputs > span {
    color: var(--secondary-text);
}

.money-grid .time-range {
    grid-column: 1 / -1;
}

/* ---- ヘッダー：ログアウトとスマホのメニュー ---- */
.site-header-inner {
    position: relative;
}

.menu-toggle {
    display: none;
}

@media (max-width: 560px) {
    .menu-toggle {
        display: grid;
        gap: 4px;
        width: 40px;
        height: 40px;
        padding: 12px 10px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        height: 1.5px;
        border-radius: 1px;
        background: var(--heading);
        transition: transform 0.2s, opacity 0.2s;
    }

    .site-header.is-open .menu-toggle span:nth-child(1) {
        transform: translateY(5.5px) rotate(45deg);
    }

    .site-header.is-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.is-open .menu-toggle span:nth-child(3) {
        transform: translateY(-5.5px) rotate(-45deg);
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 6px 12px 12px;
        border-bottom: 1px solid rgba(224, 227, 239, 0.7);
        background: #fff;
        box-shadow: 0 12px 24px rgba(82, 66, 132, 0.08);
    }

    .site-header.is-open .site-nav {
        display: flex;
    }

    .site-nav a {
        padding: 12px 10px;
        font-size: 0.9rem;
        text-align: left;
    }
}

/* ---- 利用期間・プラン ---- */
.plan-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(217, 60, 112, 0.25);
    border-radius: 12px;
    background: var(--danger-soft);
}

.plan-banner p {
    margin: 0;
    color: var(--danger);
    font-size: 0.8rem;
    line-height: 1.7;
}

.plan-banner .ghost-button {
    flex: 0 0 auto;
}

#newEventButton:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.plan-info dd {
    line-height: 1.7;
}

.plan-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0 10px;
}

.plan-option {
    display: grid;
    gap: 2px;
    padding: 12px;
    border: 1px solid #e6e8f1;
    border-radius: 10px;
    text-align: center;
}

.plan-option strong {
    font-size: 0.82rem;
    font-weight: 500;
}

.plan-option span {
    color: var(--primary-purple);
    font-size: 1.1rem;
    font-weight: 600;
}

.plan-option small {
    color: var(--secondary-text);
    font-size: 0.75rem;
}

@media (max-width: 560px) {
    .plan-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ---- 受付モード（運営の端末でタップして即記録） ---- */
.entrance-launch {
    display: grid;
    gap: 2px;
    margin: 0 0 14px;
    padding: 12px 18px;
    text-align: center;
    text-decoration: none;
}

.entrance-launch span {
    font-size: 1rem;
}

.entrance-launch small {
    opacity: 0.8;
    font-size: 0.75rem;
}

.entrance-body {
    min-height: 100dvh;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
}

.entrance-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(224, 227, 239, 0.7);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
}

.entrance-back {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 10px;
    color: var(--secondary-text);
    font-size: 1.2rem;
    text-decoration: none;
}

.entrance-title {
    display: grid;
    flex: 1;
    min-width: 0;
}

.entrance-label {
    color: var(--primary-purple);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.entrance-title strong {
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entrance-count {
    display: grid;
    justify-items: end;
    color: var(--secondary-text);
    font-size: 0.75rem;
}

.entrance-count strong {
    color: var(--heading);
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.1;
}

.entrance-main {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 14px 16px 0;
}

.entrance-hint {
    margin: 0 0 12px;
    color: var(--secondary-text);
    font-size: 0.8rem;
    text-align: center;
}

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

.entrance-choice {
    min-height: 84px;
    padding: 12px;
    border: 1.5px solid #e6e8f1;
    border-radius: 16px;
    color: var(--heading);
    background: #fff;
    font: inherit;
    font-size: 1.15rem;
    overflow-wrap: anywhere;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.12s, background 0.12s, transform 0.08s;
}

.entrance-choice:active {
    transform: scale(0.98);
}

.entrance-choice[aria-pressed="true"] {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    background: var(--selected-background);
    box-shadow: 0 6px 18px rgba(101, 60, 255, 0.12);
}

.entrance-choice.is-free {
    grid-column: 1 / -1;
    min-height: 60px;
    border-style: dashed;
    color: var(--secondary-text);
    font-size: 1rem;
}

.entrance-choice.is-free[aria-pressed="true"] {
    color: var(--primary-purple);
}

.entrance-message {
    width: min(100% - 32px, 560px);
    margin: 40px auto;
    color: var(--secondary-text);
    text-align: center;
}

.entrance-action {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(224, 227, 239, 0.7);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.entrance-selection {
    width: min(100%, 888px);
    margin: 0 auto 8px;
    overflow: hidden;
    color: var(--heading);
    font-size: 1rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entrance-record {
    display: block;
    width: min(100%, 888px);
    min-height: 60px;
    margin: 0 auto;
    font-size: 1.15rem;
}

.entrance-record:disabled {
    cursor: not-allowed;
    opacity: 0.35;
    box-shadow: none;
}

.entrance-done {
    position: fixed;
    top: 72px;
    left: 50%;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px 12px 18px;
    border-radius: 14px;
    color: #fff;
    background: var(--heading);
    box-shadow: var(--shadow-main);
    font-size: 0.95rem;
    transform: translateX(-50%);
    white-space: nowrap;
}

.entrance-done button {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

@media (min-width: 640px) {
    .entrance-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .entrance-choice {
        min-height: 104px;
        font-size: 1.3rem;
    }
}

@media (min-width: 900px) {
    .entrance-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.entrance-hint strong {
    display: table;
    margin: 0 auto 6px;
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--primary-purple);
    background: #efe5ff;
    font-weight: 500;
}

/* 「演者は複数選択できます」が入りきらない幅では、見出しの下の行に回す */
.form-section-title {
    flex-wrap: wrap;
    row-gap: 8px;
}

/* スマホではイベントのプルダウンを1行使い、「新規イベント」は下の行に落とす */
@media (max-width: 560px) {
    .event-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .event-bar .icon-button {
        width: 100%;
    }
}

/* ---- 受付共有 ---- */
.share-reset {
    justify-self: start;
    margin: 4px 0 0;
    padding: 4px 0;
    font-size: 0.75rem;
}

.operator-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    color: var(--secondary-text);
    background: #f1f3fa;
    font-size: 0.75rem;
    font-style: normal;
    vertical-align: 1px;
}

.operator-counts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}

.operator-counts:empty {
    display: none;
}

.operator-counts-label {
    margin-right: 4px;
    color: var(--secondary-text);
    font-size: 0.75rem;
}

.operator-chip {
    padding: 3px 10px;
    border: 1px solid #e6e8f1;
    border-radius: 999px;
    font-size: 0.78rem;
}

.operator-chip strong {
    margin-left: 2px;
    color: var(--primary-purple);
    font-weight: 600;
}

.entrance-operator {
    justify-self: start;
    margin-top: 2px;
    padding: 0;
    border: 0;
    color: var(--secondary-text);
    background: transparent;
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.entrance-operator-form {
    width: min(100% - 32px, 480px);
    margin: 24px auto;
}

.entrance-operator-form .panel {
    margin: 0;
    padding: 22px;
}

.entrance-operator-form h2 {
    font-size: 1.05rem;
    font-weight: 500;
}

.entrance-operator-form .fineprint {
    margin: 10px 0 0;
}

.entrance-operator-form .field {
    font-size: 0.82rem;
    font-weight: 400;
}

/* ---- ブランド：GATE LABO / ENTRANCE MANAGEMENT（スマホはブランド名だけ） ---- */
.brand {
    display: grid;
    gap: 1px;
    line-height: 1.2;
}

.brand-name {
    font-size: 0.86rem;
    letter-spacing: 0.2em;
}

.brand-tagline {
    color: var(--secondary-text);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.24em;
}

@media (max-width: 560px) {
    .brand-tagline {
        display: none;
    }
}

/* ---- フッター：ブランド名・リンク・著作権表示 ---- */
.site-footer {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin: 8px auto 0;
    padding: 8px 16px 36px;
    text-align: center;
}

.footer-brand {
    display: grid;
    gap: 2px;
}

.footer-brand strong {
    color: var(--heading);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.footer-brand span {
    color: var(--secondary-text);
    font-size: 0.625rem;
    letter-spacing: 0.24em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    font-size: 0.75rem;
}

.footer-links a {
    color: var(--secondary-text);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary-purple);
}

.footer-copy {
    color: var(--secondary-text);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

/* ---- 送信履歴：入場時間で追えるよう、時刻を左に大きく出す ---- */
.entry-time {
    display: grid;
    flex: 0 0 auto;
    width: 3.4em;
    line-height: 1.15;
    color: var(--heading);
    font-family: Inter, "Noto Sans JP", sans-serif;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.entry-body {
    min-width: 0;
}

.entry-time small {
    color: var(--secondary-text);
    font-size: 0.75rem;
    font-weight: 400;
}

.entry-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

.entry-body .operator-tag {
    margin-left: 0;
}

/* ---- ヘルプ ---- */
.help-page .legal-lead + .legal-lead {
    margin-top: 4px;
}

.help-step {
    margin-top: 22px !important;
    color: var(--heading) !important;
    font-size: 0.92rem !important;
}

.help-page .panel > h3:first-of-type {
    margin-top: 12px;
}

.help-table {
    width: 100%;
    min-width: 0;
    margin: 10px 0;
    border: 1px solid #eceef5;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 0.84rem;
}

.help-table th,
.help-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #eceef5;
}

.help-table tr:last-child td {
    border-bottom: 0;
}

.help-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.help-table .total td {
    font-weight: 600;
    background: #faf9fe;
}

.help-note {
    color: var(--secondary-text);
    font-size: 0.78rem;
}

.faq dd p {
    margin: 4px 0;
}

/* 表の中の段落と箇条書きは詰めて並べる */
.legal-table dd p {
    margin: 0 0 4px;
}

.legal-table dd p:last-child {
    margin-bottom: 0;
}

/* ---- LINE ログインと登録 ---- */
.line-login {
    display: grid;
    gap: 12px;
}

.line-button {
    display: grid;
    min-height: 52px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #06c755;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(6, 199, 85, 0.2);
}

.line-button:hover {
    background: #05b34c;
}

.line-login .fineprint {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.7;
}

.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.84rem;
    line-height: 1.6;
}

.agree-row input {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--primary-purple);
}

.agree-row a {
    color: var(--primary-purple);
}

/* 見出しの右に並べるボタン（CSV・更新） */
.heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---- マスター管理画面 ---- */
.master-actor {
    color: var(--secondary-text);
    font-size: 0.75rem;
}

.master-layout {
    width: min(100%, 1100px);
}

.master-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.master-tab {
    padding: 8px 16px;
    border: 1px solid #e6e8f1;
    border-radius: 999px;
    color: var(--secondary-text);
    background: #fff;
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
}

.master-tab[aria-selected="true"] {
    border-color: transparent;
    color: var(--primary-purple);
    background: var(--selected-background);
}

.master-filters {
    display: grid;
    grid-template-columns: 1fr 200px auto;
    align-items: end;
    gap: 10px;
}

.master-filters .field {
    margin-top: 0;
}

.master-filters select,
.master-action select {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #e6e8f1;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 0.86rem;
}

.master-filters .icon-button {
    min-height: 38px;
}

.master-count {
    margin: 12px 0 0;
}

.master-table td small {
    display: block;
    color: var(--secondary-text);
    font-size: 0.75rem;
}

.master-row {
    cursor: pointer;
}

.master-row:hover td,
.master-row:focus td {
    background: #faf9fe;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    vertical-align: 2px;
}

.status-badge.is-trial {
    color: #2563eb;
    background: #e8f0fe;
}

.status-badge.is-active {
    color: #15803d;
    background: #e6f6ec;
}

.status-badge.is-expired {
    color: #a16207;
    background: #fdf3e1;
}

.status-badge.is-suspended {
    color: var(--danger);
    background: var(--danger-soft);
}

.status-badge.is-withdrawn {
    color: var(--secondary-text);
    background: #f1f3fa;
}

.master-info {
    grid-template-columns: 130px 1fr;
}

.master-actions {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.master-action {
    padding: 14px 16px;
    border: 1px solid #eceef5;
    border-radius: 12px;
    background: #fcfcfe;
}

.master-action h3,
.master-subhead {
    margin: 0 0 10px;
    font-size: 0.88rem;
    font-weight: 500;
}

.master-subhead {
    margin-top: 22px;
}

.master-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.master-action-row input {
    flex: 1;
    min-width: 200px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #e6e8f1;
    border-radius: 8px;
    font: inherit;
    font-size: 0.86rem;
}

.master-action .primary-button,
.master-action .danger-button {
    width: auto;
    min-height: 38px;
    margin: 0;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 0.84rem;
}

.master-log-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.master-log-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 10px 14px;
    border: 1px solid #eceef5;
    border-radius: 10px;
    font-size: 0.82rem;
}

.master-log-list time {
    color: var(--secondary-text);
    font-variant-numeric: tabular-nums;
}

.master-log-list small {
    margin-left: auto;
    color: var(--secondary-text);
}

@media (max-width: 640px) {
    .master-filters {
        grid-template-columns: 1fr;
    }

    .master-info {
        grid-template-columns: 96px 1fr;
    }
}

/* プランを選ぶカード（購入確認画面へ） */
a.plan-option {
    color: var(--heading);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

a.plan-option:hover {
    border-color: rgba(101, 60, 255, 0.45);
    background: var(--selected-background);
}

/* 購入確認画面 */
.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    margin-top: 16px;
}

.confirm-actions .ghost-button,
.confirm-actions .primary-button {
    min-height: 48px;
    margin: 0;
}

.confirm-actions .primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    box-shadow: none;
}

.confirm-note {
    margin-top: 10px;
    text-align: center;
}

/* お知らせ・エラーの文字は太くしすぎない */
.error-text {
    margin: 14px 0 0;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.7;
}

/* ---- トップページ（サービス紹介） ---- */
.lp-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-nav a {
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--secondary-text);
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
}

.lp-nav .lp-nav-login {
    color: var(--primary-purple);
    background: var(--selected-background);
}

.lp-inner {
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 0 20px;
}

.lp-hero {
    padding: 72px 0 64px;
    text-align: center;
}

.lp-eyebrow {
    margin: 0 0 14px;
    color: var(--primary-purple);
    font-family: Inter, "Noto Sans JP", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3em;
}

.lp-hero h1 {
    max-width: 760px;
    margin: 0 auto;
    font-size: clamp(1.8rem, 5vw, 2.9rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.lp-lead {
    margin: 20px auto 0;
    max-width: 620px;
    color: var(--secondary-text);
    font-size: 1rem;
    line-height: 1.9;
}

.lp-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.lp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 220px;
    min-height: 54px;
    margin: 0;
    padding: 0 28px;
    font-size: 1rem;
    text-decoration: none;
}

.lp-note {
    margin: 16px auto 0;
    max-width: 640px;
    color: var(--secondary-text);
    font-size: 0.78rem;
    line-height: 1.8;
    text-align: center;
}

.lp-note a {
    color: var(--primary-purple);
}

.lp-section {
    padding: 64px 0;
}

.lp-section-tint {
    background: rgba(255, 255, 255, 0.55);
}

.lp-heading {
    padding: 0;
    margin: 0 0 28px;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.04em;
}

.lp-heading::before {
    display: none;
}

.lp-section-lead {
    margin: -12px auto 28px;
    max-width: 620px;
    color: var(--secondary-text);
    font-size: 0.9rem;
    line-height: 1.8;
    text-align: center;
}

.lp-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.lp-feature {
    padding: 24px 20px;
    border: 1px solid rgba(224, 227, 239, 0.7);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(82, 66, 132, 0.05);
}

.lp-feature-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 999px;
    color: var(--primary-purple);
    background: #efe5ff;
}

.lp-feature-icon svg {
    width: 22px;
    height: 22px;
}

.lp-feature h3 {
    margin: 16px 0 8px;
    font-size: 1rem;
    font-weight: 500;
}

.lp-feature p {
    margin: 0;
    color: var(--secondary-text);
    font-size: 0.84rem;
    line-height: 1.8;
}

.lp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.lp-steps li {
    display: grid;
    gap: 8px;
    padding: 24px 20px;
    border-radius: 18px;
    background: #fff;
    counter-increment: step;
}

.lp-steps li::before {
    content: counter(step);
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--gradient-main);
    font-family: Inter, sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
}

.lp-steps strong {
    font-size: 1rem;
    font-weight: 500;
}

.lp-steps span {
    color: var(--secondary-text);
    font-size: 0.84rem;
    line-height: 1.8;
}

.lp-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.lp-plan {
    display: grid;
    gap: 8px;
    padding: 26px 22px;
    border: 1px solid rgba(224, 227, 239, 0.8);
    border-radius: 18px;
    background: #fff;
    text-align: center;
}

.lp-plan.is-featured {
    border-color: rgba(101, 60, 255, 0.45);
    box-shadow: 0 12px 30px rgba(101, 60, 255, 0.1);
}

.lp-plan strong {
    font-size: 0.92rem;
    font-weight: 500;
}

.lp-price {
    color: var(--primary-purple);
    font-family: Inter, "Noto Sans JP", sans-serif;
    font-size: 2rem;
    font-weight: 600;
}

.lp-price small {
    margin-left: 2px;
    color: var(--secondary-text);
    font-size: 0.78rem;
    font-weight: 400;
}

.lp-plan p {
    margin: 0;
    color: var(--secondary-text);
    font-size: 0.8rem;
    line-height: 1.7;
}

.lp-final {
    text-align: center;
}

.lp-final .lp-cta {
    margin-top: 0;
}

@media (max-width: 900px) {
    .lp-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .lp-hero {
        padding: 48px 0 40px;
    }

    .lp-lead br {
        display: none;
    }

    .lp-button {
        width: 100%;
    }

    .lp-section {
        padding: 44px 0;
    }

    .lp-features,
    .lp-steps,
    .lp-plans {
        grid-template-columns: 1fr;
    }
}

/* 見出しは意味の切れ目でだけ改行する */
.lp-nowrap {
    display: inline-block;
}

/* ---- トップページ：複数選択の紹介 ---- */
.lp-badge {
    display: inline-block;
    margin: 0 0 16px;
    padding: 6px 16px;
    border-radius: 999px;
    color: #fff;
    background: var(--gradient-main);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    box-shadow: 0 8px 20px rgba(101, 60, 255, 0.2);
}

.lp-multi {
    padding-top: 24px;
}

.lp-multi-demo {
    display: grid;
    grid-template-columns: 340px 1fr;
    align-items: center;
    gap: 36px;
    max-width: 920px;
    margin: 0 auto;
}

.lp-phone {
    padding: 14px;
    border: 1px solid rgba(224, 227, 239, 0.9);
    border-radius: 28px;
    background: #f8f7fc;
    box-shadow: 0 24px 50px rgba(82, 66, 132, 0.14);
}

.lp-phone-bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 6px 8px 10px;
    font-size: 0.75rem;
}

.lp-phone-bar span {
    color: var(--primary-purple);
    letter-spacing: 0.1em;
}

.lp-phone-bar strong {
    font-weight: 500;
}

.lp-phone-hint {
    display: table;
    margin: 0 auto 10px;
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--primary-purple);
    background: #efe5ff;
    font-size: 0.75rem;
}

.lp-phone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.lp-chip {
    display: grid;
    min-height: 58px;
    place-items: center;
    border: 1.5px solid #e6e8f1;
    border-radius: 14px;
    background: #fff;
    font-size: 0.95rem;
}

.lp-chip.is-free {
    grid-column: 1 / -1;
    min-height: 42px;
    border-style: dashed;
    color: var(--secondary-text);
    font-size: 0.8rem;
}

.lp-chip.is-on {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    background: var(--selected-background);
    box-shadow: 0 6px 16px rgba(101, 60, 255, 0.14);
}

.lp-phone-action {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    text-align: center;
}

.lp-phone-action span {
    font-size: 0.82rem;
}

.lp-phone-action b {
    display: grid;
    min-height: 46px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--gradient-main);
    font-weight: 500;
}

.lp-split {
    display: grid;
    gap: 12px;
}

.lp-split-title {
    margin: 0;
    color: var(--secondary-text);
    font-size: 0.82rem;
}

.lp-split-pool {
    padding: 14px 18px;
    border: 1px solid #e6e8f1;
    border-radius: 14px;
    background: #fff;
    font-size: 0.9rem;
}

.lp-split-pool strong {
    margin-left: 6px;
    color: var(--primary-purple);
    font-size: 1.2rem;
    font-weight: 600;
}

.lp-split-arrow {
    color: var(--primary-purple);
    font-size: 0.82rem;
    text-align: center;
}

.lp-split-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lp-split-result div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 14px;
    background: var(--selected-background);
    text-align: center;
}

.lp-split-result span {
    font-size: 0.86rem;
}

.lp-split-result strong {
    color: var(--primary-purple);
    font-size: 1.4rem;
    font-weight: 600;
}

.lp-compare {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.lp-compare-item {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.84rem;
}

.lp-compare-item p {
    margin: 4px 0 2px;
}

.lp-compare-item small {
    color: var(--secondary-text);
    font-size: 0.75rem;
}

.lp-compare-label {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

.lp-compare-item.is-old {
    border: 1px dashed #d8dbe6;
    color: var(--secondary-text);
    background: #fbfbfd;
}

.lp-compare-item.is-old em {
    color: var(--danger);
    font-style: normal;
    font-weight: 500;
}

.lp-compare-item.is-new {
    border: 1px solid rgba(101, 60, 255, 0.35);
    background: #fff;
}

.lp-compare-item.is-new .lp-compare-label {
    color: var(--primary-purple);
    font-weight: 600;
}

@media (max-width: 760px) {
    .lp-multi-demo {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .lp-phone {
        width: min(100%, 340px);
        margin: 0 auto;
    }

    .lp-section-lead br {
        display: none;
    }
}

/* 受付履歴の見出しのボタン（CSV・選択削除・受付データ削除）は、入りきらなければ折り返す */
@media (max-width: 560px) {
    .history-actions {
        flex-wrap: wrap;
    }
}

/* ---- アカウント：ログアウト ---- */
.logout-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logout-row p {
    margin: 0;
}

/* 削除ではない確認（ログアウトなど）は紫で出す */
.confirm-modal.is-neutral .modal-icon {
    color: var(--primary-purple);
    background: var(--selected-background);
}

.confirm-modal.is-neutral .modal-delete {
    color: #fff;
    background: var(--primary-purple);
}

#portalButton {
    width: 100%;
    margin-top: 14px;
}
