/* ===========================
   Global
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    display:flex;
    width:100vw;
    height:100vh;
    overflow:hidden;
    font-family:"Microsoft YaHei",sans-serif;
    background:#f5f5f5;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
}

/* ===========================
   Preview
=========================== */

#preview{
    flex:1;
    min-width:0;
    overflow-y:auto;
    background:#f5f5f5;
    position:relative;
}

.posterRoot{
    position:relative;
    width:100%;
    background:#efefef;
    padding:var(--poster-top-padding,58px) 60px 40px;
    overflow:hidden;
}

.posterTypesettingOverlay{
    position:fixed;
    inset:0;
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:40px;
    background:rgba(245,245,245,.92);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .12s ease, visibility .12s ease;
}

.posterTypesettingOverlay.visible{
    opacity:1;
    visibility:visible;
}

.posterTypesettingMessage{
    padding:10px 16px;
    border:1px solid rgba(0,0,0,.08);
    border-radius:6px;
    color:#555;
    font-size:14px;
    line-height:1.4;
    background:rgba(255,255,255,.9);
    box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.posterBackgroundCanvas{
    position:absolute;
    inset:0;
    z-index:0;
    width:100%;
    height:100%;
    pointer-events:none;
}

.posterBackgroundCanvas[hidden]{
    display:none;
}

.posterHeader,
.posterSubtitle,
.posterCards,
.posterCopyright{
    position:relative;
    z-index:1;
}

.posterSide{
    z-index:1;
}

.posterHeader{
    display:inline-flex;
    max-width:var(--headline-title-max-width, calc(100% - 70px - var(--text-side-spacing,0px) - var(--text-side-spacing,0px)));
    width:var(--headline-title-max-width, auto);
    margin-left:var(--headline-title-offset, var(--text-side-spacing,0px));
}

.posterYear{
    /* --year-marker-height:80%;
    --year-marker-width:100%;
    --year-marker-bottom:-0.3em;
    --year-marker-left:1.2em; */
    --year-shadow-scale:1.3;
    --year-shadow-left:-0.2em;
    --year-shadow-top:0em;
    display:inline-block;
    position:relative;
    width:100%;
    isolation:isolate;
    color:var(--text-color,#111111);
    font-size:56px;
    font-weight:bold;
    line-height:1.05;
    padding:0;
    white-space:pre-wrap;
    word-break:break-all;
    overflow-wrap:anywhere;
}

.posterYear::before{
    content:attr(data-shadow-text);
    position:absolute;
    left:var(--year-shadow-left);
    top:var(--year-shadow-top);
    z-index:-1;
    color:rgba(200,200,200,.3);
    font-size:calc(1em * var(--year-shadow-scale));
    line-height:1.05;
    white-space:nowrap;
    word-break:normal;
    overflow-wrap:normal;
    pointer-events:none;
}

.posterYear::after{
    content:"";
    position:absolute;
    left:var(--year-marker-left);
    bottom:var(--year-marker-bottom);
    z-index:-2;
    width:var(--year-marker-width);
    height:var(--year-marker-height);
    background:#000000;
    pointer-events:none;
}

.posterRoot.hideYearShadow .posterYear::before,
.posterRoot.hideYearShadow .posterYear.typesetText .typesetLineShadow{
    content:"";
    display:none;
}

.posterSubtitle{
    margin-top:var(--subtitle-gap-to-title,12px);
    margin-left:var(--text-side-spacing,0px);
    font-family:var(--subtitle-font-family,inherit);
    font-size:var(--subtitle-font-size,14px);
    font-weight:var(--subtitle-font-weight,400);
    font-style:var(--subtitle-font-style,normal);
    line-height:var(--subtitle-line-height,1.2);
    letter-spacing:var(--subtitle-letter-spacing,.55em);
    color:var(--text-color,#3b3b3b);
    width:var(--headline-subtitle-max-width, auto);
    max-width:var(--headline-subtitle-max-width, none);
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.typesetText{
    white-space:normal;
    overflow-wrap:normal;
    word-break:normal;
}

.typesetLine{
    display:block;
    width:100%;
    box-sizing:border-box;
    font-size:inherit;
    line-height:inherit;
    padding-block:.06em;
    margin-bottom:-.12em;
    white-space:nowrap;
    overflow:visible;
}

.typesetLineInner{
    display:inline-block;
    position:relative;
    top:-.06em;
    max-width:none;
    font-size:inherit;
    line-height:inherit;
    white-space:nowrap;
    overflow:visible;
}

.typesetToken{
    display:inline;
    font-size:inherit;
    line-height:inherit;
    text-decoration-skip-ink:none;
}

.typesetDecorationRun{
    position:relative;
    display:inline-block;
    text-decoration:none !important;
    text-decoration-skip-ink:none;
}

.typesetDecorationRun::before,
.typesetDecorationRun::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    display:none;
    height:1.5px;
    background:var(--typeset-decoration-color,currentColor);
    pointer-events:none;
}

.typesetDecorationRun[data-decoration-lines~="underline"]::after{
    display:block;
    bottom:.3em;
}

.typesetDecorationRun[data-decoration-lines~="line-through"]::before{
    display:block;
    top:50%;
    transform:translateY(-50%);
}

.posterYear.typesetText::before{
    content:"";
}

.posterYear.typesetText .typesetLineInner{
    position:relative;
    isolation:isolate;
}

.posterYear.typesetText .typesetLineShadow{
    position:absolute;
    left:var(--year-shadow-left);
    top:var(--year-shadow-top);
    z-index:0;
    color:rgba(200,200,200,.3);
    font-size:calc(1em * var(--year-shadow-scale));
    line-height:1.05;
    white-space:pre;
    word-break:normal;
    overflow-wrap:normal;
    pointer-events:none;
}

.posterYear.typesetText .typesetToken{
    position:relative;
    z-index:1;
}

.posterRoot.subtitleVerticalLeft .posterSubtitle{
    position:absolute;
    top:var(--subtitle-vertical-top,40px);
    right:var(--subtitle-vertical-right,86px);
    display:inline-flex;
    width:auto;
    max-width:none;
    flex-direction:row-reverse;
    align-items:flex-end;
    writing-mode:horizontal-tb;
    text-orientation:mixed;
}

.posterSide{
    --vertical-text-letter-spacing:.12em;
    position:absolute;
    top:var(--poster-top-padding,58px);
    right:calc(50px + var(--text-side-spacing,0px) + var(--side-header-reserve,0px));
    display:inline-flex;
    flex-direction:row-reverse;
    align-items:flex-end;
    writing-mode:horizontal-tb;
    font-size:48px;
    font-weight:bold;
    letter-spacing:var(--vertical-text-letter-spacing);
    color:var(--text-color,#111111);
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.verticalTextLine{
    display:inline-flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    gap:var(--vertical-text-letter-spacing,0px);
    writing-mode:horizontal-tb;
    text-orientation:mixed;
    white-space:pre;
}

.verticalTextLine.inkAwareVerticalTextLine{
    position:relative;
    display:block;
    flex:none;
    width:1em;
    height:var(--vertical-line-height,1em);
    gap:0;
}

.verticalTextCharSlot{
    position:absolute;
    left:0;
    top:var(--vertical-char-top,0px);
    display:block;
    width:1em;
    height:1em;
}

.verticalTextChar{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:1em;
    height:1em;
    line-height:1;
    letter-spacing:0;
}

.rotateVerticalChar{
    position:relative;
    left:var(--vertical-rotated-char-offset-x,0);
    transform:rotate(90deg);
    transform-origin:center center;
}

.adjustVerticalParenthesisChar{
    position:relative;
    left:var(--vertical-parenthesis-offset-x,0);
    top:var(--vertical-parenthesis-offset-y,0);
    --vertical-parenthesis-offset-x:0;
    --vertical-parenthesis-offset-y:0;
}

.adjustVerticalRotatedChar{
    --vertical-rotated-char-offset-x:.16em;
}

.posterCards{
    width:100%;
    margin-top:0;
}

.card{
    position:relative;
    margin-top:var(--module-spacing,58px);
    padding-left:54px;
    width:100%;
}

.posterRoot.noTimeline .card{
    width:calc(100%);
    padding-left:0;
    margin-left:0px;
    margin-top:max(0px, calc(var(--module-spacing,58px) - 18px));
}

.posterRoot.hideMonthTitles .card{
    margin-top:max(0px, calc(var(--module-spacing,58px) - 38px));
}

.posterRoot.hideMonthTitles .cardTitle,
.posterRoot.hideMonthTitles .cardTitleUnderline{
    display:none;
}

.posterRoot.hideMonthUnderlines .cardTitleUnderline{
    display:none;
}

.posterRoot.hideMonthUnderlines .cardTitle{
    margin-bottom:calc(12px + var(--card-title-spacing,0px));
}

.paragraphDivider{
    display:flex;
    align-items:center;
    margin:calc(var(--module-spacing,58px) / 2) var(--text-side-spacing,0px);
    color:var(--text-color,#111111);
}

.paragraphDivider span{
    display:block;
    width:100%;
    height:1px;
    background:currentColor;
    opacity:.18;
}

.posterRoot .paragraphDivider + .card{
    margin-top:0;
}

.posterRoot.hideSideHeader .posterSide{
    display:none;
}

.posterRoot.hideSideHeader .posterHeader{
    max-width:100%;
}

.posterRoot.hideSideHeader .posterCards{
    max-width:100%;
    width:100%;
}

.card::before{
    content:"";
    position:absolute;
    left:16px;
    top:8px;
    bottom:-32px;
    width:1px;
    background:rgba(0,0,0,.26);
}

.card::after{
    content:"";
    position:absolute;
    left:11px;
    top:3px;
    width:10px;
    height:10px;
    border-radius:50%;
    background:#111111;
    box-shadow:0 0 0 3px rgba(255,255,255,.45);
}

.posterRoot.noTimeline .card::before,
.posterRoot.noTimeline .card::after{
    display:none;
}

.cardTitle{
    display:block;
    margin:0 calc(var(--text-side-spacing,0px) + var(--card-side-spacing,0px));
    color:var(--text-color,#111111);
    font-family:"Songti SC","STSong","SimSun",serif;
    font-size:48px;
    font-weight:bold;
    line-height:1.1;
    letter-spacing:.06em;
    text-align:left;
    position:relative;
    padding-bottom:8px;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.cardTitleUnderline{
    --card-title-side-inset:calc(var(--text-side-spacing,0px) + var(--card-side-spacing,0px));
    display:block;
    width:88px;
    height:2px;
    margin:8px var(--card-title-side-inset) calc(12px + var(--card-title-spacing,0px));
    background:var(--text-color, rgba(17,17,17,.72));
}

.cardTitleUnderline[data-text-align="center"]{
    margin-right:auto;
    margin-left:auto;
}

.cardTitleUnderline[data-text-align="right"]{
    margin-right:var(--card-title-side-inset);
    margin-left:auto;
}

.cardContent{
    width:100%;
    margin:0;
    padding:0;
}

.cardImageList{
    display:flex;
    flex-direction:column;
    gap:var(--card-paragraph-spacing,0px);
}

.cardImageWrap{
    display:flex;
    justify-content:center;
    align-items:flex-start;
    width:auto;
    margin:0 calc(var(--text-side-spacing,0px) + var(--card-side-spacing,0px));
}

.cardImageWrap[data-image-align="left"]{
    justify-content:flex-start;
}

.cardImageWrap[data-image-align="right"]{
    justify-content:flex-end;
}

.cardImage{
    display:block;
    max-width:100%;
    height:auto;
    background:transparent;
}

.posterRoot.hideSideHeader .cardContent{
    width:100%;
}

.info{
    display:block;
    margin:0 calc(var(--text-side-spacing,0px) + var(--card-side-spacing,0px));
    padding:0;
    line-height:var(--content-line-height,1.8);
    white-space:pre-wrap;
    text-align:left;
    font-size:20px;
    color:var(--text-color,#202020);
    letter-spacing:.03em;
    overflow-wrap:anywhere;
    word-break:break-word;
    text-decoration-skip-ink:none;
}

.info *{
    text-decoration-skip-ink:none;
}

.info p,
.info div{
    margin:0 0 var(--content-paragraph-spacing,0px);
}

.info p:last-child,
.info div:last-child{
    margin-bottom:0;
}

.info p.contentHeading,
.info div.contentHeading{
    display:block;
    margin:0 0 var(--content-paragraph-spacing,0px);
    text-align:inherit;
}

.info p.contentHeading:last-child,
.info div.contentHeading:last-child{
    margin-bottom:0;
}

.info[data-first-line-indent="true"] > p:not(.contentHeading):not(.typesetText),
.info[data-first-line-indent="true"] > div:not(.contentHeading):not(.typesetText){
    text-indent:var(--content-first-line-indent,2em);
}

.info br{
    display:block;
    content:"";
    margin-bottom:var(--content-paragraph-spacing,0px);
}

.posterCopyright{
    position:relative;
    display:block;
    width:fit-content;
    margin:25px auto 0;
    background:none;
    color:#b3bac3;
    font-size:13px;
    font-weight:600;
    padding:0;
    letter-spacing:.04em;
    line-height:1;
    font-family:inherit;
    box-shadow:none;
    z-index:1;
}

/* ===========================
   Drag Bar
=========================== */

#dragBar{
    width:6px;
    background:#dddddd;
    cursor:col-resize;
    transition:.2s;
    position:relative;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
}

#dragBar:hover{
    background:#999999;
}

#editorCollapseBtn{
    position:absolute;
    top:50%;
    left:50%;
    z-index:8;
    width:24px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
    margin:0;
    border:1px solid #cfd6df;
    border-radius:12px;
    background:#ffffff;
    color:#4b5563;
    font-size:20px;
    line-height:1;
    box-shadow:0 8px 18px rgba(15,23,42,.12);
    transform:translate(-50%,-50%);
    cursor:pointer;
}

#editorCollapseBtn:hover{
    background:#f8fafc;
    color:#111827;
}

body.editorCollapsed #editor{
    display:none;
}

body.editorCollapsed #dragBar{
    background:#cfd6df;
}

/* ===========================
   Editor
=========================== */

#editor{
    width:420px;
    min-width:300px;
    max-width:900px;
    flex-shrink:0;
    overflow-y:auto;
    background:linear-gradient(180deg,#fcfcfd 0%,#ffffff 100%);
    padding:22px;
    border-left:1px solid rgba(17,24,39,.08);
    box-shadow:-16px 0 32px rgba(15,23,42,.06);
    position:relative;
    border-top-left-radius:24px;
    border-bottom-left-radius:24px;
}

#editor h2{
    margin:0;
    padding:0;
    border-bottom:none;
    font-size:22px;
    font-weight:700;
    letter-spacing:.5px;
}

.editorHeader{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    column-gap:12px;
    row-gap:3px;
    margin-bottom:16px;
    padding-bottom:14px;
    border-bottom:1px solid #eceff3;
}

.editorHeader h2{
    margin:0;
    padding:0;
    border-bottom:none;
}

.editorFontHint{
    grid-column:1 / -1;
    color:#6b7280;
    font-size:12px;
    line-height:1.5;
    white-space:nowrap;
}

.editorTopActions{
    display:flex;
    align-items:center;
    gap:6px;
    justify-content:flex-start;
    min-width:0;
    margin:0 0 14px;
    padding-bottom:12px;
    border-bottom:1px solid #eceff3;
}

.articlePanelActions{
    display:none;
}

.articleManager{
    display:grid;
    align-items:center;
    grid-template-columns:minmax(0,1fr) repeat(5,auto);
    gap:5px;
    min-width:0;
    width:100%;
    max-width:none;
    justify-content:flex-start;
    margin:0 0 16px;
    padding:14px;
    border:1px solid #eef1f5;
    border-radius:18px;
    background:#ffffff;
    box-shadow:0 1px 2px rgba(15,23,42,.03);
}

.articleManager label{
    display:block;
    grid-column:1 / -1;
    margin-bottom:3px;
    color:#374151;
    font-size:15px;
    font-weight:600;
    white-space:nowrap;
}

.articleManager select,
.articleManager button{
    height:28px;
    box-sizing:border-box;
    align-self:center;
    margin:0;
    border:1px solid #d7dce3;
    border-radius:8px;
    background:#ffffff;
    line-height:26px;
    vertical-align:middle;
}

.articleManager select{
    width:100%;
    min-width:104px;
    max-width:none;
    padding:0 22px 0 8px;
    color:#111827;
    font-size:12px;
    font-weight:700;
}

.articleManager button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 8px;
    color:#4b5563;
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    transition:background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s;
}

.articleManager button:hover{
    background:#f8fafc;
    border-color:#cbd5e1;
    color:#111827;
    box-shadow:0 4px 10px rgba(15,23,42,.06);
    transform:translateY(-1px);
}

.articleManager button.danger{
    color:#b42318;
    border-color:#f1c8c2;
}

.articleManager button.danger:disabled{
    color:#a8b0bd;
    border-color:#e5e7eb;
    background:#f8fafc;
    cursor:not-allowed;
    box-shadow:none;
    transform:none;
}

.articleManagerBackdrop[hidden]{
    display:none;
}

.articleManagerBackdrop{
    position:fixed;
    inset:0;
    z-index:1200;
    background:rgba(17,24,39,.22);
}

.articleManagerPanel{
    display:none;
}

body.articleManagerOpen .articleManagerPanel{
    position:fixed;
    top:78px;
    right:24px;
    z-index:1201;
    width:min(calc(var(--editor-width,100vw) * .92), calc(100vw - 48px));
    display:grid;
    margin:0;
    border:1px solid rgba(17,24,39,.12);
    border-radius:12px;
    background:#ffffff;
    box-shadow:0 22px 60px rgba(15,23,42,.22);
}

.copyStyleModal[hidden]{
    display:none;
}

.copyStyleModal{
    position:fixed;
    inset:0;
    z-index:1200;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:rgba(17,24,39,.42);
}

.copyStyleDialog{
    width:min(520px,100%);
    max-height:min(680px,calc(100vh - 48px));
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border:1px solid rgba(17,24,39,.12);
    border-radius:12px;
    background:#ffffff;
    box-shadow:0 22px 60px rgba(15,23,42,.24);
}

.copyStyleHeader{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:18px 20px 14px;
    border-bottom:1px solid #eef1f5;
}

.copyStyleHeader h3{
    margin:0 0 6px;
    color:#111827;
    font-size:18px;
    line-height:1.2;
}

.copyStyleHeader p{
    margin:0;
    color:#6b7280;
    font-size:13px;
    line-height:1.4;
}

.copyStyleCloseBtn{
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    border:1px solid #d7dce3;
    border-radius:8px;
    background:#ffffff;
    color:#4b5563;
    font-size:20px;
    line-height:1;
    cursor:pointer;
}

.copyStyleArticleList{
    overflow:auto;
    padding:10px 12px;
}

.copyStyleArticleOption{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:12px 10px;
    border-radius:8px;
    cursor:pointer;
}

.copyStyleArticleOption:hover{
    background:#f8fafc;
}

.copyStyleArticleOption input{
    width:16px;
    height:16px;
    margin-top:2px;
    flex:0 0 auto;
}

.copyStyleArticleText{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:4px;
}

.copyStyleArticleText strong{
    color:#111827;
    font-size:14px;
    line-height:1.3;
    overflow-wrap:anywhere;
}

.copyStyleArticleText span{
    color:#6b7280;
    font-size:12px;
    line-height:1.4;
    overflow-wrap:anywhere;
}

.copyStyleEmpty{
    padding:24px 12px;
    color:#6b7280;
    font-size:14px;
    text-align:center;
}

.copyStyleActions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:14px 20px 18px;
    border-top:1px solid #eef1f5;
}

.copyStyleActions button{
    height:34px;
    padding:0 14px;
    border:1px solid #d7dce3;
    border-radius:8px;
    background:#ffffff;
    color:#4b5563;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}

.copyStyleApplyBtn{
    border-color:#111827 !important;
    background:#111827 !important;
    color:#ffffff !important;
}

.changelogModal[hidden]{
    display:none;
}

.changelogModal{
    position:fixed;
    inset:0;
    z-index:1200;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:rgba(17,24,39,.42);
}

.changelogDialog{
    width:min(560px,100%);
    max-height:min(720px,calc(100vh - 48px));
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border:1px solid rgba(17,24,39,.12);
    border-radius:12px;
    background:#ffffff;
    box-shadow:0 22px 60px rgba(15,23,42,.24);
}

.changelogHeader{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:18px 20px 14px;
    border-bottom:1px solid #eef1f5;
}

.changelogHeader h3{
    margin:0 0 6px;
    color:#111827;
    font-size:18px;
    line-height:1.2;
}

.changelogHeader p{
    margin:0;
    color:#6b7280;
    font-size:13px;
    line-height:1.4;
}

.changelogCloseBtn{
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    border:1px solid #d7dce3;
    border-radius:8px;
    background:#ffffff;
    color:#4b5563;
    font-size:20px;
    line-height:1;
    cursor:pointer;
}

.changelogContent{
    overflow:auto;
    padding:4px 20px 18px;
    color:#374151;
    font-size:14px;
    line-height:1.7;
}

.androidAppContent{
    min-height:0;
    padding:16px 20px 18px;
    background:#ffffff;
}

.androidAppOptions{
    display:grid;
    gap:10px;
}

.androidAppOption{
    min-width:0;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:16px;
    padding:14px;
    border:1px solid #eef1f5;
    border-radius:12px;
    background:#ffffff;
}

.androidAppOption h4{
    margin:0 0 4px;
    color:#111827;
    font-size:14px;
    line-height:1.4;
}

.androidAppOption p{
    margin:0;
    color:#6b7280;
    font-size:12px;
    line-height:1.55;
}

.androidAppDownloadLink{
    min-height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 12px;
    border:1px solid #111827;
    border-radius:8px;
    background:#111827;
    color:#ffffff;
    font-size:12px;
    font-weight:700;
    line-height:1;
    text-decoration:none;
    transition:background-color .16s ease,border-color .16s ease;
}

.androidAppDownloadLink:hover{
    border-color:#374151;
    background:#374151;
}

.androidAppDownloadLink:focus-visible{
    outline:3px solid rgba(17,24,39,.18);
    outline-offset:2px;
}

.androidAppGroupNumber{
    min-height:34px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:0 10px;
    border:1px solid #d7dce3;
    border-radius:8px;
    background:#f8fafc;
    color:#6b7280;
    font-size:11px;
}

.androidAppGroupNumber strong{
    color:#111827;
    font-family:inherit;
    font-size:13px;
    letter-spacing:.02em;
    user-select:all;
}

@media (max-width:700px){
    .androidAppContent{
        padding:14px 16px 16px;
    }

    .androidAppOption{
        grid-template-columns:minmax(0,1fr);
        gap:12px;
    }

    .androidAppDownloadLink,
    .androidAppGroupNumber{
        width:100%;
    }

    .androidAppGroupNumber{
        justify-content:space-between;
    }
}

@media (prefers-reduced-motion:reduce){
    .androidAppDownloadLink{
        transition:none;
    }
}

.changelogLoading,
.changelogError,
.changelogEmpty{
    margin:22px 0 4px;
    color:#6b7280;
    text-align:center;
}

.changelogError{
    color:#b42318;
}

.changelogVersion{
    padding:16px 0;
    border-bottom:1px solid #eef1f5;
}

.changelogVersion:last-child{
    border-bottom:none;
}

.changelogVersion h4{
    margin:0 0 10px;
    color:#111827;
    font-size:15px;
    line-height:1.35;
}

.changelogVersion.latest h4::after{
    content:"最新";
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:8px;
    padding:2px 7px;
    border-radius:999px;
    background:#fee2e2;
    color:#b91c1c;
    font-size:11px;
    font-weight:700;
    line-height:1.2;
    vertical-align:middle;
}

.changelogVersion ul{
    margin:0;
    padding-left:1.25em;
}

.changelogVersion li{
    margin:0 0 6px;
}

.changelogVersion p{
    margin:0 0 8px;
}

.changelogActions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:14px 20px 18px;
    border-top:1px solid #eef1f5;
}

.changelogActions button{
    height:34px;
    padding:0 14px;
    border:1px solid #111827;
    border-radius:8px;
    background:#111827;
    color:#ffffff;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}

.editorHeaderActions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    min-width:0;
}

.editorHeaderButtonRow{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}

.mobileEditorTabs{
    display:none;
}

.mobileExportWarning{
    display:none;
}

#timelineToggleBtn,
#articleManagerBtn,
#bottomWatermarkToggleBtn,
#monthTitleToggleBtn,
#underlineToggleBtn,
#paragraphDividerToggleBtn,
#sideHeaderToggleBtn,
#subtitlePositionToggleBtn,
#phonePreviewToggleBtn,
#changelogBtn,
#androidAppBtn,
#donateBtn{
    padding:7px 14px;
    font-size:13px;
    white-space:nowrap;
    border:1px solid #d7dce3;
    border-radius:9999px;
    background:#ffffff;
    color:#4b5563;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    transition:background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s;
}

#timelineToggleBtn:hover,
#articleManagerBtn:hover,
#bottomWatermarkToggleBtn:hover,
#monthTitleToggleBtn:hover,
#underlineToggleBtn:hover,
#paragraphDividerToggleBtn:hover,
#sideHeaderToggleBtn:hover,
#subtitlePositionToggleBtn:hover,
#phonePreviewToggleBtn:hover,
#changelogBtn:hover,
#androidAppBtn:hover,
#donateBtn:hover{
    background:#f8fafc;
    border-color:#cbd5e1;
    color:#111827;
    box-shadow:0 4px 10px rgba(15,23,42,.06);
    transform:translateY(-1px);
}

#articleManagerBtn{
    margin-left:auto;
    padding:7px 14px;
    font-size:13px;
    line-height:1.25;
    font-weight:700;
}

#changelogBtn,
#androidAppBtn{
    padding:4px 9px;
    font-size:11px;
    line-height:1.2;
    font-weight:700;
}

#donateBtn{
    padding:4px 9px;
    border-color:#fecaca;
    background:#fff7f7;
    color:#b91c1c;
    font-size:11px;
    line-height:1.2;
}

#donateBtn:hover{
    background:#fff1f1;
    border-color:#fca5a5;
    color:#991b1b;
}

.editItem{
    margin-bottom:16px;
    padding:14px;
    border:1px solid #eef1f5;
    border-radius:18px;
    background:#ffffff;
    box-shadow:0 1px 2px rgba(15,23,42,.03);
}

.phonePreviewPanel[hidden]{
    display:none;
}

.phonePreviewPanel{
    width:328px;
    min-width:328px;
    max-width:328px;
    flex-shrink:0;
    height:100vh;
    overflow:auto;
    padding:22px;
    background:linear-gradient(180deg,#fcfcfd 0%,#ffffff 100%);
    border-left:1px solid rgba(17,24,39,.08);
    box-shadow:-16px 0 32px rgba(15,23,42,.06);
}

.phonePreviewHeader{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
    flex-wrap:wrap;
}

.phonePreviewHeader label{
    margin-bottom:0;
    font-weight:700;
    color:#374151;
    font-size:16px;
}

.phonePreviewZoom{
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.phonePreviewZoom button{
    width:30px;
    height:30px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    margin:0;
    border-radius:8px;
    font-size:16px;
    line-height:1;
}

#phonePreviewScaleValue{
    min-width:42px;
    text-align:center;
    color:#6b7280;
    font-size:12px;
    font-weight:700;
}

.phoneResolutionPanel{
    margin-bottom:12px;
}

.phoneResolutionSelect{
    width:100%;
    min-width:0;
    padding:9px 10px;
    font-size:14px;
    color:#374151;
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:10px;
    outline:none;
}

.resolutionHint{
    margin-top:8px;
    color:#8b93a7;
    font-size:12px;
    line-height:1.5;
}

.phoneRenderHost{
    position:fixed;
    left:-100000px;
    top:0;
    width:360px;
    min-height:0;
    pointer-events:none;
    z-index:-1;
}

.phoneRenderPoster{
    width:100%;
    margin:0;
    padding:var(--poster-top-padding,58px) 24px 30px;
    min-height:0;
}

.phoneRenderPoster .posterHeader{
    max-width:var(--headline-title-max-width, calc(100% - 52px));
}

.phoneRenderPoster .posterYear{
    padding:0;
}

.phoneRenderPoster .posterSubtitle{
    margin-top:var(--subtitle-gap-to-title,10px);
    margin-left:var(--text-side-spacing,0px);
    letter-spacing:var(--subtitle-letter-spacing,.28em);
}

.phoneRenderPoster.subtitleVerticalLeft .posterSubtitle{
    top:var(--subtitle-vertical-top,28px);
}

.phoneRenderPoster .posterSide{
    top:var(--poster-top-padding,58px);
    right:calc(20px + var(--text-side-spacing,0px) + var(--side-header-reserve,0px));
}

.phoneRenderPoster .card{
    padding-left:34px;
}

.phoneRenderPoster .card::before{
    left:10px;
}

.phoneRenderPoster .card::after{
    left:5px;
}

.phoneMockup{
    width:calc(240px * var(--phone-preview-scale, 1));
    margin:0 auto;
    padding:10px;
    border-radius:30px;
    background:#111827;
    box-shadow:0 18px 36px rgba(15,23,42,.18);
}

.phoneScreen{
    width:100%;
    aspect-ratio:1080 / 2376;
    overflow:hidden;
    border-radius:22px;
    background:#efefef;
    position:relative;
}

@supports not (aspect-ratio: 1 / 1){
    .phoneScreen{
        height:0;
        padding-top:220%;
    }
}

.phoneBackgroundCanvas{
    position:absolute;
    inset:0;
    z-index:0;
    width:100%;
    height:100%;
    pointer-events:none;
}

.phoneBackgroundCanvas[hidden]{
    display:none;
}

.phoneStatusBar{
    position:absolute;
    top:0;
    left:0;
    right:0;
    z-index:5;
    display:flex;
    align-items:center;
    justify-content:space-between;
    height:22px;
    padding:0 12px;
    color:rgba(17,24,39,.82);
    font-size:8px;
    font-weight:700;
    line-height:1;
    pointer-events:none;
}

.phoneTopPadding{
    position:absolute;
    top:0;
    left:0;
    right:0;
    z-index:3;
    background:transparent;
}

.phoneStatusIcons{
    display:flex;
    align-items:center;
    gap:4px;
}

.phoneSignal,
.phoneWifi,
.phoneBattery{
    display:block;
    border:1px solid currentColor;
}

.phoneSignal{
    width:10px;
    height:7px;
    border-top:none;
    border-left:none;
}

.phoneWifi{
    width:9px;
    height:6px;
    border-bottom:none;
    border-radius:9px 9px 0 0;
}

.phoneBattery{
    width:13px;
    height:7px;
    border-radius:2px;
    position:relative;
}

.phoneBattery::after{
    content:"";
    position:absolute;
    right:-3px;
    top:2px;
    width:2px;
    height:3px;
    background:currentColor;
    border-radius:0 1px 1px 0;
}

.phoneCanvasWrap{
    position:absolute;
    left:0;
    right:0;
    z-index:2;
    overflow-y:auto;
    overflow-x:hidden;
    background:transparent;
}

.phoneCanvas{
    position:absolute;
    top:0;
    left:0;
    transform-origin:top left;
}

.phonePosterClone{
    flex:none;
}

.phoneWatermark{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    z-index:4;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1;
    background:transparent;
}

.phoneCanvasWrap::-webkit-scrollbar,
.phoneScreen::-webkit-scrollbar{
    width:0;
}

.editItem label,
.inlineLabel{
    font-weight:600;
    color:#374151;
    font-size:15px;
}

.editItem label{
    display:block;
    margin-bottom:8px;
}

.colorControlGroup + .colorControlGroup{
    margin-top:14px;
}

.sizeValue{
    display:inline-block;
    margin-left:8px;
    padding:2px 8px;
    border-radius:999px;
    background:#eef2ff;
    color:#4f7cff;
    font-size:12px;
    font-weight:700;
    vertical-align:middle;
}

.editItem input,
.editItem textarea{
    width:100%;
    padding:10px 12px;
    font-size:16px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#fff;
    outline:none;
}

.editItem input::placeholder,
.editItem textarea::placeholder,
.block input::placeholder,
.block textarea::placeholder{
    color:#b8c0cc;
    opacity:1;
}

.editItem input:focus::placeholder,
.editItem textarea:focus::placeholder,
.block input:focus::placeholder,
.block textarea:focus::placeholder{
    color:transparent;
}

.block textarea.cardTitleInput:focus::placeholder{
    color:#b8c0cc;
}

.editItem textarea,
.block textarea{
    min-height:44px;
    resize:vertical;
    overflow:hidden;
    line-height:1.55;
    font-family:inherit;
    white-space:pre-wrap;
}

.fontSelect{
    width:100%;
    min-width:0;
    padding:10px 12px;
    font-size:16px;
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    outline:none;
}

.blockFontSelect{
    margin:4px 0 10px;
    font-size:15px;
}

.headlineFontRow{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 38px;
    gap:8px;
    align-items:stretch;
    margin:4px 0 10px;
}

.sideHeadlineFontRow{
    grid-template-columns:minmax(0,1fr) 38px;
}

.headlineFontRow .blockFontSelect{
    height:38px;
    margin:0;
    padding:8px 10px;
}

.titleColorButton.richTextColorButton{
    width:38px;
    height:38px;
    flex:0 0 38px;
    margin:0;
}

.headlineAlignControls .textAlignControls{
    grid-template-columns:repeat(3,minmax(0,1fr));
    margin:0;
}

.headlineAlignControls .textAlignControls button{
    width:100%;
    height:38px;
    padding:8px 0;
}

.textAlignControls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin:0 0 10px;
}

.textAlignControls button{
    margin:0;
    padding:8px 10px;
    color:#4b5563;
    font-size:13px;
    background:#ffffff;
    border:1px solid #d1d5db;
}

.textAlignControls button.active{
    color:#ffffff;
    background:#111827;
    border-color:#111827;
}

.textAlignControls button:disabled{
    cursor:not-allowed;
    color:#9ca3af;
    background:#f3f4f6;
    border-color:#e5e7eb;
}

.fontStatus{
    min-height:18px;
    margin-top:8px;
    color:#6b7280;
    font-size:12px;
    line-height:1.5;
}

.inlineFontLoader{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin-top:8px;
}

.inlineFontLoader button{
    margin:0;
    padding:8px 12px;
}

.inlineFontLoader .fontStatus{
    margin-top:0;
}

.importedFontList{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin-top:8px;
}

.importedFontItem{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-height:34px;
    padding:6px 8px;
    border:1px solid #e5e7eb;
    border-radius:8px;
    background:#ffffff;
}

.importedFontName{
    min-width:0;
    color:#374151;
    font-size:13px;
    line-height:1.35;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.importedFontRemoveBtn{
    flex:0 0 auto;
    margin:0;
    padding:5px 8px;
    color:#991b1b;
    font-size:12px;
    border:1px solid #fecaca;
    border-radius:7px;
    background:#fff7f7;
}

.importedFontRemoveBtn:hover{
    color:#7f1d1d;
    background:#fee2e2;
}

.spacingControls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}

.spacingControls label{
    margin-bottom:0;
    font-size:13px;
}

.spacingControls input{
    margin-top:8px;
}

.blockSpacingControls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin:8px 0 10px;
}

.blockSpacingControls label{
    display:block;
    margin:0;
    font-size:13px;
    font-weight:600;
    line-height:1.3;
    color:#374151;
}

.blockSpacingControls input{
    width:100%;
    height:38px;
    margin-top:6px;
    margin-bottom:0;
    padding:8px 10px;
    font-size:14px;
}

.mobileStepper{
    display:block;
}

.mobileStepperButton{
    display:none;
}

.bgPalette{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
    padding:6px 0 2px;
}

.colorSwatch{
    width:32px;
    height:32px;
    border-radius:6px;
    border:1px solid #d8d8d8;
    background:var(--swatch);
    box-shadow:0 1px 2px rgba(0,0,0,.08);
    position:relative;
    flex:0 0 auto;
    padding:0;
    margin:0;
}

.colorSwatch.active{
    border:2px solid #4f7cff;
    box-shadow:0 0 0 3px rgba(79,124,255,.2);
}

.customSwatch{
    background:#fafafa;
    border:1px dashed #c8c8c8;
}

.customColorPanel{
    position:relative;
    max-width:210px;
    margin-top:5px;
    padding:6px;
    border:1px solid #d7dde8;
    border-radius:6px;
    background:#ffffff;
    box-shadow:0 10px 24px rgba(15,23,42,.12);
}

.customColorPanel::before{
    content:"";
    position:absolute;
    top:-6px;
    right:15px;
    width:10px;
    height:10px;
    border-top:1px solid #d7dde8;
    border-left:1px solid #d7dde8;
    background:#ffffff;
    transform:rotate(45deg);
}

.customColorField{
    position:relative;
    height:58px;
    border:1px solid #d7dde8;
    border-radius:6px;
    background:
        linear-gradient(0deg,#000 0%,rgba(0,0,0,0) 100%),
        linear-gradient(90deg,#fff 0%,rgba(255,255,255,0) 100%),
        hsl(var(--picker-hue,0),100%,50%);
    cursor:crosshair;
    touch-action:none;
}

.customColorFieldCursor{
    position:absolute;
    left:calc(var(--picker-saturation,0) * 1%);
    top:calc((100 - var(--picker-value,100)) * 1%);
    width:10px;
    height:10px;
    border:2px solid #ffffff;
    border-radius:50%;
    box-shadow:0 0 0 1px rgba(15,23,42,.45),0 1px 4px rgba(15,23,42,.32);
    transform:translate(-50%,-50%);
    pointer-events:none;
}

.customHueRange{
    width:100%;
    margin:4px 0 4px;
    accent-color:#4f7cff;
}

.customColorInputs{
    display:grid;
    grid-template-columns:30px minmax(0,1fr);
    gap:5px;
    align-items:center;
}

.customColorPreviewChip{
    height:24px;
    border:1px solid #d7dde8;
    border-radius:6px;
    background:var(--picker-color,#efefef);
}

.customHexInput,
.customRgbInputs input{
    width:100%;
    min-width:0;
    border:1px solid #d7dde8;
    border-radius:6px;
    background:#ffffff;
    color:#111827;
    font:inherit;
    font-size:11px;
    line-height:1.2;
    padding:4px 6px;
}

.customRgbInputs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
    margin-top:5px;
}

.customRgbInputs label{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:3px;
    align-items:center;
    margin:0;
    color:#4b5563;
    font-size:10px;
    font-weight:700;
}

.customColorActions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:5px;
    margin-top:6px;
    padding-top:6px;
    border-top:1px solid #eef1f5;
}

.customColorActions button{
    border:1px solid #d7dde8;
    border-radius:6px;
    font:inherit;
    font-size:11px;
    font-weight:700;
    line-height:1;
    padding:6px 7px;
    cursor:pointer;
}

.customColorPanel.richTextColorMode .customColorActions{
    grid-template-columns:2fr 1fr 1fr;
}

.customColorResetGlobal{
    background:#ffffff;
    color:#374151;
}

.customColorCancel{
    background:#ffffff;
    color:#374151;
}

.customColorApply{
    border-color:#4f7cff;
    background:#4f7cff;
    color:#ffffff;
}

.customColorResetGlobal:hover,
.customColorCancel:hover{
    border-color:#b8c4d6;
    background:#f8fafc;
}

.customColorApply:hover{
    border-color:#3f6cf5;
    background:#3f6cf5;
}

.customColorModalBackdrop{
    position:fixed;
    inset:0;
    z-index:3000;
    background:rgba(15,23,42,.36);
}

.plusMark{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#666666;
    font-size:22px;
    font-weight:normal;
}

.backgroundImagePanel{
    margin-top:12px;
}

.backgroundImagePanel label{
    margin-bottom:8px;
}

.backgroundImageControlGrid{
    display:grid;
    grid-template-columns:max-content minmax(0, 1fr);
    column-gap:16px;
    align-items:center;
    width:392px;
    max-width:100%;
}

.backgroundImageControlGrid label{
    margin-bottom:8px;
}

.backgroundImageOpacityHeader{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}

.backgroundImageOpacityHeader span{
    min-width:34px;
    text-align:right;
    color:#8b93a7;
    font-size:12px;
    line-height:1.4;
    font-variant-numeric:tabular-nums;
}

.hiddenFileInput{
    position:absolute;
    width:1px;
    height:1px;
    opacity:0;
    pointer-events:none;
}

.backgroundImageActions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.backgroundImageActions button{
    margin:0;
}

.backgroundImageOpacityControl{
    min-width:0;
    color:#4b5563;
    font-size:12px;
    line-height:1.4;
}

.backgroundImageOpacityControl input{
    -webkit-appearance:none;
    appearance:none;
    width:100%;
    height:22px;
    min-width:0;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    outline:none;
}

.backgroundImageOpacityControl input:disabled{
    opacity:.45;
}

.backgroundImageOpacityControl input::-webkit-slider-runnable-track{
    height:6px;
    border-radius:999px;
    background:linear-gradient(
        to right,
        #1283f6 0,
        #1283f6 var(--background-image-opacity-progress, 100%),
        #d1d5db var(--background-image-opacity-progress, 100%),
        #d1d5db 100%
    );
}

.backgroundImageOpacityControl input::-webkit-slider-thumb{
    -webkit-appearance:none;
    width:22px;
    height:22px;
    margin-top:-8px;
    border:0;
    border-radius:50%;
    background:#1283f6;
    box-shadow:0 1px 3px rgba(15,23,42,.18);
}

.backgroundImageOpacityControl input::-moz-range-track{
    height:6px;
    border-radius:999px;
    background:#d1d5db;
}

.backgroundImageOpacityControl input::-moz-range-progress{
    height:6px;
    border-radius:999px;
    background:#1283f6;
}

.backgroundImageOpacityControl input::-moz-range-thumb{
    width:22px;
    height:22px;
    border:0;
    border-radius:50%;
    background:#1283f6;
    box-shadow:0 1px 3px rgba(15,23,42,.18);
}

@media (max-width: 560px){
    .backgroundImageControlGrid{
        grid-template-columns:1fr;
        row-gap:8px;
    }
}

.backgroundImageStatus{
    margin-top:8px;
    color:#8b93a7;
    font-size:12px;
    line-height:1.5;
}

.backgroundImagePreview{
    position:relative;
    overflow:hidden;
    width:100%;
    height:88px;
    margin-top:10px;
    border:1px solid #e5e7eb;
    border-radius:8px;
    background-color:#f8fafc;
}

.backgroundImagePreview::before{
    content:"";
    position:absolute;
    inset:0;
    background-image:var(--background-image-preview-url);
    background-position:center;
    background-size:auto;
    background-repeat:repeat;
    opacity:var(--background-image-preview-opacity, 1);
}

/* ===========================
   Buttons
=========================== */

button{
    padding:6px 12px;
    margin-left:5px;
    margin-bottom:5px;
    cursor:pointer;
    border:1px solid #dbe1ea;
    border-radius:10px;
    background:#ffffff;
    color:#374151;
}

button:hover{
    background:#f4f6fa;
}

.addBlockActions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:20px 0 10px;
    padding-top:16px;
    border-top:1px solid #eef1f5;
}

.addBlockActions button{
    width:100%;
    margin:0;
    padding:11px;
}

#addBtn{
    background:#4f7cff;
    color:#ffffff;
    border:none;
    box-shadow:0 8px 18px rgba(79,124,255,.24);
}

#addBtn:hover{
    background:#3f6cf5;
}

#addImageBtn{
    background:#0f8fa8;
    color:#ffffff;
    border:none;
    box-shadow:0 8px 18px rgba(15,143,168,.22);
}

#addImageBtn:hover{
    background:#0b7f95;
}

.cardSortAction{
    margin:0 0 12px;
}

.cardSortAction button{
    width:100%;
    margin:0;
    padding:11px;
}

#cardSortModeBtn{
    border:1px solid #cbd5e1;
    background:#f8fafc;
    color:#334155;
    font-weight:700;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
}

#cardSortModeBtn:hover{
    border-color:#94a3b8;
    background:#f1f5f9;
    color:#111827;
    box-shadow:0 4px 10px rgba(15,23,42,.06);
}

#cardSortModeBtn.active{
    border-color:#273449;
    background:#273449;
    color:#ffffff;
    box-shadow:0 8px 18px rgba(39,52,73,.18);
}

.paragraphDisplayActions{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
    margin:0 0 20px;
}

.paragraphDisplayActions button{
    margin:0;
}

.currentWordCount{
    width:100%;
    min-width:126px;
    margin:0;
    padding:8px 12px;
    border:1px solid rgba(219,225,234,.96);
    border-radius:8px;
    background:rgba(255,255,255,.96);
    color:#374151;
    font-size:13px;
    font-weight:700;
    line-height:1.4;
    text-align:center;
    box-shadow:0 10px 22px rgba(15,23,42,.14);
}

.mobileCurrentWordCount{
    display:none;
}

.mobilePreviewToolbar{
    display:none;
}

.mobileFontDebugBtn{
    display:none;
}

#exportBtn,
#exportSlicesBtn{
    width:100%;
    padding:11px;
    margin-bottom:12px;
    cursor:pointer;
    background:#111827;
    color:#ffffff;
    border:none;
}

#exportSlicesBtn{
    margin-bottom:20px;
    background:#273449;
}

#exportBtn:hover,
#exportSlicesBtn:hover{
    background:#1f2937;
}

.previewExportActions{
    position:fixed;
    right:var(--preview-actions-right,18px);
    bottom:18px;
    z-index:20;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    align-items:stretch;
    gap:10px;
    width:fit-content;
    margin:0;
    pointer-events:none;
}

.previewExportBtn{
    pointer-events:auto;
    margin:0;
    padding:11px 16px;
    border:none;
    border-radius:12px;
    background:#111827;
    color:#ffffff;
    font-size:14px;
    font-weight:700;
    box-shadow:0 12px 26px rgba(15,23,42,.22);
}

.previewExportBtn.secondary{
    background:#273449;
}

.previewExportBtn:hover,
.previewExportBtn.secondary:hover{
    background:#1f2937;
}

.mobileExportBtn{
    display:none;
}

.mobileTypesetRefreshBtn{
    display:none;
}

.mobileExportPreview[hidden]{
    display:none;
}

.mobileExportPreview{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:0;
    z-index:10000;
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    width:100%;
    height:100%;
    color:#f8fafc;
    background:#111315;
    font-family:"Microsoft YaHei",Arial,sans-serif;
}

.mobileExportPreviewHeader{
    display:grid;
    grid-template-columns:44px minmax(0,1fr) auto;
    grid-template-areas:
        "close heading zoom"
        "pager pager pager";
    align-items:center;
    gap:8px 12px;
    padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px;
    border-bottom:1px solid rgba(255,255,255,.12);
    background:rgba(17,19,21,.96);
}

.mobileExportPreviewClose{
    grid-area:close;
    width:44px;
    height:44px;
    margin:0;
    padding:0;
    border:1px solid rgba(255,255,255,.16);
    border-radius:50%;
    color:#f8fafc;
    background:#24282c;
    font-size:28px;
    font-weight:300;
    line-height:1;
}

.mobileExportPreviewHeading{
    grid-area:heading;
    min-width:0;
}

.mobileExportPreviewHeading h2,
.mobileExportPreviewHeading p{
    margin:0;
}

.mobileExportPreviewHeading h2{
    overflow:hidden;
    font-size:17px;
    line-height:1.35;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.mobileExportPreviewHeading p{
    margin-top:2px;
    color:#9da7b1;
    font-size:12px;
    line-height:1.4;
}

.mobileExportPreviewZoom{
    grid-area:zoom;
    display:flex;
    align-items:center;
    gap:4px;
    padding:3px 5px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:999px;
    color:#dce3ea;
    font-size:12px;
    font-weight:700;
    line-height:1;
}

.mobileExportPreviewZoom button{
    width:24px;
    height:24px;
    padding:0;
    border:0;
    border-radius:50%;
    background:transparent;
    color:inherit;
    font:inherit;
    font-size:17px;
    line-height:1;
}

.mobileExportPreviewZoom button:disabled{
    opacity:.35;
}

#mobileExportPreviewScaleValue{
    min-width:36px;
    text-align:center;
}

.mobileExportPreviewPager{
    grid-area:pager;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:10px;
    min-height:40px;
    padding:4px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:10px;
    background:#1a1d20;
}

.mobileExportPreviewPager[hidden]{
    display:none;
}

.mobileExportPreviewPager button{
    min-height:36px;
    margin:0;
    padding:0 12px;
    border:0;
    border-radius:7px;
    color:#f8fafc;
    background:#2a2f34;
    font-size:14px;
}

.mobileExportPreviewPager button:disabled{
    color:#68717a;
    background:transparent;
}

.mobileExportPreviewPager span{
    min-width:54px;
    color:#cbd2d9;
    font-size:13px;
    font-variant-numeric:tabular-nums;
    text-align:center;
}

.mobileExportPreviewStage{
    min-height:0;
    overflow:auto;
    padding:18px 14px 28px;
    background-color:#171a1d;
    background-image:linear-gradient(45deg,rgba(255,255,255,.025) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.025) 75%),linear-gradient(45deg,rgba(255,255,255,.025) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.025) 75%);
    background-position:0 0,12px 12px;
    background-size:24px 24px;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
}

.mobileExportPreviewImage{
    display:block;
    width:var(--mobile-export-preview-css-width,100%);
    max-width:none;
    height:auto;
    margin:0 auto;
    background:#ffffff;
    box-shadow:0 18px 48px rgba(0,0,0,.42);
}

.mobileExportPreviewFooter{
    padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px));
    border-top:1px solid rgba(255,255,255,.12);
    background:#111315;
}

.mobileExportPreviewDownload{
    width:100%;
    min-height:48px;
    margin:0;
    padding:0 20px;
    border:0;
    border-radius:12px;
    color:#101214;
    background:#f8fafc;
    font-size:16px;
    font-weight:800;
    box-shadow:0 10px 30px rgba(0,0,0,.28);
}

.mobileExportPreviewClose:focus-visible,
.mobileExportPreviewPager button:focus-visible,
.mobileExportPreviewZoom button:focus-visible,
.mobileExportPreviewDownload:focus-visible{
    outline:3px solid #8ec5ff;
    outline-offset:2px;
}

/* ===========================
   Blocks
=========================== */

.block{
    border:1px solid #eef1f5;
    padding:14px;
    margin-top:15px;
    background:#ffffff;
    border-radius:18px;
    box-shadow:0 1px 2px rgba(15,23,42,.03);
}

.block h3{
    margin-bottom:10px;
}

.blockHeader{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
}

.blockHeaderTitle{
    display:flex;
    align-items:center;
    min-width:0;
    gap:8px;
}

.cardCollapseToggle{
    width:14px;
    height:26px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    margin:0;
    padding:0;
    color:#475569;
    font-size:25px;
    line-height:1;
    border:0;
    border-radius:0;
    background:transparent;
    transform:scaleY(.58) rotate(90deg);
    transform-origin:center;
    transition:transform .16s ease, color .16s ease;
}

.cardCollapseToggle:hover{
    color:#111827;
    background:transparent;
}

.collapsedBlock .cardCollapseToggle{
    transform:scaleX(.58) rotate(0deg);
}

.sortModeBlock .cardCollapseToggle{
    width:22px;
    height:26px;
    color:#111827;
    font-size:22px;
    cursor:grab;
    transform:none;
    touch-action:none;
    user-select:none;
}

.sortModeBlock .cardCollapseToggle:hover{
    color:#4f7cff;
}

.cardSortStepControls{
    display:inline-grid;
    grid-template-columns:22px;
    gap:3px;
    flex:0 0 auto;
}

.cardSortStepControls button{
    width:22px;
    height:22px;
    margin:0;
    padding:0;
    border-color:#c9d4e6;
    border-radius:7px;
    background:#ffffff;
    color:#1f2937;
    font-size:14px;
    line-height:1;
}

.cardSortStepControls button:disabled{
    cursor:not-allowed;
    opacity:.35;
}

.cardSortDragging .cardSortHandle{
    cursor:grabbing;
}

.cardSortDragging{
    cursor:grabbing;
    user-select:none;
}

.cardSortDraggingBlock{
    opacity:.55;
}

.cardSortGhost{
    position:fixed;
    z-index:4000;
    margin:0;
    opacity:.76;
    pointer-events:none;
    box-shadow:0 18px 42px rgba(15,23,42,.24);
    transition:box-shadow .12s ease, opacity .12s ease;
}

.cardSortDropTarget{
    border-color:#4f7cff;
    box-shadow:0 0 0 2px rgba(79,124,255,.16), 0 1px 2px rgba(15,23,42,.03);
}

.recentlyMovedSortBlock{
    border-color:#4f7cff;
    background:#f8fbff;
    scroll-margin-block:28px;
    animation:recentlyMovedSortPulse 1.2s ease;
    box-shadow:0 0 0 3px rgba(79,124,255,.18), 0 10px 24px rgba(15,23,42,.08);
}

@keyframes recentlyMovedSortPulse{
    0%{
        box-shadow:0 0 0 6px rgba(79,124,255,.22), 0 14px 30px rgba(15,23,42,.11);
    }
    100%{
        box-shadow:0 0 0 3px rgba(79,124,255,.18), 0 10px 24px rgba(15,23,42,.08);
    }
}

.blockHeaderActions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.blockHeader h3{
    margin-bottom:0;
    font-size:16px;
    color:#1f2937;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.hiddenBlock{
    border-color:#dbeafe;
    background:#f8fbff;
}

.collapsedBlock .blockHeader{
    margin-bottom:0;
}

.blockBody[hidden]{
    display:none;
}

.inlineLabel{
    display:flex;
    align-items:center;
    gap:8px;
    margin:4px 0 6px;
}

.blockSizeControlRow{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin:4px 0 8px;
}

.blockSizeControlRow .inlineLabel{
    flex:1 1 auto;
    min-width:0;
    margin:0;
}

.blockSizeButtons{
    display:flex;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
}

.blockSizeButtons button{
    min-width:38px;
    margin:0;
    padding:7px 9px;
    font-size:13px;
    line-height:1;
}

.cardImageEditor{
    display:grid;
    gap:8px;
    margin-top:10px;
}

.cardImageEditorActions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    align-self:end;
}

.cardImageEditorActions button{
    margin:0;
    padding:8px 10px;
    font-size:13px;
}

.cardImageSpacingActions{
    align-self:start;
    padding-top:23px;
}

.cardImageSpacingActions button{
    height:38px;
}

.cardImageStatus{
    min-height:20px;
    color:#64748b;
    font-size:12px;
    line-height:1.5;
    word-break:break-word;
}

.cardImageUploadHint{
    margin:-4px 0 8px;
    color:#64748b;
    font-size:12px;
    line-height:1.5;
}

.cardImageEditorPreviewList{
    display:grid;
    gap:10px;
}

.cardImageEditorPreviewItem{
    display:grid;
    gap:8px;
    padding:8px;
    border:1px solid #e5e7eb;
    border-radius:6px;
    background:#ffffff;
}

.cardImageEditorPreviewName{
    min-width:0;
    overflow:hidden;
    color:#64748b;
    font-size:12px;
    line-height:1.4;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.cardImageEditorPreviewBody{
    display:grid;
    grid-template-columns:34px minmax(0,1fr) 96px;
    gap:10px;
    align-items:start;
}

.cardImageSortHandle{
    width:34px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    place-self:center;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    color:#475569;
    line-height:1;
    cursor:grab;
    touch-action:none;
    user-select:none;
}

.cardImageSortHandle span{
    width:18px;
    height:14px;
    display:block;
    margin:0 auto;
    background:linear-gradient(
        to bottom,
        currentColor 0 2px,
        transparent 2px 4px,
        currentColor 4px 6px,
        transparent 6px 8px,
        currentColor 8px 10px,
        transparent 10px 12px,
        currentColor 12px 14px
    );
    border-radius:1px;
}

.cardImageSortHandle:hover:not(:disabled){
    color:#111827;
}

.cardImageSortHandle:disabled{
    cursor:not-allowed;
    opacity:.35;
}

.cardImageSortDragging,
.cardImageSortDragging .cardImageSortHandle{
    cursor:grabbing;
    user-select:none;
}

.cardImageSortDraggingItem{
    opacity:.55;
}

.cardImageSortGhost{
    position:fixed;
    z-index:4000;
    margin:0;
    opacity:.76;
    pointer-events:none;
    box-shadow:0 18px 42px rgba(15,23,42,.24);
    transition:box-shadow .12s ease, opacity .12s ease;
}

.cardImageSortDropTarget{
    border-color:#4f7cff;
    box-shadow:0 0 0 2px rgba(79,124,255,.16), 0 1px 2px rgba(15,23,42,.03);
}

.cardImageEditorPreviewFrame{
    min-width:0;
}

.cardImageEditorPreview{
    display:block;
    width:100%;
    max-height:180px;
    object-fit:contain;
    border-radius:6px;
    background:transparent;
}

.cardImageEditorControls{
    display:grid;
    gap:7px;
    color:#64748b;
    font-size:12px;
    line-height:1.4;
}

.cardImageEditorControls label{
    display:grid;
    gap:4px;
    margin:0;
    color:#374151;
    font-size:12px;
    font-weight:600;
}

.cardImageEditorControls select{
    width:100%;
    margin:0;
    padding:6px 7px;
    font-size:12px;
}

.cardImageEditorControls > button{
    margin:0;
    padding:6px 9px;
    font-size:12px;
    line-height:1;
}

.cardImageAlignControl{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
}

.cardImageAlignControl button{
    margin:0;
    padding:6px 0;
    color:#4b5563;
    font-size:12px;
    line-height:1;
    background:#ffffff;
    border:1px solid #d1d5db;
}

.cardImageAlignControl button.active{
    color:#ffffff;
    background:#111827;
    border-color:#111827;
}

.cardImageOrderControl{
    display:none;
    gap:6px;
    margin-top:3px;
}

.cardImageOrderControl button{
    width:30px;
    height:30px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin:0;
    padding:0;
    border:1px solid #c9d4e6;
    border-radius:999px;
    background:#ffffff;
    color:#1f2937;
    font-size:15px;
    line-height:1;
}

.cardImageOrderControl button span{
    display:none;
}

.cardImageOrderControl button:hover:not(:disabled){
    border-color:#94a3b8;
    background:#f8fafc;
    color:#111827;
}

.cardImageOrderControl button:disabled{
    cursor:not-allowed;
    opacity:.35;
}

.recentlyMovedCardImage{
    border-color:#4f7cff;
    background:#f8fbff;
    scroll-margin-block:28px;
    animation:recentlyMovedCardImagePulse 1.2s ease;
    box-shadow:0 0 0 3px rgba(79,124,255,.18), 0 10px 24px rgba(15,23,42,.08);
}

@keyframes recentlyMovedCardImagePulse{
    0%{
        box-shadow:0 0 0 6px rgba(79,124,255,.22), 0 14px 30px rgba(15,23,42,.11);
    }
    100%{
        box-shadow:0 0 0 3px rgba(79,124,255,.18), 0 10px 24px rgba(15,23,42,.08);
    }
}

.deleteBtn{
    color:#c62828;
    border-color:#f2c8c8;
    background:#fff7f7;
}

.hideBtn{
    color:#2563eb;
    border-color:#bfdbfe;
    background:#eff6ff;
}

.block input,
.block textarea{
    width:100%;
    margin-top:5px;
    margin-bottom:10px;
    padding:10px 12px;
    font-size:15px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    outline:none;
}

.richTextBox{
    width:100%;
    max-height:360px;
    margin:5px 0 10px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    overflow-y:auto;
    background:#ffffff;
}

.richTextBox:focus-within{
    border-color:#b8c4d6;
    box-shadow:0 0 0 3px rgba(79,124,255,.12);
}

.richTextToolbar{
    position:sticky;
    top:0;
    z-index:2;
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
    margin:0;
    padding:7px 8px;
    border-bottom:1px solid #e5e7eb;
    background:#f8fafc;
}

.richTextToolbar button{
    width:30px;
    height:30px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    margin:0;
    border-radius:8px;
    font-size:14px;
    line-height:1;
}

.richTextToolbar button.active{
    border-color:#64748b;
    background:#e2e8f0;
    color:#111827;
}

.richTextColorButton{
    position:relative;
    width:30px;
    height:30px;
    flex:0 0 30px;
    padding:0;
    margin:0;
    border-radius:8px;
    overflow:hidden;
    color:#111827;
    font-size:16px;
    font-weight:700;
    background:#ffffff;
}

.richTextColorButton::after{
    content:"";
    position:absolute;
    left:6px;
    right:6px;
    bottom:5px;
    height:4px;
    border-radius:999px;
    background:var(--rich-text-color,#111111);
}

.customColorPanel.richTextFloatingColorPanel{
    position:fixed;
    z-index:3200;
    margin-top:0;
}

.customColorPanel.richTextFloatingColorPanel::before{
    left:calc(var(--rich-text-panel-anchor-x, 24px) - 5px);
    right:auto;
}

.richTextFontSelect{
    width:150px;
    min-width:110px;
    flex:0 1 150px;
    max-width:100%;
    height:30px;
    padding:4px 8px;
    margin:0;
    border-radius:8px;
    font-size:13px;
}

.richTextIndentButton{
    color:#334155;
}

.richTextIndentIcon{
    position:relative;
    display:block;
    width:18px;
    height:16px;
}

.richTextIndentIcon::before{
    content:"";
    position:absolute;
    left:0;
    top:2px;
    width:0;
    height:0;
    border-top:4px solid transparent;
    border-bottom:4px solid transparent;
    border-left:6px solid currentColor;
}

.richTextIndentIcon span{
    position:absolute;
    right:0;
    height:2px;
    border-radius:999px;
    background:currentColor;
}

.richTextIndentIcon span:nth-child(1){
    top:2px;
    width:9px;
}

.richTextIndentIcon span:nth-child(2){
    top:7px;
    width:13px;
}

.richTextIndentIcon span:nth-child(3){
    top:12px;
    width:9px;
}

.richTextEditor{
    width:100%;
    min-height:160px;
    padding:10px 12px;
    font-size:15px;
    outline:none;
    background:#ffffff;
    color:#111827;
    line-height:1.7;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    word-break:break-word;
    text-decoration-skip-ink:none;
    touch-action:auto;
    user-select:text;
    -webkit-user-select:text;
    -webkit-touch-callout:default;
}

.richTextEditor *{
    color:inherit !important;
    text-decoration-skip-ink:none;
    user-select:text;
    -webkit-user-select:text;
}

.richTextEditor:empty::before{
    content:attr(data-placeholder);
    color:#b8c0cc;
    pointer-events:none;
}

.richTextEditor:focus:empty::before{
    content:"";
}

.richTextEditor:focus{
    outline:none;
}

.block button{
    margin-right:5px;
}

/* ===========================
   Scrollbar
=========================== */

::-webkit-scrollbar{
    width:8px;
}

::-webkit-scrollbar-thumb{
    background:#cccccc;
}

::-webkit-scrollbar-thumb:hover{
    background:#999999;
}

/* ===========================
   Mobile Layout
=========================== */

@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px){
    body{
        flex-direction:column;
        height:var(--app-viewport-height,100vh);
        min-height:var(--app-viewport-height,100vh);
        overflow:hidden;
    }

    #preview{
        flex:0 0 var(--mobile-preview-height,50vh);
        width:100vw;
        min-height:0;
        overflow-y:auto;
        overflow-x:hidden;
        background:#f5f5f5;
    }

    body.mobilePosterPreviewMode #preview{
        flex:1 1 auto;
    }

    body.mobilePosterPreviewMode #poster{
        display:none;
    }

    .mobilePhonePreviewStage{
        display:none;
    }

    body.mobilePosterPreviewMode .mobilePhonePreviewStage{
        position:relative;
        display:block;
        width:100%;
        min-height:1px;
        overflow-x:auto;
        overflow-y:hidden;
        background:#efefef;
    }

    body.mobilePosterPreviewMode .mobilePhonePreviewStage > .phoneRenderHost{
        position:absolute;
        top:0;
        left:var(--mobile-phone-preview-left,0px);
        width:var(--mobile-phone-preview-design-width,360px);
        min-height:0;
        z-index:0;
        visibility:visible;
        transform:scale(var(--mobile-phone-preview-scale,1));
        transform-origin:top left;
    }


    .mobilePreviewToolbar{
        position:sticky;
        top:0;
        z-index:25;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        min-height:44px;
        padding:6px 12px;
        border-bottom:1px solid rgba(226,232,240,.92);
        background:rgba(245,245,245,.96);
        backdrop-filter:blur(8px);
    }

    .posterRoot{
        width:var(--mobile-poster-width,100vw);
        margin:0 auto;
        padding:var(--poster-top-padding,58px) 24px 30px;
    }

    .posterHeader{
        max-width:var(--headline-title-max-width, calc(100% - 52px));
    }

    .posterYear{
        padding:0;
    }

    .posterSubtitle{
        margin-top:var(--subtitle-gap-to-title,10px);
        margin-left:var(--text-side-spacing,0px);
        letter-spacing:var(--subtitle-letter-spacing,.28em);
    }

    .posterRoot.subtitleVerticalLeft .posterSubtitle{
        top:var(--subtitle-vertical-top,28px);
    }

    .posterSide{
        top:var(--poster-top-padding,58px);
        right:calc(20px + var(--text-side-spacing,0px) + var(--side-header-reserve,0px));
    }

    .posterCards{
        width:100%;
    }

    .posterRoot.hideSideHeader .posterCards{
        width:100%;
    }

    .cardContent{
        width:100%;
    }

    .posterRoot.hideSideHeader .cardContent{
        width:100%;
    }

    .card{
        padding-left:34px;
    }

    .card::before{
        left:10px;
    }

    .card::after{
        left:5px;
    }

    #dragBar{
        display:none;
    }

    .previewExportActions{
        display:none;
    }

    .mobileTypesetRefreshBtn,
    .mobileFontDebugBtn{
        position:static;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        flex:0 0 auto;
        min-width:64px;
        min-height:38px;
        padding:0 14px;
        border:1px solid rgba(148,163,184,.35);
        border-radius:999px;
        color:#64748b;
        background:rgba(255,255,255,.94);
        font-size:14px;
        font-weight:700;
        box-shadow:0 8px 18px rgba(15,23,42,.12);
    }

    .mobileTypesetRefreshBtn.visible{
        display:inline-flex;
    }

    .mobileFontDebugBtn{
        display:none !important;
        min-width:52px;
        padding:0 12px;
    }

    .mobileTypesetRefreshBtn:disabled{
        cursor:default;
    }

    .mobileTypesetRefreshBtn.busy{
        opacity:.72;
        pointer-events:none;
    }

    .mobileCurrentWordCount{
        display:block;
        flex:0 1 auto;
        width:auto;
        min-width:118px;
        max-width:58vw;
        margin:0;
        padding:7px 11px;
        border-radius:999px;
        font-size:13px;
        box-shadow:none;
    }

    #phonePreviewToggleBtn,
    .phonePreviewPanel{
        display:none !important;
    }

    #editor{
        display:flex;
        flex-direction:column;
        flex:1 1 auto;
        width:100% !important;
        min-width:0;
        max-width:none;
        min-height:0;
        height:auto;
        overflow-y:auto;
        padding:16px;
        border-left:none;
        border-top:1px solid rgba(17,24,39,.08);
        border-radius:18px 18px 0 0;
        box-shadow:0 -12px 28px rgba(15,23,42,.08);
        -webkit-overflow-scrolling:touch;
        overscroll-behavior:contain;
        touch-action:auto;
    }

    body.editorCollapsed #editor{
        display:block;
    }

    body.mobilePosterPreviewMode #editor{
        display:none;
    }

    #editor::before{
        display:none;
    }

    .mobileExportWarning{
        order:0;
        position:sticky;
        top:0;
        z-index:7;
        display:block;
        margin:-2px -2px 10px;
        padding:7px 10px;
        border:1px solid rgba(251,191,36,.58);
        border-radius:8px;
        background:rgba(255,251,235,.96);
        color:#92400e;
        font-size:12px;
        font-weight:700;
        line-height:1.45;
        text-align:center;
        box-shadow:0 8px 18px rgba(146,64,14,.12);
    }

    .mobileEditorTabs{
        order:2;
        position:relative;
        z-index:5;
        flex:0 0 auto;
        display:flex;
        align-items:center;
        overflow-x:auto;
        overflow-y:hidden;
        gap:6px;
        margin:2px -16px 14px;
        padding:0 16px 12px;
        background:#ffffff;
        border-bottom:1px solid rgba(17,24,39,.08);
        box-shadow:0 8px 14px rgba(15,23,42,.06);
        scrollbar-width:none;
        -webkit-overflow-scrolling:touch;
    }

    .mobileEditorTabs::-webkit-scrollbar{
        display:none;
    }

    .mobileEditorTab{
        flex:0 0 auto;
        min-width:74px;
        min-height:38px;
        margin:0;
        padding:8px 12px;
        border:1px solid #dbe2ee;
        border-radius:10px;
        color:#536075;
        background:#f8fafc;
        font-size:14px;
        font-weight:700;
        line-height:1;
    }

    .mobileEditorTab.active{
        color:#ffffff;
        border-color:#2f5fbb;
        background:#2f5fbb;
        box-shadow:0 6px 14px rgba(47,95,187,.22);
    }

    [data-mobile-panel]{
        order:3;
    }

    [data-mobile-panel]:not(.mobilePanelActive){
        display:none !important;
    }

    .customColorPanel.mobileCustomColorModal{
        position:fixed;
        left:50%;
        top:50%;
        z-index:3001;
        width:min(86vw,260px);
        max-width:min(86vw,260px);
        margin:0;
        transform:translate(-50%,-50%);
        box-shadow:0 18px 44px rgba(15,23,42,.28);
    }

    .customColorPanel.mobileCustomColorModal::before{
        display:none;
    }

    .articleManagerPanel.mobilePanelActive,
    .editItem.mobilePanelActive,
    #cardEditor.mobilePanelActive,
    .mobileExportBtn.mobilePanelActive{
        display:block;
    }

    .editorHeaderActions.mobilePanelActive{
        order:3;
        display:flex;
    }

    .mobileExportBtn{
        display:block;
    }

    .editorHeader{
        display:contents;
    }

    .editorTopActions{
        display:none;
    }

    .editorHeader h2{
        display:none;
    }

    .editorFontHint{
        display:none;
    }

    .articleManager{
        order:3;
        display:grid;
        grid-template-columns:repeat(5,auto);
        gap:5px;
        width:100%;
        max-width:none;
        padding:12px;
        margin:0 0 12px;
        justify-content:stretch;
        border-radius:12px;
    }

    .articleManager select{
        grid-column:1 / -1;
        width:100%;
        max-width:none;
        min-width:0;
    }

    .articleManager label{
        grid-column:1 / -1;
        margin-bottom:3px;
    }

    .articleManager button{
        min-width:0;
        padding:0 7px;
    }

    .articleManagerPanel.mobilePanelActive{
        display:grid;
    }

    .articlePanelActions.mobilePanelActive{
        order:4;
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:6px;
        width:100%;
        margin:0 0 12px;
        padding:10px;
        border:1px solid #eef1f5;
        border-radius:12px;
        background:#ffffff;
        box-shadow:0 1px 2px rgba(15,23,42,.03);
    }

    .articlePanelAction{
        min-width:0;
        min-height:34px;
        margin:0;
        padding:0 6px;
        overflow:hidden;
        border:1px solid #d7dce3;
        border-radius:999px;
        background:#ffffff;
        color:#4b5563;
        font-size:11px;
        font-weight:700;
        line-height:1.2;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    .articlePanelAction:active{
        background:#f1f5f9;
        border-color:#cbd5e1;
        color:#111827;
    }

    .articlePanelSupportAction{
        border-color:#fecaca;
        background:#fff7f7;
        color:#b91c1c;
    }

    .articlePanelSupportAction:active{
        border-color:#fca5a5;
        background:#fff1f1;
        color:#991b1b;
    }

    .copyStyleModal,
    .changelogModal{
        align-items:flex-end;
        padding:12px;
    }

    .copyStyleDialog,
    .changelogDialog{
        max-height:calc(var(--app-viewport-height,100vh) - 24px);
    }

    .editorHeaderActions{
        margin:0 0 14px;
        align-items:flex-start;
        justify-content:flex-start;
    }

    .editorHeaderButtonRow{
        justify-content:flex-start;
    }

    .richTextBox{
        max-height:52vh;
        display:flex;
        flex-direction:column;
        overflow:hidden;
    }

    .richTextToolbar{
        position:relative;
        top:auto;
        flex:0 0 auto;
    }

    .richTextEditor{
        flex:1 1 auto;
        min-height:180px;
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;
    }

    .editItem,
    .block{
        border-radius:12px;
        padding:12px;
    }

    .blockHeader{
        align-items:flex-start;
        gap:8px;
    }

    .blockHeaderTitle{
        flex:1 1 auto;
    }

    .cardCollapseToggle{
        width:18px;
        height:34px;
        font-size:18px;
    }

    .blockHeader h3{
        line-height:34px;
    }

    .spacingControls,
    .blockSpacingControls{
        grid-template-columns:1fr;
    }

    .spacingControls .mobileStepperField,
    .blockSpacingControls .mobileStepperField{
        display:grid;
        grid-template-columns:minmax(72px,auto) minmax(0,1fr);
        gap:10px;
        align-items:center;
    }

    .spacingControls .mobileStepperField{
        grid-template-columns:112px minmax(0,1fr);
    }

    .spacingControls .mobileStepper,
    .blockSpacingControls .mobileStepper{
        display:grid;
        grid-template-columns:40px minmax(0,1fr) 40px;
        gap:6px;
        align-items:center;
        margin:0;
    }

    .spacingControls .mobileStepperButton,
    .blockSpacingControls .mobileStepperButton{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:40px;
        height:38px;
        margin:0;
        padding:0;
        border:1px solid #d1d5db;
        border-radius:8px;
        background:#f8fafc;
        color:#111827;
        font-size:18px;
        font-weight:700;
        line-height:1;
    }

    .spacingControls .mobileStepperInput,
    .blockSpacingControls .mobileStepperInput{
        width:100%;
        min-width:0;
        margin:0;
        text-align:center;
    }

    .headlineFontRow{
        grid-template-columns:1fr 38px;
    }

    .headlineFontRow .blockFontSelect{
        grid-column:1 / -1;
    }

    .headlineFontRow .headlineAlignControls{
        grid-column:1;
    }

    .headlineFontRow .titleColorButton{
        grid-column:2;
    }

    .sideHeadlineFontRow .blockFontSelect,
    .sideHeadlineFontRow .titleColorButton{
        grid-column:auto;
    }

    .headlineAlignControls .textAlignControls{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .cardImageEditorPreviewBody{
        grid-template-columns:minmax(0,1fr) 96px;
    }

    .cardImageSortHandle{
        display:none;
    }

    .cardImageOrderControl{
        display:grid;
        grid-template-columns:1fr;
        gap:5px;
        margin-top:4px;
    }

    .cardImageOrderControl button{
        width:100%;
        height:30px;
        gap:4px;
        border-radius:8px;
        font-size:12px;
        font-weight:700;
    }

    .cardImageOrderControl button span{
        display:inline;
    }
}
