:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif;
    /* Theme values from the live Museris.com homepage. */
    --base-100: oklch(30% .022 255);
    --base-200: oklch(22% .02 255);
    --base-300: oklch(20.324% .02457 259.263);
    --content: oklch(94.649% .009875 87.472);
    --primary: oklch(45.17% .085 261.91);
    --secondary: oklch(92.555% .027965 81.47);
    --accent: oklch(85.207% .070293 76.564);
    --muted: color-mix(in oklch, var(--content) 70%, var(--base-200));
    --border: color-mix(in oklch, var(--content) 16%, var(--base-200));
    color: var(--content);
    background: var(--base-200);
    font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--secondary); }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main { max-width: 1100px; margin: auto; padding: 32px 28px; }
.intro { margin-bottom: 28px; }
h1 { font-size: 27px; font-weight: 650; letter-spacing: -.025em; margin: 0 0 12px; }
.intro > p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0; max-width: 760px; }
.format-info { margin-top: 18px; max-width: 860px; font-size: 13px; line-height: 1.7; }
.format-info summary { cursor: pointer; font-weight: 600; }
.format-info p { margin: 8px 0; color: var(--muted); }
code { color: var(--content); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--base-100); border: 1px solid var(--border); border-radius: 8px; padding: 22px; margin-bottom: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-heading h2 { font-size: 16px; font-weight: 600; margin: 0; }
label { display: block; font-size: 13px; font-weight: 550; margin: 18px 0 8px; }
.optional, .required { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 6px; }
input:not([type=file]), textarea { width: 100%; border: 1px solid var(--border); border-radius: 5px; background: var(--base-200); color: var(--content); padding: 11px 12px; font-size: 14px; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; min-height: 100px; }
input:focus, textarea:focus { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: 0; }
.hint { font-size: 12px; line-height: 1.65; color: var(--muted); margin: 0 0 10px; }
input[type=file] { width: 100%; font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
input[type=file]::file-selector-button { padding: 9px 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--base-200); color: var(--content); margin-right: 12px; cursor: pointer; }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: 12px; padding: 5px 0; text-align: left; }
.text-button:hover { text-decoration: underline; }
.add-button { margin-top: 10px; }
.alternative { border-top: 1px solid var(--border); margin-top: 18px; }
.export-bar { display: flex; align-items: center; gap: 18px; margin: 14px 0 12px; }
.primary { border: 1px solid var(--secondary); background: var(--secondary); color: var(--base-300); border-radius: 6px; font-weight: 650; font-size: 14px; padding: 13px 18px; display: flex; justify-content: space-between; gap: 22px; }
.primary:hover { background: var(--accent); border-color: var(--accent); }
.primary span { font-size: 20px; line-height: 18px; }
.export-bar .hint { font-size: 11px; margin: 0; }
#status { color: var(--accent); font-size: 13px; line-height: 1.7; }
#status:empty { display: none; }
aside { position: sticky; top: 24px; }
.preview-card { background: var(--base-100); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.portrait-area { height: 210px; background: var(--base-300); display: flex; align-items: center; justify-content: center; position: relative; }
.portrait-area img { width: 100%; height: 100%; object-fit: cover; }
#portrait-placeholder { font-size: 56px; color: var(--muted); }
.preview-badge { position: absolute; top: 14px; left: 14px; font-size: 10px; color: var(--content); background: var(--base-200); padding: 5px 8px; border-radius: 4px; }
.preview-body { padding: 22px; }
.preview-body h2 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 0 0 8px; overflow-wrap: anywhere; }
#preview-tagline { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
.preview-rule { height: 1px; background: var(--border); margin: 20px 0; }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--muted); }
.opening { font-size: 14px; color: var(--content); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; margin-bottom: 0; }
.import-help, .privacy { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 18px; }
@media (max-width: 760px) {
    main { padding: 24px 16px; }
    h1 { font-size: 24px; }
    .workspace { grid-template-columns: 1fr; gap: 18px; }
    .panel { padding: 18px; }
    aside { position: static; }
    .section-heading { flex-wrap: wrap; }
    .export-bar { gap: 12px; flex-wrap: wrap; }
    .primary { flex: 1; }
}
