* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; display: flex; flex-direction: column; min-height: 100vh; }
header { background: #fff; border-bottom: 1px solid #e0e0e0; padding: 1rem 2rem; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
header h1 { font-size: 1.5rem; font-weight: 600; }
header nav a { color: #666; text-decoration: none; font-size: .875rem; }
header nav a:hover { color: #333; }
main { flex: 1; padding: 1.5rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }
.toolbar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.mode-toggle { display: flex; background: #e9ecef; border-radius: 6px; padding: 2px; }
.mode-toggle button { border: none; background: transparent; padding: .4rem .9rem; border-radius: 4px; cursor: pointer; font-size: .875rem; color: #555; transition: all .15s; }
.mode-toggle button.active { background: #fff; color: #333; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
button { border: 1px solid #d0d0d0; background: #fff; padding: .4rem .9rem; border-radius: 6px; cursor: pointer; font-size: .875rem; color: #333; transition: background .15s; }
button:hover { background: #f0f0f0; }
.editors { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: .75rem; }
.editor-pane { display: flex; flex-direction: column; }
.editor-label { font-size: .75rem; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .35rem; }
textarea { flex: 1; min-height: 320px; resize: vertical; padding: .75rem; border: 1px solid #ddd; border-radius: 8px; font-family: 'SFMono-Regular', Consolas, monospace; font-size: .875rem; line-height: 1.6; background: #fff; color: #333; outline: none; transition: border-color .15s; }
textarea:focus { border-color: #4a9eff; }
textarea[readonly] { background: #fafafa; }
.status { font-size: .8rem; min-height: 1.2em; margin-bottom: .75rem; }
.status.error { color: #e53935; }
.status.success { color: #43a047; }
.help { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 1rem 1.25rem; font-size: .875rem; }
.help h3 { margin-bottom: .5rem; font-size: .95rem; color: #444; }
.help ul { padding-left: 1.25rem; }
.help li { margin-bottom: .3rem; line-height: 1.5; }
.help code { background: #f0f0f0; padding: .1em .35em; border-radius: 3px; font-size: .82em; }
footer { background: #fff; border-top: 1px solid #e0e0e0; padding: 1.5rem 2rem; text-align: center; color: #666; font-size: .875rem; }
footer a { color: #666; text-decoration: underline; }
@media (max-width: 768px) { .editors { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
  body { background: #1a1a1a; color: #e0e0e0; }
  header, footer { background: #2d2d2d; border-color: #404040; }
  header h1 { color: #e0e0e0; }
  header nav a { color: #999; }
  .mode-toggle { background: #3a3a3a; }
  .mode-toggle button { color: #aaa; }
  .mode-toggle button.active { background: #555; color: #e0e0e0; }
  button { background: #3a3a3a; border-color: #555; color: #e0e0e0; }
  button:hover { background: #4a4a4a; }
  textarea { background: #252525; border-color: #404040; color: #e0e0e0; }
  textarea[readonly] { background: #1e1e1e; }
  .help { background: #2d2d2d; border-color: #404040; }
  .help h3, .help li { color: #ccc; }
  .help code { background: #3a3a3a; color: #e0e0e0; }
}
