:root {
  font-family: Helvetica, Arial, system-ui, sans-serif;
  color: #111;
  background: #f5f5f2;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f5f5f2; }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 40px; }
header { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #111; font-size: 24px; line-height: 1; }
h1 { margin: 0; font-size: 20px; letter-spacing: .08em; font-weight: 700; }
.mode { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #111; margin-bottom: 28px; }
.mode button { border: 0; background: transparent; padding: 12px 14px; font-size: 12px; letter-spacing: .12em; cursor: pointer; }
.mode button + button { border-left: 1px solid #111; }
.mode button.active { background: #111; color: #fff; }
.field-block { margin-bottom: 22px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.field-head label, .field-head span { font-size: 10px; letter-spacing: .12em; }
.field-head span { color: #777; letter-spacing: .04em; }
textarea, input { width: 100%; border: 1px solid #b9b9b3; border-radius: 0; background: #fff; color: #111; outline: none; }
textarea:focus, input:focus { border-color: #111; }
textarea { min-height: 180px; resize: vertical; padding: 14px; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
input { height: 46px; padding: 0 14px; }
.primary { width: 100%; height: 48px; border: 1px solid #111; background: #111; color: #fff; letter-spacing: .14em; font-size: 12px; cursor: pointer; margin: 2px 0 28px; }
.primary:disabled { opacity: .55; cursor: wait; }
.output-block textarea { min-height: 210px; background: #efefeb; }
.text-button { border: 0; padding: 0; background: transparent; color: #111; font-size: 10px; letter-spacing: .12em; cursor: pointer; }
.text-button:disabled { color: #aaa; cursor: default; }
.foot-actions { min-height: 24px; display: flex; align-items: start; justify-content: space-between; gap: 18px; }
#status { margin: 0; min-height: 16px; font-size: 11px; color: #666; }
#status.error { color: #9b1c1c; }
@media (max-width: 520px) {
  .shell { width: min(100% - 24px, 760px); padding-top: 28px; }
  header { margin-bottom: 26px; }
  textarea { min-height: 160px; }
}
