/* ToolPetal Discord text formatter. Builds on discord-gif.css (v2). */
.df-bar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 var(--sp-2); }
.df-bar button { min-height: 44px; min-width: 44px; padding: 0.35rem 0.7rem; font-size: var(--fs-sm); line-height: 1.1; }
.df-bar .df-sep { flex: 0 0 100%; height: 0; }
@media (min-width: 720px) { .df-bar .df-sep { flex: 0 0 auto; width: 1px; height: auto; background: var(--line); margin: 0 0.15rem; } }
.df-b { font-weight: 800; }
.df-i { font-style: italic; }
.df-u { text-decoration: underline; }
.df-s { text-decoration: line-through; }
.df-codegrp { display: inline-flex; gap: 0.35rem; align-items: stretch; }
.df-codegrp select { min-height: 44px; max-width: 8.5rem; padding: 0.3rem 0.5rem; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 10px; }
.df-ta { display: block; width: 100%; min-width: 0; box-sizing: border-box; min-height: 12rem; resize: vertical; font-family: var(--mono); font-size: 16px; line-height: 1.5; }
.df-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.4rem 1rem; margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.df-meta label { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; color: var(--ink); cursor: pointer; }
.df-meta input[type="checkbox"] { width: 20px; height: 20px; }
#df-count { font-variant-numeric: tabular-nums; font-weight: 600; }
#df-count.is-over { color: #b3261e; }
#df-countnote:not(:empty) { color: #b3261e; font-weight: 600; }
.df-sample { margin: var(--sp-2) 0 0; }
.df-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; }
.df-acts button { min-height: 48px; }
.df-status { min-height: 1.4em; margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.df-themes { margin: 0 0 var(--sp-2); }

/* Discord-like preview */
.df-chat { border-radius: 12px; padding: 0.9rem 0.9rem 1rem; background: #313338; color: #dbdee1; border: 1px solid #1e1f22; font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1rem; line-height: 1.375; overflow: hidden; }
.df-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 0.85rem; }
.df-av { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.05rem; }
.df-who { margin: 0 0 0.1rem; font-size: 1rem; line-height: 1.375; }
.df-who b { color: #f2f3f5; font-weight: 600; }
.df-who span { margin-left: 0.4rem; font-size: 0.75rem; color: #949ba4; }
.df-out { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.df-out .dm-p { white-space: normal; }
.df-out .dm-empty { color: #949ba4; font-style: italic; }
.df-out strong { font-weight: 700; }
.df-out a { color: #00a8fc; text-decoration: none; }
.df-out a:hover { text-decoration: underline; }
.df-out .dm-h { margin: 0.5rem 0 0.25rem; color: #f2f3f5; font-weight: 700; line-height: 1.375; letter-spacing: 0; }
.df-out .dm-h:first-child { margin-top: 0.15rem; }
.df-out .dm-h1 { font-size: 1.5rem; }
.df-out .dm-h2 { font-size: 1.25rem; }
.df-out .dm-h3 { font-size: 1rem; }
.df-out .dm-sub { font-size: 0.8125rem; line-height: 1.11rem; color: #949ba4; }
.df-out .dm-quote { position: relative; margin: 0.1rem 0; padding: 0 0.5rem 0 0.75rem; }
.df-out .dm-quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px; background: #4e5058; }
.df-out .dm-list { margin: 0.2rem 0; padding-left: 1.5rem; }
.df-out ul.dm-list { list-style: disc; }
.df-out ul.dm-list ul.dm-list { list-style: circle; }
.df-out .dm-list li { margin: 0 0 0.1rem; }
.df-out .dm-code { padding: 0.1em 0.25em; margin: -0.1em 0; border-radius: 4px; background: #2b2d31; font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", Monaco, "Courier New", monospace; font-size: 0.875rem; line-height: 1.1rem; white-space: pre-wrap; }
.df-out .dm-pre { margin: 0.35rem 0; padding: 0.5rem; max-width: 100%; box-sizing: border-box; overflow-x: auto; border: 1px solid #1e1f22; border-radius: 4px; background: #2b2d31; color: #dbdee1; font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", Monaco, "Courier New", monospace; font-size: 0.875rem; line-height: 1.125rem; white-space: pre-wrap; }
.df-out .dm-pre code { font: inherit; background: none; padding: 0; color: inherit; }
.df-out .dm-spoiler { border-radius: 4px; padding: 0 0.1em; background: #1e1f22; color: transparent; cursor: pointer; transition: background 0.1s; }
.df-out .dm-spoiler * { color: transparent !important; background: transparent !important; border-color: transparent !important; }
.df-out .dm-spoiler:hover { background: #111214; }
.df-out .dm-spoiler.is-open { background: rgba(255, 255, 255, 0.1); color: inherit; cursor: auto; }
.df-out .dm-spoiler.is-open * { color: revert !important; background: revert !important; }
.df-out .dm-spoiler.is-open a { color: #00a8fc !important; }
.df-out .dm-spoiler.is-open .dm-code { background: #2b2d31 !important; }

.df-chat.is-light { background: #ffffff; color: #313338; border-color: #e3e5e8; }
.df-chat.is-light .df-who b, .df-chat.is-light .dm-h { color: #060607; }
.df-chat.is-light .df-who span, .df-chat.is-light .dm-sub, .df-chat.is-light .dm-empty { color: #5c5e66; }
.df-chat.is-light .df-out a { color: #006ce7; }
.df-chat.is-light .dm-code, .df-chat.is-light .dm-pre { background: #f2f3f5; color: #313338; border-color: #e3e5e8; }
.df-chat.is-light .dm-quote::before { background: #c4c9ce; }
.df-chat.is-light .dm-spoiler { background: #e3e5e8; }
.df-chat.is-light .dm-spoiler:hover { background: #d4d7dc; }
.df-chat.is-light .dm-spoiler.is-open { background: rgba(0, 0, 0, 0.08); }
.df-chat.is-light .dm-spoiler.is-open .dm-code { background: #f2f3f5 !important; }
.df-chat.is-light .dm-spoiler.is-open a { color: #006ce7 !important; }

.df-cheat td:first-child code { white-space: pre; }
#df-step2 { border-bottom: 0; margin-bottom: var(--sp-3); padding-bottom: 0; }
