/* R3 independent entry, using existing FreeChat semantic tokens. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--fc-text-primary); background: var(--fc-bg-canvas); font: 16px/1.6 "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
main, .ow-top, footer { max-width: 1280px; margin: auto; padding: 24px; }
.ow-top, .ow-heading, .ow-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ow-top { border-bottom: 1px solid var(--fc-line-subtle); }
.ow-top > div { min-width: 0; }
.ow-top nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ow-top nav a { white-space: nowrap; }
h1, h2, h3, p { margin-top: 0; overflow-wrap: anywhere; }
h1 { margin-bottom: 0; }
.ow-top p { margin-bottom: 0; color: var(--fc-text-tertiary); }
.ow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.ow-card { min-width: 0; padding: 24px; border: 1px solid var(--fc-line-subtle); border-radius: var(--fc-radius-lg); background: var(--fc-bg-surface); }
#ow-auth { max-width: 560px; margin: 24px auto; }
form { display: grid; gap: 8px; margin-bottom: 24px; }
button, input, select, textarea { font: inherit; min-width: 0; min-height: 48px; border: 1px solid var(--fc-line-strong); border-radius: var(--fc-radius-md); padding: 8px 12px; background: var(--fc-bg-surface); color: var(--fc-text-primary); }
select { width: 100%; max-width: 100%; }
button { cursor: pointer; }
button:hover { background: var(--fc-bg-hover); }
button:disabled { opacity: .6; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--fc-focus-ring); outline-offset: 3px; }
textarea { min-height: 140px; resize: vertical; }
.ow-note, footer { color: var(--fc-text-tertiary); font-size: 14px; }
.ow-actions { justify-content: flex-start; }
.ow-check { display: flex; gap: 12px; align-items: center; }
.ow-check input { width: 22px; min-height: 22px; flex-shrink: 0; }
#ow-status { max-width: 1232px; margin: 16px auto; padding: 16px; border-left: 4px solid var(--fc-brand-solid); background: var(--fc-bg-surface); overflow-wrap: anywhere; }
#ow-status[data-error="true"] { border-color: var(--fc-danger); color: var(--fc-danger); }
#ow-files button { width: 100%; text-align: left; margin-bottom: 8px; overflow-wrap: anywhere; }
#ow-versions, #ow-ai-responses, #ow-call-detail { white-space: pre-wrap; overflow-wrap: anywhere; }
#ow-editor { padding-top: 24px; border-top: 1px solid var(--fc-line-subtle); }
.ow-social { grid-column: 1 / -1; }
#ow-drafts button, #ow-friend-groups button, #ow-references button { margin: 0 8px 8px 0; max-width: 100%; overflow-wrap: anywhere; }
#ow-reference-detail, #ow-metadata-result { white-space: pre-wrap; overflow-wrap: anywhere; }
#ow-draft-published { white-space: pre-wrap; overflow-wrap: anywhere; }
#ow-draft-publish-form { padding-top: 16px; border-top: 1px solid var(--fc-line-subtle); }
#ow-deliveries button { margin: 0 8px 8px 0; max-width: 100%; }
#ow-publish-detail { white-space: pre-wrap; overflow-wrap: anywhere; }
#ow-history { margin-top: 24px; }
#ow-history-manifest { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.ow-history-warning { padding: 12px; border-left: 3px solid var(--fc-danger); }
#ow-history-result { white-space: pre-wrap; overflow-wrap: anywhere; }
.ow-notification { padding: 16px 0; border-top: 1px solid var(--fc-line-subtle); }
.ow-notification[data-read="false"] { border-left: 3px solid var(--fc-brand-solid); padding-left: 12px; }
.ow-notification p, #ow-notification-coverage { white-space: pre-wrap; overflow-wrap: anywhere; }
#ow-notification-coverage { font-size: 13px; }
.ow-media { margin-top: 16px; display: grid; gap: 12px; }
.ow-media figure { margin: 0; min-width: 0; padding: 12px; border: 1px solid var(--fc-line-subtle); border-radius: var(--fc-radius-md); }
.ow-media figcaption { font-size: 13px; overflow-wrap: anywhere; }
.ow-media video { display: block; width: 100%; max-height: 300px; background: var(--fc-bg-canvas); }
#ow-remote-media { display: grid; gap: 12px; }
#ow-call-state[data-state="error"], #ow-call-state[data-state="disconnected"] { color: var(--fc-danger); }
@media (max-width: 960px) { .ow-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { main, .ow-top, footer { padding: 12px; } .ow-card { padding: 16px; } .ow-actions button { flex: 1 1 10ch; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
