/* Gutenberg editor canvas: reuse CHOT public tokens / classes. Do not invent a Gutenberg-only visual system. */
.editor-styles-wrapper {
    background: var(--chot-bg, #fffdf9);
    color: var(--chot-text, #302d2c);
    font-family: "Noto Sans JP", system-ui, sans-serif;
    padding-inline: 0;
}

/* Canvas = public page shell, not one reading column. Sections keep their public classes. */
.editor-styles-wrapper .is-root-container,
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--chot-shell);
    margin-inline: auto;
    padding-inline: 0;
    --wp--style--block-gap: 0;
}

.editor-styles-wrapper .is-root-container > .wp-block,
.editor-styles-wrapper .is-root-container > .block-editor-block-list__block {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.editor-styles-wrapper .wp-block-group.chot-reading-column,
.editor-styles-wrapper .wp-block.chot-reading-column {
    margin-inline: auto;
}

.editor-styles-wrapper .chot-article-content,
.editor-styles-wrapper .chot-value-close {
    max-width: none;
    width: 100%;
}

.editor-styles-wrapper .chot-chat__row,
.editor-styles-wrapper .wp-block-chot-chat-row {
    width: 100%;
    max-width: none;
}

.editor-styles-wrapper .wp-block-chot-bonus-list,
.editor-styles-wrapper .wp-block-chot-checklist {
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: center;
}

/*
 * Public .chot-chat { display:grid; gap:28px } is the SSOT for row spacing.
 * Gutenberg Group wraps children, so that gap never reaches chat-row /
 * bonus-list siblings. Unwrap editor chrome only. Do not copy the gap value.
 */
.editor-styles-wrapper .wp-block-group.chot-chat,
.editor-styles-wrapper .chot-chat {
    display: grid;
}

.editor-styles-wrapper .chot-chat > .block-editor-inner-blocks,
.editor-styles-wrapper .chot-chat > .block-editor-inner-blocks > .block-editor-block-list__layout,
.editor-styles-wrapper .chot-chat > .block-editor-block-list__layout,
.editor-styles-wrapper .chot-chat > .wp-block-group__inner-container {
    display: contents;
}

.editor-styles-wrapper .chot-chat .wp-block-chot-chat-row,
.editor-styles-wrapper .chot-chat .wp-block-chot-bonus-list {
    /* Gap owns vertical rhythm inside chat; avoid margin + gap double. */
    margin-block: 0;
}

/* Share: mirror public quiet pills in the editor canvas. */
.editor-styles-wrapper .chot-share {
    margin: calc(var(--chot-block-space, 28px) * 2) auto 8px;
    padding: 28px 0 8px;
    border-top: 1px solid var(--chot-border, #eadfda);
    text-align: center;
}
.editor-styles-wrapper .chot-share__title {
    margin: 0 0 16px;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 20px;
    font-weight: 600;
}
.editor-styles-wrapper .chot-share__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.editor-styles-wrapper .chot-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--chot-border, #eadfda);
    border-radius: 999px;
    background: #fff;
    color: var(--chot-text, #302d2c);
    font-size: 14px;
    font-weight: 700;
}
.editor-styles-wrapper .chot-share__btn--x {
    background: #f3f3f3;
    border-color: #2f2f2f;
    color: #111;
}
.editor-styles-wrapper .chot-share__btn--line {
    background: #eef8f0;
    border-color: #06c755;
    color: #06c755;
}
.editor-styles-wrapper .chot-share__btn--facebook {
    background: #eff4fb;
    border-color: #1877f2;
    color: #1877f2;
}
.editor-styles-wrapper .chot-share__btn--copy {
    background: var(--chot-pink-soft, #fff1f4);
    border-color: var(--chot-pink, #e97991);
    color: #b94f67;
}

.editor-styles-wrapper .wp-block-chot-cta .chot-funnel-cta,
.editor-styles-wrapper .chot-funnel-cta {
    margin-block: var(--chot-block-space, 28px);
    margin-inline: auto;
}

.editor-styles-wrapper .chot-reading-column > .wp-block-chot-cta:last-child .chot-funnel-cta,
.editor-styles-wrapper .chot-reading-column > .chot-funnel-cta:last-child {
    margin-bottom: 0;
}

.editor-styles-wrapper .chot-bonus-banner .chot-affiliate-tag img,
.editor-styles-wrapper .chot-bonus-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.editor-styles-wrapper .chot-bonus-banner__stub {
    margin: 0;
    padding: 16px;
    border: 1px dashed var(--chot-border, #eadfda);
    background: var(--chot-pink-soft, #fff1f4);
    color: var(--chot-muted, #716a67);
    font-size: 14px;
}

.chot-affiliate-toolbar {
    display: flex;
    align-items: center;
    min-width: 96px;
    padding: 0 8px;
}

.chot-affiliate-toolbar .components-base-control {
    margin-bottom: 0;
}

.chot-affiliate-toolbar .components-base-control__label {
    font-size: 11px;
}

.chot-affiliate-toolbar input {
    width: 72px;
}

.editor-styles-wrapper .chot-editor-fv {
    margin: 0 0 28px;
    max-width: none;
    pointer-events: none;
    user-select: none;
}

.editor-styles-wrapper .chot-editor-fv .chot-hero__title,
.editor-styles-wrapper .chot-editor-fv .chot-title-line,
.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__title,
.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__toolbar,
.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__eyebrow,
.editor-styles-wrapper .chot-editor-fv .chot-benefit,
.editor-styles-wrapper .chot-editor-fv .chot-benefit strong,
.editor-styles-wrapper .chot-editor-fv .chot-benefit span {
    pointer-events: auto;
    user-select: text;
}

.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__title,
.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__eyebrow {
    cursor: text;
    outline: 1px solid rgba(48, 45, 44, 0.4);
    outline-offset: 4px;
}

.editor-styles-wrapper .chot-editor-fv .chot-article-hero .chot-hero__copy {
    width: var(--chot-fv-title-width, 56%);
    max-width: var(--chot-fv-title-max-width, 600px);
}

.editor-styles-wrapper .chot-editor-fv .chot-article-hero .chot-hero__title {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: var(--chot-fv-title-font-size, clamp(36px, 3.8vw, 54px));
    line-height: var(--chot-fv-title-line-height, 1.4);
}

.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 8px;
    padding-inline: 20px;
    user-select: none;
}

.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__toolbar button,
.editor-styles-wrapper .chot-editor-fv .chot-editor-fv__toolbar label {
    font-size: 12px;
}

.editor-styles-wrapper .chot-editor-fv .chot-article-hero {
    max-width: none;
}

.editor-styles-wrapper .chot-editor-fv__note {
    margin: 0 0 8px;
    padding-inline: 20px;
    font-size: 12px;
    color: var(--chot-muted, #716a67);
}
