:root {
    --sr-primary: #000000;
    --sr-primary-dark: #1a1a1a;
    --sr-danger: #c0392b;
    --sr-border: #d8d8d8;
    --sr-bg-muted: #f7f7f5;
    --sr-text: #222;
    --sr-radius: 6px;
    --sr-slider-accent: #692003;
    --sr-slider-complete: #FCA708;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: var(--sr-text);
    background: #fff;
    line-height: 1.6;
}

a {
    color: var(--sr-primary);
}

h2 {
    font-size: 1.25rem;
    margin: 0 0 1rem;
}

h3 {
    font-size: 1.05rem;
}

.customer.account {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

/* ヘッダー・メニュー */
.customer-header-group {
    position: sticky;
    top: 0;
    z-index: 100;
}

.customer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sr-border);
    background: var(--sr-primary);
    color: #fff;
}

.customer-header a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.hamburger-toggle {
    display: flex;
    background: none;
    border: none;
    padding: 0.2rem;
    color: #fff;
    cursor: pointer;
}

/* よく使うメニュー(ヘッダー直下に常時表示) */
.frequent-nav {
    background: #fff;
    border-bottom: 1px solid var(--sr-border);
}

.frequent-nav__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.frequent-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--sr-text);
    text-decoration: none;
    font-size: 0.65rem;
    font-family: inherit;
    width: 100%;
    cursor: pointer;
}

.frequent-nav__logout-form {
    margin: 0;
}

.frequent-nav__item--logout {
    color: #666;
}

.frequent-nav__item.is-active {
    color: var(--sr-primary);
    border-bottom-color: var(--sr-primary);
    font-weight: bold;
}

.frequent-nav .label-full {
    display: none;
}

/* その他のメニュー(スマートフォンではハンバーガーから開くドロワー、PCではフッター) */
.secondary-nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 150;
}

.secondary-nav-scrim.is-open {
    display: block;
}

.secondary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 78%;
    max-width: 320px;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 200;
    overflow-y: auto;
}

.secondary-nav.is-open {
    transform: translateX(0);
}

.secondary-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--sr-border);
    font-weight: bold;
    font-size: 0.95rem;
}

.secondary-nav__close {
    background: none;
    border: none;
    padding: 0;
    color: #666;
    cursor: pointer;
}

.secondary-nav__inner {
    display: contents;
}

.secondary-nav__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--sr-border);
    color: var(--sr-text);
    text-decoration: none;
    font-size: 0.88rem;
}

.secondary-nav__break {
    flex: 1;
}

.secondary-nav__item--legal {
    border-bottom: none;
    color: #777;
    font-size: 0.78rem;
    padding: 0.8rem 1.1rem;
}

@media (min-width: 640px) {
    .hamburger-toggle {
        display: none;
    }

    .secondary-nav-scrim {
        display: none !important;
    }

    .frequent-nav__inner {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        max-width: 760px;
        margin: 0 auto;
        padding: 0.6rem 1rem;
    }

    .frequent-nav__item {
        flex-direction: row;
        width: auto;
        padding: 0.55rem 1rem;
        border-radius: var(--sr-radius);
        border-bottom: none;
        font-size: 0.88rem;
    }

    .frequent-nav__item.is-active {
        background: var(--sr-primary);
        color: #fff;
    }

    .frequent-nav__logout-form {
        margin-left: auto;
    }

    .frequent-nav .label-full {
        display: inline;
    }

    .frequent-nav .label-short {
        display: none;
    }

    .secondary-nav {
        position: static;
        width: auto;
        max-width: none;
        background: var(--sr-bg-muted);
        border-top: 1px solid var(--sr-border);
        box-shadow: none;
        transform: none;
        display: block;
    }

    .secondary-nav__header {
        display: none;
    }

    .secondary-nav__inner {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 2rem;
        max-width: 760px;
        margin: 0 auto;
        padding: 2rem 1rem;
    }

    .secondary-nav__item {
        border-bottom: none;
        padding: 0;
    }

    .secondary-nav__break {
        flex: 0 0 100%;
        height: 0;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--sr-border);
    }

    .secondary-nav__item--legal {
        padding: 0;
        font-size: 0.8rem;
    }
}

/* テーブル(モバイルではdata-labelでカード風に積む) */
table.ticket-list,
table.ticket-details {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table.ticket-details th {
    text-align: left;
    width: 40%;
    color: #555;
    font-weight: normal;
    font-size: 0.85rem;
}

table.ticket-list th,
table.ticket-list td,
table.ticket-details th,
table.ticket-details td {
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid var(--sr-border);
    vertical-align: middle;
}

table.ticket-list thead {
    display: none;
}

table.ticket-list tbody tr {
    display: block;
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
}

table.ticket-list td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

table.ticket-list td:last-child {
    border-bottom: none;
}

table.ticket-list td::before {
    content: attr(data-label);
    font-size: 0.8rem;
    color: #777;
    margin-right: 1rem;
}

table.ticket-list td[data-label=""]::before {
    display: none;
}

@media (min-width: 640px) {
    table.ticket-list thead {
        display: table-header-group;
    }

    table.ticket-list tbody tr {
        display: table-row;
        border: none;
        border-bottom: 1px solid var(--sr-border);
        margin-bottom: 0;
    }

    table.ticket-list td {
        display: table-cell;
    }

    table.ticket-list td::before {
        content: none;
    }
}

/* フォーム */
form label {
    display: block;
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 0.25rem;
}

form input[type="text"],
form input[type="file"],
form select {
    width: 100%;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    font-size: 1rem;
    margin-bottom: 0.9rem;
    background: #fff;
}

/* 生年月日(年/月/日)の横並びセレクト */
.birthdate-group {
    display: flex;
    gap: 0.5rem;
}

.birthdate-group select {
    width: auto;
    flex: 1;
}

/* 性別・職業のラジオボタン群 */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 0.9rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: normal;
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ボタン */
button,
.customer.account a > button {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    background: var(--sr-primary);
    color: #fff;
    border: none;
    border-radius: var(--sr-radius);
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    background: var(--sr-primary-dark);
}

button:disabled {
    background: #aaa;
    cursor: default;
}

a > button {
    pointer-events: none;
}

/* 警告文言(既存の style="color: red;" を踏襲したうえで少し余白調整) */
.customer.account strong[style*="color: red"],
.customer.account strong[style*="color:red"] {
    display: inline-block;
    margin: 0.5rem 0;
}

/* 特典キャプションボックス */
.caption-box {
    position: relative;
    margin-top: 1em;
    padding: 1em;
    border: 2px dotted var(--sr-border);
    border-radius: var(--sr-radius);
}

.caption-box .caption {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1em;
    padding: 0 1em;
    margin: 0;
    background-color: #fff;
    transform: translateY(-50%) translateX(1em);
}

.caption-box dt {
    margin-top: 1em;
    font-weight: bold;
}

.caption-box dd {
    margin-inline-start: 1em;
    color: #555;
}

.benefits {
    display: none;
}

/* モーダル(modal.js と対応) */
.modal-container {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-container.is-open {
    display: flex;
}

.modal-body {
    position: relative;
    background: #fff;
    border-radius: var(--sr-radius);
    max-width: 90%;
    width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem 1.25rem;
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

.modal-content {
    margin-top: 0.5rem;
}

/* スライドして受付(slide-to-unlock.js と対応) */
.slider-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.slider {
    width: 80%;
    max-width: 320px;
    height: 52px;
    background: var(--sr-bg-muted);
    border: 1px solid var(--sr-border);
    border-radius: 26px;
    position: relative;
    overflow: hidden;
    user-select: none;
    touch-action: pan-y;
}

.slider-track-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sr-slider-accent);
    font-size: 0.9rem;
    pointer-events: none;
}

.slider-handle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--sr-border);
    color: var(--sr-slider-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: background-color 0.15s ease;
}

.slider.is-unlocked {
    background: var(--sr-slider-complete);
    transition: background-color 0.15s ease;
}

.slider.is-unlocked .slider-track-label {
    font-weight: bold;
}

/* スピナー表示領域 */
#result-area {
    min-height: 40px;
}

/* フラッシュメッセージ */
.flash-messages-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flash-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--sr-radius);
    font-size: 0.9rem;
}

.flash-message--success {
    background: #e6f4ea;
    color: #1e4620;
    border: 1px solid #b7dfc0;
}

.flash-message--error {
    background: #fbe9e7;
    color: var(--sr-danger);
    border: 1px solid #f0b8b0;
}

/* フォームのフィールドエラー */
form input.input-error,
form select.input-error {
    border-color: var(--sr-danger);
    background: #fdf1f0;
}

.field-error-message {
    color: var(--sr-danger);
    font-size: 0.8rem;
    margin: -0.6rem 0 0.9rem;
}

/* 前の画面への戻り導線 */
.return-to-caption {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}
