/* The editor canvas uses this exact stylesheet after Ipsum's stylesheet.
 * Strict Japanese punctuation rules keep closing marks off the next line;
 * anywhere is the emergency break for URLs and other unbroken input. Avoid
 * break-all and forced justification, which split ordinary Latin words.
 */
/* Editor iframes may omit lang. Strict line breaking affects Japanese text
 * without forcing breaks inside ordinary Latin words, so use the theme's
 * default rules in both canvases instead of depending on a lang attribute.
 */
body,
.editor-styles-wrapper,
body :is(p, h1, h2, h3, h4, h5, h6, blockquote, li, th, td, figcaption, cite, a, label, input, button, textarea, select),
.editor-styles-wrapper :is(p, h1, h2, h3, h4, h5, h6, blockquote, li, th, td, figcaption, cite, a, label, input, button, textarea, select),
.editor-styles-wrapper .block-editor-rich-text__editable {
	line-break: strict;
	word-break: normal;
	overflow-wrap: anywhere;
}

/* Ipsum's table headers and list markers refer to its manrope preset. The
 * child replaces that preset in theme.json, so these inherit the same stack.
 * Fixed-layout tables must wrap hostile long cells without widening a phone.
 */
:where(.wp-block-table) :where(th, td) {
	overflow-wrap: anywhere;
	word-break: normal;
}

/* Form controls can retain a browser UI font instead of the surrounding
 * block's system stack. Keep the same fallback for Japanese labels/input.
 */
.wp-site-blocks :where(input, button, select, textarea),
.editor-styles-wrapper :where(input, button, select, textarea) {
	font-family: inherit;
}

/* Preserve deliberate code whitespace; scroll code within its own box. */
:where(pre, .wp-block-code) {
	max-inline-size: 100%;
	overflow-x: auto;
	overflow-wrap: normal;
}
