.tc-editor-toolbar, .tc-editor-image-tools, .tc-quill-editor, .tc-photo-grid { box-sizing: border-box; min-width: 0; }
.tc-editor-toolbar { margin: 12px 0 0; padding: 8px; border: 1px solid #e8e3df; border-radius: 8px 8px 0 0; background: #faf9f7; color: #443e39; }
.tc-editor-toolbar [hidden], .tc-editor-image-tools[hidden], .tc-editor-toolbar[hidden], .tc-existing-images[hidden] { display: none !important; }
.tc-editor-toolbar__main { display: flex; align-items: center; gap: 5px; }
.tc-editor-button { box-sizing: border-box; display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px !important; height: 38px !important; min-height: 38px; margin: 0 !important; padding: 8px !important; border: 1px solid transparent !important; border-radius: 6px !important; background: transparent !important; color: #544b46 !important; cursor: pointer; line-height: 1; touch-action: manipulation; }
.tc-editor-button svg { display: block; width: 22px !important; height: 22px !important; max-width: none; flex: none; }
.tc-editor-button .ql-stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tc-editor-button .ql-fill { fill: currentColor; }
.tc-editor-button .ql-even { fill-rule: evenodd; }
.tc-editor-button:hover, .tc-editor-button:focus-visible { background: #fff !important; border-color: #e5c0b7 !important; outline: none; }
.tc-editor-button.is-active, .tc-editor-button[aria-pressed="true"] { background: #ffede8 !important; color: #d13d2d !important; border-color: #ffc6bb !important; }
.tc-editor-toolbar__main > .tc-editor-button:last-child { margin-left: auto !important; }
.tc-editor-toolbar__more { padding: 12px 2px 4px; margin-top: 8px; border-top: 1px solid #e8e3df; }
.tc-editor-typography { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(80px, .7fr); gap: 10px; margin-bottom: 14px; }
.tc-editor-select { display: flex !important; flex-direction: column; gap: 6px; margin: 0 !important; min-width: 0; color: #756961; font-size: 11px; line-height: 1.4; font-weight: 500; }
.tc-editor-select select { box-sizing: border-box; display: block; width: 100% !important; min-width: 0 !important; max-width: none !important; height: 42px !important; margin: 0 !important; padding: 8px 25px 8px 10px !important; border: 1px solid #e0d8d2 !important; border-radius: 6px !important; background-color: #fff !important; color: #423c38; font: inherit; font-size: 14px; line-height: normal; }
.tc-editor-colors { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; color: #756961; font-size: 11px; }
.tc-editor-palette { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tc-editor-palette .tc-editor-swatch { width: 27px !important; height: 27px !important; min-width: 27px; border: 1px solid #c7bfb8; border-radius: 5px; margin: 0; padding: 0; cursor: pointer; }
.tc-editor-palette input[type="color"] { width: 36px !important; height: 30px !important; padding: 1px !important; border: 1px solid #d7ccc4; border-radius: 5px; cursor: pointer; }
.tc-editor-format-buttons { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 10px; border-top: 1px solid #e8e3df; }
.tc-editor-link { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 2px; }
.tc-editor-link input { box-sizing: border-box; flex: 1 1 160px; min-width: 0; width: auto !important; height: 40px; border: 1px solid #e1d7d0; border-radius: 6px; background: #fff; padding: 8px; font-size: 16px; }
.tc-editor-link__error { flex-basis: 100%; color: #b13a2e; font-size: 12px; }
.tc-quill-editor.ql-container { height: auto; padding: 0; border: 1px solid #e8e3df; border-top: 0; border-radius: 0 0 8px 8px; background: #fff; font-family: "TC inter", Arial, sans-serif; font-size: 16px; }
.tc-quill-editor .ql-editor { min-height: 210px; height: auto; padding: 18px 16px 24px; line-height: 1.65; overflow: visible; overflow-wrap: anywhere; word-break: normal; white-space: pre-wrap; outline: none; }
.tc-reply-editor .tc-quill-editor .ql-editor { min-height: 140px; }
.tc-composer-textarea .tc-quill-editor .ql-editor { padding-bottom: 52px; }
.tc-quill-editor:focus-within { border-color: #ecb7aa; box-shadow: 0 2px 0 #ff4b39; }
.tc-quill-editor .ql-editor p { margin: 0; }
.tc-quill-editor .ql-editor strong, .tc-quill-editor .ql-editor b, .tc-post__body strong, .tc-reply__rich strong, .tc-guide__text strong { font-weight: 700 !important; }
.tc-quill-editor .ql-editor em, .tc-guide__text em, .tc-post__body em, .tc-reply__rich em { font-style: italic; }
.tc-quill-editor .ql-editor h1 { font-size: 2em; }
.tc-quill-editor .ql-editor h2 { font-size: 1.65em; }
.tc-quill-editor .ql-editor h3 { font-size: 1.35em; }
.tc-quill-editor .ql-editor h4 { font-size: 1.15em; }
.tc-quill-editor .ql-editor h5 { font-size: 1em; }
.tc-quill-editor .ql-editor h6 { font-size: .9em; }
.tc-quill-editor .ql-editor blockquote { border-left: 3px solid #ff4b39; margin: 12px 0; padding: 8px 14px; background: #fff8f4; }
.tc-quill-editor .ql-editor .ql-code-block-container { background: #f5f3f0; border-radius: 6px; padding: 12px; font-family: "TC roboto-mono", monospace; }
.tc-quill-editor .ql-editor a { color: #c63d2e; text-decoration: underline; }
.tc-editor-image-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 8px; background: #fff5ef; border: 1px solid #f0d4c9; border-top: 0; }
.tc-editor-image-width { display: flex; flex: 1 0 100%; align-items: center; gap: 10px; margin: 0 0 4px !important; font-size: 12px; color: #66554c; }
.tc-editor-image-width input { flex: 1; width: 80px; min-width: 50px; height: 24px; accent-color: #ff4b39; }
.tc-editor-image-width output { min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.tc-quill-editor .ql-editor .tc-editor-photo { position: relative; display: block; width: 100%; max-width: 100%; margin: 20px auto; padding: 0; line-height: 0; border-radius: 8px; border: 2px solid transparent; white-space: normal; }
.tc-quill-editor .ql-editor .tc-editor-photo[data-image-align="left"] { margin-left: 0; margin-right: auto; }
.tc-quill-editor .ql-editor .tc-editor-photo[data-image-align="right"] { margin-left: auto; margin-right: 0; }
.tc-quill-editor .ql-editor .tc-editor-photo img { display: block; width: 100% !important; height: auto !important; max-height: none !important; object-fit: contain !important; border-radius: 6px; }
.tc-quill-editor .ql-editor .tc-editor-photo.is-selected { border-color: #ff4b39; }
.tc-editor-photo .tc-editor-button { position: absolute; z-index: 2; background: #fff !important; box-shadow: 0 2px 8px #31252222; border: 1px solid #e7cdc3 !important; touch-action: none; user-select: none; -webkit-user-select: none; }
.tc-editor-photo-move { left: 6px; top: 6px; cursor: grab; }
.tc-editor-photo-resize { right: -10px; bottom: -10px; cursor: nwse-resize; }
.tc-editor-photo:not(.is-selected) .tc-editor-photo-resize { visibility: hidden; }
.tc-photo-drop-before { box-shadow: 0 -3px 0 #ff4b39 !important; }
.tc-photo-drop-after { box-shadow: 0 3px 0 #ff4b39 !important; }
.tc-photo-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px !important; margin-top: 14px; }
.tc-photo-grid .tc-photo-card { position: relative; display: block; width: auto; min-width: 0; margin: 0; padding: 0; border: 1px solid #e7dfd8; border-radius: 8px; background: #faf7f3; overflow: hidden; }
.tc-photo-grid .tc-photo-card > img { display: block; width: 100%; height: 150px; aspect-ratio: auto; object-fit: contain !important; border-radius: 0; }
.tc-photo-cover { position: absolute; top: 7px; left: 7px; max-width: calc(100% - 14px); padding: 4px 7px; border-radius: 5px; background: #fff; color: #bd3b2d; font-size: 10px; line-height: 1.4; font-weight: 700; }
.tc-photo-actions { display: flex; justify-content: space-evenly; gap: 0; padding: 4px 2px; background: #fff; border-top: 1px solid #eee7df; }
.tc-photo-grid .tc-photo-actions .tc-editor-button { position: static !important; flex-basis: 32px; width: 32px !important; height: 36px !important; min-height: 36px; padding: 7px !important; }
.tc-photo-grid .tc-photo-actions .tc-editor-button svg { width: 18px !important; height: 18px !important; }
.tc-photo-handle { touch-action: none; cursor: grab; }
.tc-photo-ghost { opacity: .35; }
.tc-editor-status { margin: 8px 0; color: #b23d2e; font-size: 12px; line-height: 1.5; }
.tc-editor-status:empty { display: none; }
.tc-article-image { display: block; max-width: 100%; padding-top: 18px; padding-bottom: 18px; }
.tc-post__body .tc-article-image img, .tc-guide__text .tc-article-image img, .tc-reply__rich .tc-article-image img { display: block; width: 100%; height: auto !important; max-height: none !important; object-fit: contain !important; border-radius: 8px; }
.tc-post__body, .tc-reply__rich, .tc-guide__text { overflow-wrap: anywhere; }
.tc-post__body pre, .tc-guide__text pre, .tc-reply__rich pre { white-space: pre-wrap; padding: 10px; background: #f5f3f0; border-radius: 6px; }
.tc-post__body li, .tc-reply__rich li, .tc-guide__text li { list-style: inherit; }
.tc-post__body ol, .tc-reply__rich ol, .tc-guide__text ol { list-style: decimal; padding-left: 1.6em; }
.tc-post__body ul, .tc-reply__rich ul, .tc-guide__text ul { list-style: disc; padding-left: 1.6em; }
.tc-guide__image { object-fit: contain !important; height: auto; }

@media (max-width: 600px) {
    .tc-editor-toolbar { padding: 6px; }
    .tc-editor-toolbar__main { gap: 2px; }
    .tc-editor-typography { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .tc-editor-select select { font-size: 16px; }
    .tc-editor-typography .tc-editor-select:last-child { grid-column: 1 / -1; }
    .tc-quill-editor .ql-editor { padding: 16px 12px 22px; min-height: 190px; }
    .tc-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px !important; }
    .tc-photo-grid .tc-photo-card > img { height: 145px; }
    .tc-editor-image-tools { padding: 6px; }
    .tc-editor-image-tools .tc-editor-button { flex-basis: 35px; width: 35px !important; }
    .tc-editor-palette { gap: 7px; }
    .tc-editor-palette .tc-editor-swatch { width: 30px !important; height: 30px !important; }
}

.tc-font-inter, .tc-quill-editor .ql-font-inter { font-family: "TC inter", sans-serif; }
.tc-font-lora, .tc-quill-editor .ql-font-lora { font-family: "TC lora", sans-serif; }
.tc-font-roboto, .tc-quill-editor .ql-font-roboto { font-family: "TC roboto", sans-serif; }
.tc-font-open-sans, .tc-quill-editor .ql-font-open-sans { font-family: "TC open-sans", sans-serif; }
.tc-font-montserrat, .tc-quill-editor .ql-font-montserrat { font-family: "TC montserrat", sans-serif; }
.tc-font-lato, .tc-quill-editor .ql-font-lato { font-family: "TC lato", sans-serif; }
.tc-font-nunito, .tc-quill-editor .ql-font-nunito { font-family: "TC nunito", sans-serif; }
.tc-font-merriweather, .tc-quill-editor .ql-font-merriweather { font-family: "TC merriweather", sans-serif; }
.tc-font-source-serif-4, .tc-quill-editor .ql-font-source-serif-4 { font-family: "TC source-serif-4", sans-serif; }
.tc-font-roboto-mono, .tc-quill-editor .ql-font-roboto-mono { font-family: "TC roboto-mono", sans-serif; }
.tc-font-sans { font-family: "TC inter", sans-serif; }
.tc-font-serif { font-family: "TC lora", serif; }
.tc-font-mono { font-family: "TC roboto-mono", monospace; }
.tc-gallery__item img { object-fit: cover !important; }
.tc-photo-grid .tc-photo-card { aspect-ratio: auto; height: auto; }
