/**
 * 「このイベントを広める」：①イベントのリンク ②招待状（OEAM_Spread）
 * 背景は白、罫線と余白で分ける。説明は ⓘ を押したときだけ出す。
 * テーマは 1rem = 10px なので px で書く。
 */
.oeam-spread {
    margin: 0 0 16px;
    padding: 16px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #fff;
    color: #292929;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}
.oeam-spread *,
.oeam-spread *::before,
.oeam-spread *::after {
    box-sizing: border-box;
}
.oeam-spread [hidden] {
    display: none !important;
}
.oeam-spread__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}
.oeam-spread__note {
    margin: 4px 0 0;
    font-size: 13px;
    color: #666;
}
.oeam-spread__icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
}

/* ---------- ①② の見出し ---------- */
.oeam-spread__block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #ececec;
}
.oeam-spread__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}
.oeam-spread__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #292929;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.oeam-spread__heading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.oeam-spread__heading .oeam-spread__icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}
.oeam-spread__tag {
    padding: 1px 8px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

/* ⓘ：押すと説明が出る */
.oeam-spread__info {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    box-shadow: none;
}
.oeam-spread__info:hover,
.oeam-spread__info:focus-visible,
.oeam-spread__info.is-open {
    background: #f2f2f2;
}
.oeam-spread__info:focus-visible {
    outline: 2px solid #292929;
    outline-offset: 1px;
}
.oeam-spread__info .oeam-spread__icon {
    width: 20px;
    height: 20px;
    opacity: .7;
}
.oeam-spread__hint {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #ececec;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.7;
    color: #555;
}
.oeam-spread__hint p {
    margin: 0;
}
.oeam-spread__hint p + p {
    margin-top: 6px;
}

/* ---------- ボタン ---------- */
.oeam-spread__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.oeam-spread__btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    background: #fff;
    color: #292929;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}
.oeam-spread__btn:hover,
.oeam-spread__btn:focus-visible {
    border-color: #292929;
    background: #fff;
    color: #292929;
    text-decoration: none;
}
.oeam-spread__btn:focus-visible {
    outline: 2px solid #292929;
    outline-offset: 2px;
}
.oeam-spread__btn:disabled {
    opacity: .5;
    cursor: default;
}
/* テーマの button[type="submit"] の色に負けないよう、枠の中だけ強めに指定する */
.oeam-spread .oeam-spread__btn--primary,
.oeam-spread button[type="submit"].oeam-spread__btn--primary {
    border-color: #292929;
    background: #292929;
    color: #fff;
}
.oeam-spread .oeam-spread__btn--primary:hover,
.oeam-spread .oeam-spread__btn--primary:focus-visible,
.oeam-spread button[type="submit"].oeam-spread__btn--primary:hover,
.oeam-spread button[type="submit"].oeam-spread__btn--primary:focus-visible {
    border-color: #000;
    background: #000;
    color: #fff;
}
.oeam-spread__btn.is-done {
    border-color: #292929;
}
.oeam-spread__actions--small .oeam-spread__btn {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 12px;
}
.oeam-spread__text-btn {
    appearance: none;
    -webkit-appearance: none;
    margin: 0 0 0 4px;
    padding: 0 2px;
    border: 0;
    background: none;
    color: #292929;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    box-shadow: none;
    min-height: 0;
}
.oeam-spread__text-btn:hover,
.oeam-spread__text-btn:focus-visible {
    background: none;
    color: #000;
}
.oeam-spread__text-btn--danger {
    color: #b3261e;
    font-size: 12px;
    font-weight: 400;
}

/* ---------- ② 招待状（1人に1通） ---------- */
/* 1通1行：だれへ（作った日）｜状態（日付）｜送るボタン */
.oeam-spread__named:empty {
    display: none;
}
.oeam-spread .oeam-spread__named {
    margin: 0;
    border-bottom: 1px solid #ececec;
}
.oeam-spread__invite {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 0;
    border-top: 1px solid #ececec;
}
/* 宛名と作った日・受け取った人。1行で「…」にし、押すと全文をふきだしで出す */
.oeam-spread__invite-who {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 2px 0;
    border: 0;
    background: none;
    color: #292929;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}
.oeam-spread__invite-who:hover,
.oeam-spread__invite-who:focus {
    background: none;
    color: #292929;
}
.oeam-spread__invite-who:focus-visible {
    outline: 2px solid #292929;
    outline-offset: 2px;
}
.oeam-spread__invite-name,
.oeam-spread__invite-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.oeam-spread__invite-name {
    font-size: 14px;
    line-height: 1.4;
}
.oeam-spread__invite-meta {
    font-size: 11px;
    line-height: 1.4;
    color: #888;
}

/* 全文のふきだし（行の上にふわっと出る） */
.oeam-spread__bubble {
    position: absolute;
    bottom: calc(100% - 4px);
    left: 0;
    z-index: 5;
    max-width: min(100%, 320px);
    padding: 8px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    color: #292929;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.oeam-spread__bubble.is-shown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.oeam-spread__bubble strong {
    display: block;
    font-size: 14px;
}
.oeam-spread__bubble span {
    display: block;
    font-size: 12px;
    color: #666;
}
/* しっぽ */
.oeam-spread__bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 18px;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-right: 1px solid #d6d6d6;
    border-bottom: 1px solid #d6d6d6;
    background: #fff;
    transform: rotate(45deg);
}
@media (prefers-reduced-motion: reduce) {
    .oeam-spread__bubble {
        transition: none;
    }
}
.oeam-spread__invite-state {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: #999;
    text-align: center;
}
.oeam-spread__invite-state small {
    font-size: 11px;
    font-weight: 400;
}
/* 状態は文字の色だけで分ける */
.oeam-spread__invite-state.is-opened,
.oeam-spread__invite-state.is-claimed {
    color: #555;
}
.oeam-spread__invite-state.is-registered {
    color: #1a73e8;
}
.oeam-spread__invite-state.is-booked {
    color: #188038;
}
.oeam-spread__invite-acts {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
}
.oeam-spread__icon-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: none;
    color: #292929;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}
.oeam-spread__icon-btn:hover,
.oeam-spread__icon-btn:focus-visible,
.oeam-spread__icon-btn.is-done {
    border-color: #cfcfcf;
    background: none;
    color: #292929;
    text-decoration: none;
}
.oeam-spread__icon-btn:focus-visible {
    outline: 2px solid #292929;
    outline-offset: 1px;
}
.oeam-spread__icon-btn--danger,
.oeam-spread__icon-btn--danger:hover,
.oeam-spread__icon-btn--danger:focus-visible {
    color: #b3261e;
}

/* 新しく招待状をつくる */
.oeam-spread__add {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    margin: 10px 0 0;
    padding: 8px 14px;
    border: 1px dashed #bdbdbd;
    border-radius: 8px;
    background: #fff;
    color: #292929;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}
.oeam-spread__add:hover,
.oeam-spread__add:focus-visible,
.oeam-spread__add.is-open {
    border-color: #292929;
    background: #fff;
    color: #292929;
}
.oeam-spread__add:focus-visible {
    outline: 2px solid #292929;
    outline-offset: 2px;
}
.oeam-spread__row--create {
    margin: 8px 0 0;
}

/* ひとこと・人数 */
.oeam-spread__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    padding: 12px 0 0;
    border-top: 1px dashed #e3e3e3;
}
.oeam-spread__chip {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    margin: 0;
    padding: 4px 12px;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    background: #fff;
    color: #292929;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}
.oeam-spread__chip:hover,
.oeam-spread__chip:focus-visible,
.oeam-spread__chip.is-open {
    border-color: #292929;
    background: #fff;
    color: #292929;
    text-decoration: none;
}
.oeam-spread__chip .oeam-spread__icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}
/* ひとことをまだ書いていない印 */
.oeam-spread__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d93025;
}
.oeam-spread__stats {
    margin-left: auto;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}
.oeam-spread__stats strong {
    color: #292929;
    font-size: 14px;
}
.oeam-spread__message {
    margin: 10px 0 0;
}

/* ---------- 入力 ---------- */
.oeam-spread__textarea,
.oeam-spread__input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background: #fff;
    color: #292929;
    /* 16px 未満だと iPhone で拡大される */
    font-size: 16px;
    line-height: 1.5;
}
.oeam-spread__textarea:focus,
.oeam-spread__input:focus {
    border-color: #292929;
    outline: none;
}
.oeam-spread__row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
}
.oeam-spread__row .oeam-spread__input {
    flex: 1 1 auto;
    min-width: 0;
}
.oeam-spread__row .oeam-spread__btn {
    flex: 0 0 auto;
}
.oeam-spread__count {
    margin-right: auto;
    font-size: 12px;
    color: #777;
}
.oeam-spread__named {
    padding: 0;
    list-style: none;
}
.oeam-spread__status {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
}
.oeam-spread__status:empty {
    display: none;
}
.oeam-spread__status.is-error {
    color: #b3261e;
}

/* ---------- 主催者以外：イベントのリンクだけ ---------- */
.oeam-spread--compact {
    padding: 12px 14px;
}
.oeam-spread__compact-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
}

/* 作成完了の画面ではカードの中に置く */
.oeam-spread--created {
    margin: 20px 0 0;
}
