:root {
  color-scheme: light dark;
  font-family: Arial, sans-serif;
  background: #f6f7f9;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f7f9;
  color: #1f2933;
}

button,
.file-button {
  border: 1px solid #b8c2cc;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2933;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 10px 12px;
}

button:hover,
.file-button:hover {
  border-color: #52606d;
}

code,
pre,
textarea {
  font-family: Consolas, Menlo, monospace;
}

.default-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  width: min(720px, calc(100vw - 40px));
  margin: 0 auto;
}

.default-shell h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

.default-shell p {
  margin: 0;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.6;
}

.converter-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 100vh;
  padding: 16px;
}

.panel {
  min-width: 0;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border-bottom: 1px solid #d9e2ec;
}

.panel-header h1,
.panel-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf2f7;
  color: #334e68;
  font-size: 12px;
  line-height: 1;
  padding: 7px 9px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #d9e2ec;
}

#markdown-file {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

#markdown-input {
  display: block;
  width: 100%;
  min-height: calc(100vh - 154px);
  resize: none;
  border: 0;
  outline: 0;
  padding: 16px;
  font-size: 14px;
  line-height: 1.55;
  background: #fbfdff;
  color: #1f2933;
}

.markdown-preview {
  min-height: calc(100vh - 58px);
  padding: 20px;
  overflow: auto;
  font-size: 16px;
  line-height: 1.65;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
  line-height: 1.2;
  letter-spacing: 0;
}

.markdown-preview pre {
  overflow: auto;
  border-radius: 6px;
  background: #102a43;
  color: #f0f4f8;
  padding: 12px;
}

.markdown-preview code {
  border-radius: 4px;
  background: #edf2f7;
  padding: 2px 4px;
}

.markdown-preview pre code {
  background: transparent;
  padding: 0;
}

.markdown-preview blockquote {
  margin: 0 0 16px;
  border-left: 4px solid #9fb3c8;
  padding-left: 12px;
  color: #486581;
}

@media (max-width: 900px) {
  .converter-shell {
    grid-template-columns: 1fr;
  }

  #markdown-input,
  .markdown-preview {
    min-height: 45vh;
  }
}

@media (prefers-color-scheme: dark) {
  :root,
  body {
    background: #111827;
    color: #f9fafb;
  }

  button,
  .file-button,
  .panel {
    background: #1f2937;
    color: #f9fafb;
    border-color: #4b5563;
  }

  #markdown-input {
    background: #111827;
    color: #f9fafb;
  }

  .panel-header,
  .toolbar {
    border-color: #374151;
  }

  .status-pill,
  .markdown-preview code {
    background: #374151;
    color: #f9fafb;
  }
}
