@charset "utf-8";

/* 編輯器輸出內容：圖文、標題、清單、引言、表格、YouTube / iframe */

.editstyle {
    color: #333333;
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    line-height: 1.8;
    letter-spacing: 0.04em;
    word-break: break-word;
}

.editstyle > *:first-child {
    margin-top: 0;
}

.editstyle > *:last-child {
    margin-bottom: 0;
}

.editstyle p {
    margin: 0 0 1em;
}

.editstyle h1,
.editstyle h2,
.editstyle h3,
.editstyle h4,
.editstyle h5,
.editstyle h6 {
    color: var(--title-color);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.06em;
    margin: 1.5em 0 0.6em;
}

.editstyle h1 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.editstyle h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.editstyle h3 { font-size: clamp(1.125rem, 2.2vw, 1.375rem); }
.editstyle h4 { font-size: 1.125rem; }
.editstyle h5,
.editstyle h6 { font-size: 1rem; }

.editstyle a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.editstyle a:hover {
    color: var(--main-color);
}

.editstyle strong,
.editstyle b {
    font-weight: 700;
}

.editstyle em,
.editstyle i {
    font-style: italic;
}

.editstyle ul,
.editstyle ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.editstyle ul {
    list-style: disc;
}

.editstyle ol {
    list-style: decimal;
}

.editstyle li {
    list-style: inherit;
    margin: 0.25em 0;
}

.editstyle ul ul,
.editstyle ol ol,
.editstyle ul ol,
.editstyle ol ul {
    margin-bottom: 0;
}

.editstyle blockquote {
    margin: 1.5em 0;
    padding: 0.9em 1.1em 0.9em 1.25em;
    border-left: 4px solid var(--primary-color);
    background-color: rgba(236, 108, 0, 0.08);
    color: #444444;
    font-style: italic;
}

.editstyle blockquote p:last-child {
    margin-bottom: 0;
}

.editstyle hr {
    border: 0;
    border-top: 1px dashed var(--primary-color);
    margin: 2em 0;
}

.editstyle img,
.editstyle video {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.25em auto;
}

.editstyle figure {
    margin: 1.25em 0;
}

.editstyle figure img {
    margin: 0 auto;
}

.editstyle figcaption {
    margin-top: 0.5em;
    color: #666666;
    font-size: 0.9em;
    text-align: center;
}

.editstyle iframe,
.editstyle embed,
.editstyle object {
    display: block;
    max-width: 100%;
    margin: 1.5em auto;
}

.editstyle iframe[src*="youtube.com"],
.editstyle iframe[src*="youtu.be"],
.editstyle iframe[src*="youtube-nocookie.com"] {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 200px;
    border: 0;
}

.editstyle .youtube,
.editstyle .embed-responsive,
.editstyle .mce-preview-object {
    position: relative;
    width: 100%;
    margin: 1.5em 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.editstyle .youtube iframe,
.editstyle .embed-responsive iframe,
.editstyle .mce-preview-object iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
}

.editstyle table {
    width: 100%;
    max-width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    font-size: 0.95em;
}

.editstyle th,
.editstyle td {
    padding: 0.6em 0.75em;
    border: 1px solid rgba(199, 131, 18, 0.35);
    text-align: left;
    vertical-align: top;
}

.editstyle th,
.editstyle table:not(:has(thead)) tr:first-child th,
.editstyle table:not(:has(thead)) tr:first-child td {
    background-color: rgba(199, 131, 18, 0.12);
    color: var(--title-color);
    font-weight: 700;
}

.editstyle img.alignleft,
.editstyle .alignleft {
    float: left;
    margin: 0.25em 1.25em 1em 0;
}

.editstyle img.alignright,
.editstyle .alignright {
    float: right;
    margin: 0.25em 0 1em 1.25em;
}

.editstyle img.aligncenter,
.editstyle .aligncenter {
    display: block;
    float: none;
    margin-left: auto;
    margin-right: auto;
}

.editstyle .text-left { text-align: left; }
.editstyle .text-center { text-align: center; }
.editstyle .text-right { text-align: right; }

@media screen and (max-width: 950px) {
    .editstyle img.alignleft,
    .editstyle img.alignright,
    .editstyle .alignleft,
    .editstyle .alignright {
        float: none;
        display: block;
        margin: 1em auto;
    }

    .editstyle table {
        display: block;
        overflow-x: auto;
    }
}
