.mc { --mc-accent: #f2cf72; --mc-action-bottom: calc(.5rem + env(safe-area-inset-bottom)); max-width: 76rem; padding-bottom: 9rem; }
body:has(.bottom-nav) .mc { --mc-action-bottom: calc(4.85rem + env(safe-area-inset-bottom)); }
.mc[data-mode=library] { padding-bottom: 1rem; }
.mc :focus-visible { outline: 2px solid var(--mc-accent); outline-offset: 3px; }
.mc :is(textarea, input, select, details, #mc-output) { scroll-margin-block: 7rem 13rem; }
.mc [hidden] { display: none !important; }
.mc h1 { font: 600 clamp(1.4rem, 5vw, 2rem)/1.15 var(--sans); letter-spacing: -.035em; margin: 0 0 .35rem; }
.mc h2 { font: 650 1.2rem/1.3 var(--sans); margin-bottom: .7rem; }
.mc h3 { font-size: 1rem; }
.mc-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem; margin: 0 0 .5rem; }
.mc-heading-title { min-width: 0; }
.mc-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .85rem; text-decoration: none; }
.mc-intro { color: var(--muted); font-size: .9rem; }
.mc-guest { margin-bottom: .5rem; color: var(--muted); }
.mc-heading .eyebrow { margin-bottom: .4rem; }
.mc-heading p { margin-bottom: 0; }
.mc-tabs { display: flex; width: 100%; gap: .2rem; padding: .25rem; border: 1px solid var(--border-soft); border-radius: .85rem; background: var(--surface); }
.mc-tabs a, .mc-filter-tabs a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .5rem .65rem; border-radius: .6rem; text-decoration: none; color: var(--muted); }
.mc-tabs a { flex: 1; min-width: 0; text-align: center; font-size: .85rem; overflow-wrap: anywhere; }
.mc-tabs a[aria-current], .mc-filter-tabs a[aria-current] { background: var(--gold); color: #15120b; font-weight: 750; }
.mc-notice { padding: .85rem 1rem; border: 1px solid var(--border-soft); border-left: 3px solid var(--gold); border-radius: .65rem; font-size: .9rem; margin-bottom: 1rem; background: var(--bg-elevated); }
.mc-notice p { margin-bottom: .4rem; }
.mc-notice a { display: inline-flex; align-items: center; min-height: 44px; }
.mc-workspace { display: grid; gap: 1rem; align-items: start; }
.mc-compose-panel, .mc-output, .mc-card, .mc-empty { min-width: 0; padding: 1rem; border: 1px solid var(--border-soft); border-radius: 1rem; background: var(--bg-elevated); }
.mc-output { background: var(--surface); }
.mc label { display: grid; gap: .4rem; font-weight: 550; font-size: .9rem; color: var(--text); }
.mc input:not([type=hidden]):not([type=checkbox]):not([type=color]), .mc select, .mc textarea { width: 100%; min-width: 0; min-height: 44px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: .55rem; padding: .65rem .75rem; font: 400 1rem/1.45 var(--sans); }
.mc textarea { resize: vertical; overflow-wrap: anywhere; white-space: pre-wrap; }
.mc input[type=checkbox] { width: 1.2rem; height: 1.2rem; flex-shrink: 0; accent-color: var(--gold); }
.mc .mc-check { display: flex; gap: .7rem; align-items: center; min-height: 44px; cursor: pointer; margin: .6rem 0; }
.mc-fields { display: grid; gap: .8rem; margin-bottom: .8rem; }
.mc-two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mc-preset-bar { border-bottom: 1px solid var(--border-soft); margin-bottom: .75rem; }
.mc-preset-bar[open] { padding-bottom: .75rem; }
.mc-preset-bar>select, #mc-category { margin-bottom: .8rem; }
.mc-inline { display: grid; gap: .5rem; margin-top: .4rem; }
.mc-source-label { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.mc #mc-body { min-height: 12rem; line-height: 1.65; }
.mc-enrich, .mc-settings { border-top: 1px solid var(--border-soft); margin-top: .65rem; }
.mc-settings>input, .mc-settings>label { margin-top: .65rem; }
.mc-variables { margin-block: 1rem; padding: .85rem; background: var(--bg); border: 1px solid var(--border-soft); border-radius: .65rem; }
.mc-hint, .mc-meta { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.mc-hint { margin: .45rem 0 .75rem; }
.mc-hint a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.mc button:not(.button) { min-width: 44px; min-height: 44px; padding: .5rem .7rem; border: 1px solid var(--border-soft); border-radius: .5rem; background: var(--surface-2); color: var(--text); cursor: pointer; }
.mc button:disabled { opacity: .5; cursor: not-allowed; }
.mc .button { min-height: 44px; font-size: .9rem; text-align: center; white-space: normal; }
.mc summary { display: flex; align-items: center; min-height: 44px; padding: .5rem .25rem; font-size: .9rem; cursor: pointer; gap: .5rem; list-style: none; font-weight: 600; }
.mc summary::before { content: '+'; color: var(--mc-accent); font-size: 1.25rem; width: 1rem; flex-shrink: 0; }
.mc details[open]>summary::before { content: '−'; }
.mc summary::-webkit-details-marker { display: none; }
.mc-tools { margin-bottom: .6rem; }
.mc-quick-tools { min-width: 0; margin-top: .65rem; padding: .65rem; border: 1px solid var(--border-soft); border-radius: .75rem; background: var(--bg); }
.mc-quick-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .75rem; margin-bottom: .45rem; }
.mc-quick-heading strong { font-size: .86rem; }
.mc-quick-heading span, .mc-quick-row > span { color: var(--muted); font-size: .72rem; }
.mc-quick-row { min-width: 0; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: .4rem; align-items: center; }
.mc-quick-row + .mc-quick-row { margin-top: .35rem; }
.mc-quick-list { min-width: 0; display: flex; gap: .25rem; overflow-x: auto; overscroll-behavior-inline: contain; padding: .15rem .1rem .3rem; scrollbar-width: thin; scrollbar-color: var(--gold-dark) transparent; }
.mc button.mc-quick-tool { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; padding: .3rem; border-color: var(--border-soft); border-radius: .6rem; font-size: 1.15rem; line-height: 1; }
.mc button.mc-quick-tool:hover, .mc button.mc-quick-tool:focus-visible { border-color: var(--gold-dark); background: var(--surface-2); }
.mc-quick-tool img, .mc-quick-tool .mc-icon-unknown { width: 32px; height: 32px; object-fit: contain; }
.mc-quick-tool .mc-icon-unknown { display: grid; place-items: center; border: 1px dashed var(--border); border-radius: .35rem; color: var(--muted); font-size: 1rem; }
.mc-quick-tool > span:not(.mc-icon-unknown), .mc-quick-tool > small { display: none; }
.mc-toolbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mc fieldset.mc-toolbar { border: 0; padding: 0; margin: .6rem 0; min-width: 0; }
.mc-copy-mode { margin-bottom: .8rem; }
.mc-toolbar .mc-color { display: flex; flex-direction: row; align-items: center; gap: .4rem; font-size: .875rem; min-height: 44px; }
.mc-color input { width: 44px; height: 44px; padding: .3rem; background: var(--bg); border: 1px solid var(--border-soft); border-radius: .5rem; }
.mc-tools details { border-bottom: 1px solid var(--border-soft); }
.mc-symbols { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0 .75rem; }
.mc-icons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 18rem; overflow-y: auto; gap: .4rem; margin-block: .6rem; overscroll-behavior: contain; }
.mc-icons button { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: .3rem; text-align: left; overflow-wrap: anywhere; }
.mc-icons button img, .mc-icon-unknown { grid-row: span 3; width: 44px; height: 44px; object-fit: contain; }
.mc-icon-unknown { display: grid; place-items: center; border: 1px dashed var(--border); border-radius: .5rem; color: var(--muted); font-size: 1.4rem; }
.mc-icons button>span:not(.mc-icon-unknown), .mc-icons button>small { grid-column: 2; }
.mc-inline-icon { display: inline-block; width: 1.75em; height: 1.75em; vertical-align: middle; object-fit: contain; margin-inline: .1em; }
.mc-category-filter { grid-column: 1 / -1; }
.mc-icons span { font-size: .875rem; }
.mc-icons small { font: .8rem/1.3 ui-monospace,monospace; color: var(--muted); }
.mc-coordinates { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding-bottom: .75rem; }
.mc-preview-panel { background: var(--bg); border: 1px solid var(--border-soft); border-radius: .8rem; overflow: hidden; }
.mc-preview-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .75rem; background: var(--surface-2); }
.mc-preview-heading h2 { font-size: 1rem; margin: 0; }
.mc-preview { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; min-height: 10rem; max-height: 26rem; overflow-y: auto; font-size: 1rem; line-height: 1.65; }
.mc-preview:empty::before { content: attr(data-empty); color: var(--muted); }
.mc-count { display: block; margin-block: .7rem; font-size: .85rem; color: var(--muted); }
.mc-count.is-over { color: var(--danger); }
.mc-copy-options { border-top: 1px solid var(--border-soft); }
.mc-preview .mc-item { font-size: .875rem; border-bottom: 1px dotted var(--gold); color: var(--gold-light); }
.mc-budget { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.mc-budget label { flex: 0 1 10rem; }
.mc-budget output { flex: 1; font-size: .9rem; min-width: 8rem; padding-bottom: .75rem; }
.mc-budget output.is-over, .mc-errors, .mc-draft-line .is-error { color: var(--danger); }
.mc-errors { padding: 1rem; border: 1px solid var(--danger); border-radius: .65rem; margin-bottom: 1rem; }
.mc-errors ul { margin: 0; padding-left: 1rem; }
.mc-draft-line { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--success); min-height: 1.5rem; }
.mc-save-panel { margin-top: .75rem; border-top: 1px solid var(--border-soft); }
.mc-actionbar { position: fixed; z-index: 9; bottom: var(--mc-action-bottom); left: max(.65rem, env(safe-area-inset-left)); right: max(.65rem, env(safe-area-inset-right)); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; padding: .6rem; margin-top: 1rem; border: 1px solid var(--border); border-radius: .85rem; background: var(--surface); box-shadow: 0 -4px 20px #0004; }
.mc[data-mode=editor] .mc-actionbar:has([data-save-message]) { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr) minmax(0,1.1fr); }
.mc-actionbar .button { padding-inline: .5rem; font-size: .85rem; }
.mc-audience-badge { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; text-align: center; overflow-wrap: anywhere; }
.mc-status { margin: .5rem 0; font-size: .95rem; color: var(--gold-light); }
.mc-status:not(:empty) { position: fixed; bottom: calc(var(--mc-action-bottom) + 6.5rem); left: max(.65rem, env(safe-area-inset-left)); right: max(.65rem, env(safe-area-inset-right)); z-index: 10; background: var(--bg); padding: .75rem; border: 1px solid var(--gold); border-radius: .6rem; }
.mc[data-mode=library] .mc-status:not(:empty) { bottom: var(--mc-action-bottom); }
.mc-filter-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; }
.mc-filter-tabs a { border: 1px solid var(--border-soft); font-size: .9rem; }
.mc-search { display: grid; gap: .5rem; grid-template-columns: minmax(0,1fr) auto; align-items: end; padding: .85rem; background: var(--surface); border-radius: .8rem; margin-block: .75rem; }
.mc-search-query { grid-column: 1 / -1; }
.mc-search>.button { grid-column: 1 / -1; }
.mc-search-filters, .mc-search .mc-reset { grid-column: 1 / -1; }
.mc-search-filters .mc-fields { grid-template-columns: 1fr; }
.mc-library-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: .5rem 1rem; margin-bottom: .75rem; }
.mc-library-summary>p { margin-block: .75rem; }
.mc-library-summary .mc-copy-options { flex: 0 1 24rem; min-width: 0; border: 0; }
.mc-cards { display: grid; gap: 1rem; }
.mc-card { display: flex; flex-direction: column; }
.mc-card h2 { margin: .85rem 0 .45rem; overflow-wrap: anywhere; }
.mc-card h2 a { display: flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.mc-card-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.mc-card-meta span { padding: .25rem .5rem; border: 1px solid var(--border-soft); border-radius: .4rem; font-size: .8rem; color: var(--gold-light); }
.mc-snippet { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 .95rem/1.55 var(--sans); margin: .3rem 0 .75rem; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.mc-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.mc-card-actions form { display: inline-flex; }
.mc .mc-text-action { display: inline-flex; min-height: 44px; align-items: center; text-decoration: underline; font-size: .875rem; background: transparent; border: 0; padding: .4rem .5rem; color: var(--muted); }
.mc-pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1.25rem 0; }
.mc-reader-header { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; }
.mc-reader-header h2 { font-size: 1.4rem; overflow-wrap: anywhere; }
.mc-reader-workspace { display: grid; gap: 1rem; }
.mc-delete { border-top: 1px solid var(--border-soft); margin-top: 1.5rem; }
.mc-delete summary { color: var(--danger); }
@media (min-width: 640px) {
    .mc-inline { grid-template-columns: minmax(0,1fr) auto; }
    .mc-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mc-tabs { width: auto; }
    .mc-tabs a { flex: auto; padding-inline: 1rem; }
    .mc-search-query, .mc-search>.button { grid-column: auto; }
    .mc-search-filters .mc-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
/* The global navigation disappears at 58rem, before the editor gets two columns. */
@media (min-width: 58rem) { body:has(.bottom-nav) .mc { --mc-action-bottom: calc(.5rem + env(safe-area-inset-bottom)); } }
@media (min-width: 1024px) {
    .mc, body:has(.bottom-nav) .mc { --mc-action-bottom: .75rem; padding-bottom: 1rem; }
    .mc-heading { margin-bottom: 1rem; }
    .mc-workspace { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); }
    .mc-output { position: sticky; top: 6rem; max-height: calc(100dvh - 13rem); overflow-y: auto; }
    .mc #mc-body { min-height: 18rem; }
    .mc .mc-actionbar { position: sticky; left: auto; right: auto; bottom: .75rem; grid-template-columns: auto auto minmax(0,1fr); }
    .mc[data-mode=editor] .mc-actionbar:has([data-save-message]) { grid-template-columns: auto auto minmax(0,1fr); }
    .mc .mc-preview-link { display: none; }
    .mc-audience-badge { grid-column: auto; text-align: right; align-self: center; }
    .mc-status:not(:empty) { max-width: 40rem; left: auto; right: max(1rem,calc((100vw - 76rem)/2)); }
    .mc-reader-workspace { max-width: 50rem; margin-inline: auto; }
    .mc-reader-workspace .mc-output { position: static; max-height: none; overflow: visible; }
    .mc-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-height: 550px) { .mc-actionbar,.mc-output,.mc-status:not(:empty) { position: static !important; max-height: none; } .mc { padding-bottom: 1rem; } }
@media (prefers-reduced-motion: reduce) { .mc { scroll-behavior: auto; } }

/* One searchable library; keep the picker open for repeated insertions. */
body:has(.mc-picker[open]) { overflow: hidden; }
.mc-picker-launch { margin-block: .65rem; }
.mc .mc-picker { width: min(42rem, calc(100vw - 1rem)); max-width: calc(100vw - 1rem); height: min(48rem, calc(100dvh - 1rem)); max-height: calc(100dvh - 1rem); padding: 1rem; overflow: hidden; border: 1px solid var(--border); border-radius: 1rem; background: var(--bg-elevated); color: var(--text); }
.mc .mc-picker[open] { display: flex; flex-direction: column; gap: .65rem; }
.mc-picker::backdrop { background: rgb(0 0 0 / .7); }
.mc-picker header { display: flex; flex-shrink: 0; justify-content: space-between; align-items: center; gap: .5rem; }
.mc-picker > input { flex-shrink: 0; }
.mc-picker h2 { margin: 0; }
.mc-picker-groups { display: flex; gap: .35rem; overflow-x: auto; flex-shrink: 0; padding-block: .2rem; }
.mc-picker-groups button { white-space: nowrap; }
.mc .mc-picker-groups button[aria-pressed=true] { background: var(--gold); color: #15120b; border-color: var(--gold); }
.mc-picker-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mc-picker .mc-icons { grid-template-columns: repeat(auto-fill,minmax(74px,1fr)); margin: 0; }
.mc-picker .mc-icons button { min-height: 68px; }
.mc-picker .mc-icons span { font-size: .7rem; overflow-wrap: anywhere; }
.mc-picker .mc-icons .mc-picker-symbol { font-size: 1.6rem; }
.mc-picker footer { flex-shrink: 0; }
.mc-picker-recents:has([data-recent-tools]:not([hidden])) { margin-block: .75rem; }
.mc-picker-compatibility { margin-top: .75rem; }
.mc-picker [data-insert-status] { min-height: 2.5em; margin: .3rem 0; }
@media (max-width: 639px) { .mc .mc-picker { margin: auto auto 0; width: 100%; max-width: 100%; height: 90dvh; max-height: 90dvh; border-radius: 1rem 1rem 0 0; padding-bottom: max(.7rem, env(safe-area-inset-bottom)); } }
@media (max-height: 550px) { .mc .mc-picker { height: calc(100dvh - .5rem); max-height: calc(100dvh - .5rem); padding: .5rem; gap: .3rem; } .mc-picker h2 { font-size: 1rem; } .mc-picker [data-insert-status] { min-height: 0; margin: 0; font-size: .8rem; } }

.mc-picker .mc-picker-groups button { flex: 0 0 auto; }
.mc .mc-picker .mc-icons { max-height: none; overflow: visible; }
.mc .mc-picker .mc-icons button { display: flex; flex-direction: column; justify-content: center; text-align: center; gap: .3rem; padding: .45rem .2rem; }
.mc .mc-picker .mc-icons button img { flex: 0 0 44px; }
.mc .mc-picker .mc-icons button > span { width: 100%; }

/* UI v2 is scoped to the messages flag; the original workshop remains available. */
.mc-v2 { max-width: 74rem; }
body:has(.mc-v2)::before { background: none; }
.mc-v2 .mc-workshop-header { display: contents; }
.mc-v2 :is(.mc-desktop-label,.mc-desktop-presets,.mc-desktop-draft) { display: none; }
.mc-v2 .mc-task-bar { margin: -1rem -1rem .875rem; padding-inline: .25rem .5rem; }
.mc-v2 .mc-task-bar h1 { margin: 0; font: 600 1rem/1.2 var(--serif); letter-spacing: 0; }
.mc-v2 .mc-task-bar .task-bar-back { color: var(--muted); font-size: 1.125rem; }
.mc-v2 .mc-back-label { display: none; }
.mc-v2 .mc-task-bar .mc-mobile-presets { padding: .5rem; border: 0; background: transparent; color: var(--gold-light); font-size: .8125rem; }
.mc-v2 .mc-view-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); margin: .875rem 0; }
.mc-v2:is([data-mode=library],[data-mode=reader]) .mc-view-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mc-v2 .mc-view-tabs a { min-width: 0; min-height: 44px; padding-inline: .35rem; font-size: .8125rem; text-align: center; overflow-wrap: anywhere; }
.mc-v2 .mc-view-tabs a[aria-current] { color: var(--gold-light); background: rgb(212 168 63 / .16); font-weight: 700; }
.mc-v2 .mc-destinations { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; min-width: 0; border: 0; padding: 0; margin: 0; }
.mc-v2 .mc-destination-tile { position: relative; display: flex; align-items: center; padding: .625rem .75rem; min-height: 64px; border: 1px solid var(--border-soft); border-radius: 10px; background: transparent; cursor: pointer; }
.mc-v2 .mc-destination-tile:has(:checked) { border-color: var(--gold); background: rgb(212 168 63 / .12); color: var(--gold-light); }
.mc-v2 .mc-destination-tile:has(:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.mc-v2 .mc-destination-tile input[type=radio] { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.mc-v2 .mc-destination-tile span { display: grid; min-width: 0; gap: .15rem; }
.mc-v2 .mc-destination-tile strong { font-size: .875rem; }
.mc-v2 .mc-destination-tile small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.mc-v2 .mc-workspace { grid-template-columns: minmax(0,1fr); gap: .875rem; }
.mc-v2 .mc-compose-panel { padding: 0; border: 0; background: transparent; }
.mc-v2 .mc-output { position: static; max-height: none; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent; }
.mc-v2 .mc-source-field { position: relative; }
.mc-v2 .mc-source-field #mc-body { display: block; min-height: 17rem; padding: .875rem .875rem 2.125rem; border-color: var(--border); border-radius: 12px; background: #0f1216; line-height: 1.55; }
.mc-v2 .mc-source-count { position: absolute; right: .875rem; bottom: .65rem; max-width: calc(100% - 2rem); color: var(--gold-light); font-size: .75rem; pointer-events: none; }
.mc-v2 .mc-source-count.is-over { color: var(--danger); }
.mc-v2 .mc-insertion-chips { gap: .375rem; margin: .5rem -1rem; padding: 0 1rem; }
.mc-v2 .mc-insertion-chips .chip-insert { flex: 0 0 auto; white-space: nowrap; padding-inline: .75rem; font-size: .8125rem; color: var(--gold-light); background: transparent; border: 1px dashed var(--gold-dark); border-radius: 8px; }
.mc-v2 .mc-tool-strip { display: flex; align-items: center; gap: .25rem; min-width: 0; margin: .5rem 0; padding: .375rem; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-elevated); }
.mc-v2 .mc-quick-strip { display: flex; gap: .25rem; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.mc-v2 .mc-quick-strip::-webkit-scrollbar { display: none; }
.mc-v2 .mc-tool-strip button { flex-shrink: 0; border-color: transparent; background: transparent; }
.mc-v2 .mc-quick-strip .mc-quick-tool { padding: .25rem; }
.mc-v2 .mc-quick-strip .mc-quick-tool img { width: 30px; height: 30px; }
.mc-v2 .mc-quick-strip .mc-quick-tool > .mc-picker-symbol { display: inline; color: var(--gold-light); font-size: 1.25rem; }
.mc-v2 .mc-tool-strip .mc-all-icons { color: var(--gold-light); padding-inline: .5rem; font-size: .8125rem; font-weight: 700; }
.mc-v2 .mc-coordinate-panel { border: 1px solid var(--border-soft); border-radius: 12px; padding: .35rem .75rem; margin: .5rem 0; }
.mc-v2 .mc-coordinates { grid-template-columns: repeat(3,minmax(0,1fr)); }
.mc-v2 .mc-coordinates button { grid-column: 1 / -1; }
.mc-v2 .mc-guest { margin: .5rem 0; }
.mc-v2 .mc-guest summary, .mc-v2 .mc-draft-line { color: var(--muted); font-size: .75rem; }
.mc-v2 .mc-draft-line { justify-content: flex-end; min-height: 1.25rem; margin-block: .25rem .75rem; }
.mc-v2 .mc-draft-line:not(:has([data-draft-status]:not(:empty))):not(:has([data-retry-draft]:not([hidden]))) { display: none; }
.mc-v2 .mc-preview-panel { padding: 0; border: 0; overflow: visible; background: transparent; }
.mc-v2 .mc-preview-heading { padding: 0 0 .875rem; background: transparent; }
.mc-v2 .mc-preview-heading h2 { color: var(--gold); font-size: .6875rem; font-weight: 800; letter-spacing: .16em; line-height: 1.5; text-transform: uppercase; }
.mc-v2 .mc-game-chat { display: grid; gap: .75rem; padding: 1rem; border: 1px solid var(--border-soft); border-radius: 14px; background: #0e1a24; }
.mc-v2 .mc-chat-message { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: .625rem; align-items: start; }
.mc-v2 .mc-chat-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,var(--gold-light),var(--gold-dark)); color: #17130a; font-weight: 800; }
.mc-v2 .mc-chat-content { min-width: 0; display: grid; gap: .25rem; }
.mc-v2 .mc-chat-author { color: var(--gold-light); font-size: .75rem; overflow-wrap: anywhere; }
.mc-v2 .mc-preview { padding: .625rem .75rem; min-height: 0; max-height: none; border: 0; border-radius: 4px 12px 12px 12px; background: #1b2a36; font-size: .9375rem; line-height: 1.5; }
.mc-v2 .mc-game-chat .mc-count { margin: 0; font-size: .75rem; color: var(--success); }
.mc-v2 .mc-game-chat .mc-count.is-over { color: var(--danger); }
.mc-v2 .mc-output > .mc-copy-options { margin-block: .875rem; padding: .125rem .875rem; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--bg-elevated); }
.mc-v2 .mc-output > .mc-copy-options[open] { padding-bottom: .75rem; }
.mc-v2 .mc-output > .mc-copy-options > summary { min-height: 48px; }
.mc-v2 .mc-save-summary { margin: .875rem 0; padding: 0 .875rem; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-elevated); }
.mc-v2 .mc-save-summary > summary { justify-content: space-between; gap: .5rem; min-height: 48px; padding: .5rem 0; }
.mc-v2 .mc-save-summary > summary::before { content: none; }
.mc-v2 .mc-save-summary strong { font-size: .8125rem; }
.mc-v2 .mc-save-summary > summary > span { text-align: right; color: var(--muted); font-size: .6875rem; font-weight: 400; overflow-wrap: anywhere; }
.mc-v2 .mc-save-summary .mc-audience-badge { font-size: inherit; }
body:has(.mc-v2 .sheet[open]) { overflow: hidden; }
.mc-v2 .mc-save-fallback { margin-block: 1rem; }
.mc-v2 .mc-save-fallback .mc-fields { padding-block: .75rem; }
.mc-v2 .mc-save-sheet, .mc-v2 .mc-presets-sheet { color: var(--text); background: var(--bg-elevated); max-height: 88dvh; }
.mc-v2 :is(.mc-save-sheet,.mc-presets-sheet) > header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.mc-v2 :is(.mc-save-sheet,.mc-presets-sheet) h2 { margin: 0; font-family: var(--serif); }
.mc-v2 .mc-save-sheet > .button { width: 100%; }
.mc-v2 .mc-save-sheet[open] { display: flex; flex-direction: column; height: min(48rem,88dvh); overflow: hidden; }
.mc-v2 .mc-save-sheet > :is(header,.sheet-grip,.button) { flex-shrink: 0; }
.mc-v2 .mc-save-sheet [data-save-container] { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-bottom: 1rem; padding-inline: .2rem; }
.mc-v2 .mc-preset-gallery { display: grid; gap: .8rem; margin-block: 1rem; }
.mc-v2 .mc-preset-card { min-width: 0; padding: .9rem; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg); }
.mc-v2 .mc-preset-card h3 { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.mc-v2 .mc-preset-card p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; color: var(--muted); }
.mc-v2 .mc-preset-card .button { width: 100%; }
.mc-v2 .mc-actionbar.action-bar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .5rem; padding: .625rem max(1rem,env(safe-area-inset-right)) max(1.125rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left)); border: 0; border-top: 1px solid var(--border-soft); border-radius: 0; margin: 0; background: rgb(11 13 16 / .96); box-shadow: none; }
.mc-v2 .mc-actionbar.action-bar:not(:has([data-save-launch])) { grid-template-columns: minmax(0,1fr); }
.mc-v2 .mc-actionbar.action-bar:not(:has(> :not([hidden]))) { display: none; }
.mc-v2 .mc-actionbar.action-bar .button { min-height: 52px; padding-inline: 1rem; border-radius: 12px; font-size: .9375rem; }
body:has(.mc-v2 .action-bar) .mc-v2 { --mc-action-bottom: env(safe-area-inset-bottom); padding-bottom: 7rem; }
.mc-v2 .mc-filter-tabs { flex-wrap: nowrap; overflow-x: auto; padding-block: .2rem; }
.mc-v2 .mc-filter-tabs a { flex: 0 0 auto; }
.mc-v2 .mc-journal-context { padding: .875rem 1rem; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--bg-elevated); }
.mc-v2 .mc-journal-context h2 { margin: 0; font-size: .6875rem; line-height: 1.5; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); }
.mc-v2 .mc-journal-context details { margin-block: .25rem; }
.mc-v2 .mc-journal-context textarea { margin-top: .5rem; width: 100%; min-height: 8rem; }
.mc-v2 .mc-journal-context summary { overflow-wrap: anywhere; }
@media (min-width: 640px) {
    .mc-v2 .mc-preset-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 1024px) {
    .mc-v2 .mc-workshop-header { display: grid; grid-template-columns: minmax(7rem,1fr) auto minmax(7rem,1fr); gap: 1rem; align-items: center; min-height: 64px; margin-bottom: 1.75rem; border-bottom: 1px solid var(--border-soft); }
    .mc-v2 .mc-task-bar { display: contents; }
    .mc-v2 .mc-task-bar h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .mc-v2 .mc-task-bar .task-bar-back { grid-column: 1; grid-row: 1; font-size: .875rem; font-weight: 400; }
    .mc-v2 .mc-task-bar .task-bar-action { grid-column: 3; grid-row: 1; }
    .mc-v2 .mc-view-tabs { grid-column: 2; grid-row: 1; width: max-content; max-width: 100%; justify-self: center; grid-template-columns: repeat(3,minmax(0,auto)); margin: 0; }
    .mc-v2 .mc-view-tabs a, .mc-v2 .mc-view-tabs .mc-desktop-presets { padding-inline: 1rem; font-size: .8125rem; }
    .mc-v2 .mc-view-tabs .mc-desktop-presets { border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; }
    .mc-v2 :is(.mc-desktop-label,.mc-desktop-presets,.mc-back-label) { display: inline; }
    .mc-v2 :is(.mc-mobile-label,.mc-mobile-presets,[data-mc-tab="preview"]) { display: none; }
    .mc-v2 .mc-desktop-draft { display: block; justify-self: end; text-align: right; font-size: .75rem; color: var(--muted); }
    .mc-v2 .mc-desktop-draft.is-error { color: var(--danger); }
    .mc-v2 .mc-draft-line:not(:has(.is-error)) { display: none; }
    .mc-v2 .mc-workspace { grid-template-columns: minmax(0,1fr) 26.25rem; gap: 2.5rem; }
    .mc-v2 .mc-destinations { max-width: 26.25rem; margin-bottom: .875rem; }
    .mc-v2 .mc-source-field #mc-body { min-height: 22.5rem; padding: 1rem 1rem 2.25rem; line-height: 1.6; }
    .mc-v2 .mc-insertion-chips { flex-wrap: wrap; overflow: visible; margin: .875rem 0; padding: 0; }
    .mc-v2[data-mode=editor] .mc-output { position: sticky; top: 1rem; }
    .mc-v2 .mc-tool-strip { max-width: 36rem; margin-block: .875rem; }
    .mc-v2 :is([data-message-actions-home],[data-destination-home],[data-journal-context-home],[data-tabs-mobile-slot]):empty { display: none; }
    .mc-v2[data-mode=editor] .mc-actionbar.action-bar { position: static; width: 100%; grid-template-columns: auto auto minmax(0,1fr); align-items: center; padding: .5rem 0 0; border: 0; background: transparent; backdrop-filter: none; }
    .mc-v2[data-mode=editor] .mc-actionbar.action-bar:not(:has([data-save-launch])) { width: fit-content; grid-template-columns: auto; }
    .mc-v2 .mc-actionbar.action-bar .button { min-height: 48px; padding-inline: 1.25rem; font-size: .875rem; }
    .mc-v2 .mc-actionbar .mc-save-hint { margin: 0 0 0 .5rem; font-size: .75rem; color: var(--muted); }
    .mc-v2 .mc-save-summary { display: none; }
    body:has(.mc-v2 .action-bar) .mc-v2 { padding-bottom: 1rem; }
}

/* Secondary workshop screens use the same compact controls as the editor. */
.mc-v2 .mc-search { padding: .75rem; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-elevated); gap: .25rem .5rem; }
.mc-v2 .mc-search-query, .mc-v2 .mc-search > .button { grid-column: auto; }
.mc-v2 .mc-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mc-v2 .mc-search > .button { width: auto; min-height: 46px; padding-inline: .75rem; }
.mc-v2 .mc-search-filters > summary { font-size: .8125rem; }
.mc-v2 .mc-library-summary { align-items: center; margin-bottom: .5rem; gap: .25rem .75rem; }
.mc-v2 .mc-library-summary > p { margin: 0; font-size: .75rem; }
.mc-v2 .mc-library-summary .mc-copy-options { flex: 0 1 auto; margin: 0; padding: 0; }
.mc-v2 .mc-library-summary .mc-copy-options > summary { font-size: .75rem; }
.mc-v2 .mc-library-summary .mc-copy-options[open] { flex-basis: 100%; padding-bottom: .5rem; }
.mc-v2 .mc-card { border-radius: 12px; gap: .25rem; }
.mc-v2 .mc-card-meta { align-items: center; gap: .25rem .5rem; }
.mc-v2 .mc-card-meta span { border: 0; padding: 0; font-size: .6875rem; color: var(--muted); }
.mc-v2 .mc-card-meta span:first-child { color: var(--gold-light); }
.mc-v2 .mc-card h2 { margin: .35rem 0; font: 600 1.25rem/1.35 var(--serif); }
.mc-v2 .mc-card > .mc-meta { margin: 0 0 .5rem; font-size: .75rem; line-height: 1.6; }
.mc-v2 .mc-card-actions > .button { width: auto; flex: 1 1 auto; min-height: 44px; font-size: .8125rem; padding-inline: .5rem; }
.mc-v2 .mc-reader-content { max-width: 46rem; margin-inline: auto; }
.mc-v2 .mc-reader-header { align-items: start; margin-block: 1.25rem .75rem; }
.mc-v2 .mc-reader-header h2 { margin: 0 0 .5rem; font: 600 1.75rem/1.2 var(--serif); }
.mc-v2 .mc-reader-header p { margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; overflow-wrap: anywhere; }
.mc-v2 .mc-reader-content > .mc-notice { padding: .5rem .75rem; font-size: .8125rem; line-height: 1.6; }
.mc-v2 .mc-reader-content > .mc-meta { font-size: .75rem; margin-block: .75rem; }
.mc-v2 .mc-reader-workspace { gap: .75rem; }
.mc-v2[data-mode=reader] .mc-actionbar.action-bar { grid-template-columns: minmax(0,1fr) auto; }
.mc-v2[data-mode=reader] .mc-actionbar.action-bar > .button { font-size: .8125rem; padding-inline: .75rem; }
.mc-v2[data-mode=reader] .mc-actionbar.action-bar > .button-quiet { width: auto; }
@media (max-width: 57.99rem) and (min-height: 551px) {
    .ui-mobile-v2:has(.mc-v2 .action-bar) .analytics-consent { bottom: calc(53px + .625rem + max(1.125rem,env(safe-area-inset-bottom))); }
}
@media (max-width: 24rem) {
    body:not(.ui-mobile-v2) .mc-v2 .mc-task-bar { margin-inline: -.625rem; }
}
@media (min-width: 1024px) {
    .mc-v2 .mc-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mc-v2[data-mode=reader] .mc-actionbar.action-bar { position: static; width: 100%; padding: .75rem 0; border: 0; background: transparent; backdrop-filter: none; }
    .mc-v2[data-mode=reader] .mc-reader-header { margin-top: 0; }
}
