.oz-seat {
    position: fixed;
    right: 1.6rem;
    bottom: 2.2rem;
    z-index: 100;
    width: 18rem;
    max-width: calc(100vw - 2rem);
    padding: 1rem 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 1rem;
    background: #0073a0;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s, width 0.3s ease, background 0.4s;
    animation: oz-seat-pop 0.5s cubic-bezier(0.2, 1.2, 0.4, 1);
    transform-origin: right bottom;
}

.oz-seat[hidden] {
    display: none;
}

.oz-seat.is-open {
    width: 23.4rem; /* 本文 15文字（1.3rem×15）が1行に収まる幅 */
}

/* ふきだしのしっぽ（回転した正方形の外側2辺だけ枠線） */
.oz-seat::after {
    content: "";
    position: absolute;
    right: 1.6rem;
    bottom: -0.5rem;
    width: 0.9rem;
    height: 0.9rem;
    background: inherit;
    border-right: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    transform: rotate(45deg);
}

/* スクロール中は隠す */
.oz-seat.is-scrolling {
    opacity: 0;
    pointer-events: none;
}

.oz-seat-toggle {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-align: center;
    cursor: default;
}

.oz-seat.has-detail .oz-seat-toggle {
    cursor: pointer;
}

.oz-seat-toggle > span {
    display: block;
}

.oz-seat-toggle > span[hidden] {
    display: none;
}

.oz-seat-title {
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.oz-seat-label {
    font-size: 1.8rem;
    font-weight: bold;
}

/* 本日の営業時間（閉じていても常に表示） */
.oz-seat-hours {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.oz-seat-hours-label {
    display: block;
    font-size: 1rem;
    opacity: 0.85;
}

.oz-seat-hours-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    word-break: break-word;
}

/* タップできることを示す表示 */
.oz-seat-more {
    display: none !important;
    margin-top: 0.4rem;
    padding-top: 0.3rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.4);
    font-size: 1rem;
}

.oz-seat.has-detail .oz-seat-more {
    display: block !important;
}

.oz-seat-more::after {
    content: "今日のイベント ▾";
    display: inline-block;
}

.oz-seat.is-open .oz-seat-more::after {
    content: "閉じる ▴";
}

.oz-seat.has-detail:not(.is-open) .oz-seat-more::after {
    animation: oz-seat-nudge 2s ease-in-out infinite;
}

/* 閉じるボタン */
.oz-seat-close {
    position: absolute;
    top: 0.2rem;
    right: 0.4rem;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.6rem;
    line-height: 1;
    opacity: 0.8;
    cursor: pointer;
}

/* 閉じたあとの小さな丸ボタン */
.oz-seat-mini {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.5;
    cursor: pointer;
}

.oz-seat-mini::after {
    content: " ▴";
    font-size: 1rem;
}

.oz-seat.is-min {
    width: auto;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
}

.oz-seat.is-min .oz-seat-mini {
    display: block;
}

.oz-seat.is-min .oz-seat-toggle,
.oz-seat.is-min .oz-seat-detail,
.oz-seat.is-min .oz-seat-close {
    display: none;
}

.oz-seat.is-min::after {
    display: none;
}

/* イベント（なめらかに開閉） */
.oz-seat-detail {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.oz-seat.is-open .oz-seat-detail {
    grid-template-rows: 1fr;
}

.oz-seat-detail-inner {
    min-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    text-align: left;
    transition: opacity 0.3s, visibility 0.3s;
}

.oz-seat.is-open .oz-seat-detail-inner {
    visibility: visible;
    opacity: 1;
}

.oz-seat-row {
    margin: 0.6rem 0 0;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.oz-seat-row dt {
    font-size: 1rem;
    opacity: 0.85;
}

.oz-seat-row dd {
    margin: 0;
    font-size: 1.3rem;
    white-space: pre-line;
    word-break: break-word;
}

.oz-seat[data-status="full"] {
    background: #c82828;
}

@keyframes oz-seat-pop {
    from {
        opacity: 0;
        transform: translateY(1rem) scale(0.9);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes oz-seat-nudge {
    0%, 60%, 100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(2px);
    }
}

@media screen and (max-width: 768px) {
    .oz-seat {
        right: 1rem;
        bottom: 1.6rem;
        padding: 0.8rem 1.4rem;
    }

    .oz-seat-label {
        font-size: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oz-seat,
    .oz-seat-detail,
    .oz-seat-detail-inner,
    .oz-seat-more::after {
        animation: none;
        transition: none;
    }
}
