:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #172033; background: #eef2f7; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.topbar { height: 68px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: #111827; box-shadow: 0 2px 12px #11182722; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { color: #66e3c4; font-size: 28px; line-height: 1; }
.toolbar, .preview-actions { display: flex; align-items: center; gap: 9px; }
label { display: grid; gap: 7px; color: #536074; font-size: 12px; font-weight: 650; }
.toolbar label { display: flex; align-items: center; gap: 8px; color: #cbd5e1; }
select, input[type=color], button { border: 1px solid #d6dce6; border-radius: 7px; background: #fff; color: #172033; font: inherit; }
select { height: 36px; padding: 0 10px; }
.toolbar select { height: 32px; border-color: #374151; color: #fff; background: #1f2937; }
button { height: 36px; padding: 0 13px; cursor: pointer; font-size: 12px; font-weight: 700; background: #63e0c1; border-color: #63e0c1; }
button:hover { filter: brightness(.96); transform: translateY(-1px); }
button.secondary { background: #fff; border-color: #d6dce6; }
.toolbar button.secondary { color: #e5e7eb; background: transparent; border-color: #4b5563; }
.workspace { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.35fr) 245px; gap: 18px; padding: 24px; max-width: 1600px; margin: auto; }
.panel { display: flex; flex-direction: column; min-height: calc(100vh - 140px); padding: 20px; border: 1px solid #dfe5ed; border-radius: 13px; background: #fff; box-shadow: 0 5px 18px #1f29370b; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.eyebrow { display: block; color: #718096; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.03em; }
.status { color: #16846d; font-size: 11px; font-weight: 700; }
#source { flex: 1; width: 100%; min-height: 400px; resize: none; padding: 15px; border: 1px solid #d8dee8; border-radius: 8px; outline: none; color: #dbeafe; background: #111827; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
#source:focus { border-color: #63cdb5; box-shadow: 0 0 0 3px #63e0c133; }
.hint { margin-top: 10px; color: #8490a3; font-size: 11px; }
.preview { flex: 1; display: grid; place-items: center; min-height: 400px; overflow: auto; padding: 22px; border: 1px dashed #cbd5e1; border-radius: 9px; background-image: radial-gradient(#d8dee8 1px, transparent 1px); background-size: 16px 16px; }
.preview svg { max-width: 100%; height: auto; }
.error { margin-top: 12px; padding: 11px; border-radius: 7px; color: #9f1239; background: #fff1f2; font: 11px/1.5 ui-monospace, monospace; }
.options-panel { gap: 18px; }
.options-panel input[type=color] { width: 100%; height: 38px; padding: 3px; cursor: pointer; }
.check { display: flex; align-items: center; grid-template-columns: auto 1fr; gap: 8px; }
.separator { height: 1px; background: #e6eaf0; }
.option-title { margin: 0; color: #718096; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.shortcut { display: flex; align-items: center; gap: 5px; margin: -8px 0; color: #6b7280; font-size: 11px; }
.shortcut span { margin-left: auto; }
kbd { padding: 3px 5px; border: 1px solid #d6dce6; border-bottom-width: 2px; border-radius: 4px; color: #374151; background: #f8fafc; font: 10px ui-monospace, monospace; }
.original-link { margin-top: auto; color: #147c68; font-size: 11px; font-weight: 700; text-decoration: none; }
footer { padding: 0 24px 20px; color: #8a95a6; text-align: center; font-size: 11px; }
@media (max-width: 1050px) { .workspace { grid-template-columns: 1fr 1fr; } .options-panel { grid-column: 1 / -1; min-height: auto; } }
@media (max-width: 700px) { .topbar { height: auto; flex-wrap: wrap; gap: 12px; padding: 16px; } .toolbar { width: 100%; flex-wrap: wrap; } .workspace { grid-template-columns: 1fr; padding: 12px; } .panel { min-height: 560px; } .options-panel { grid-column: auto; min-height: auto; } }
@media print {
  @page { size: auto; margin: 12mm; }
  body { background: #fff; }
  .topbar, .source-panel, .options-panel, footer, .preview-actions, .error { display: none !important; }
  .workspace { display: block; padding: 0; }
  .preview-panel { display: block; min-height: auto; padding: 0; border: 0; box-shadow: none; }
  .preview-panel .panel-heading { margin-bottom: 16px; }
  .preview { display: block; min-height: 0; overflow: visible; padding: 0; border: 0; background: #fff !important; }
  .preview svg { display: block; width: 100%; max-height: 250mm; }
}
