:root {
  color-scheme: light;
  --bg: #f5f5f2;
  --surface: #ffffff;
  --text: #171717;
  --muted: #777771;
  --border: #deded8;
  --accent: #171717;
  --accent-text: #ffffff;
  --focus: #b9ff4b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button, textarea { font: inherit; }

.app {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 24px;
  display: flex;
  flex-direction: column;
}

.header {
  min-height: 44px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.04em;
  font-size: 19px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: opacity .15s ease, transform .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button.primary {
  background: var(--accent);
  color: var(--accent-text);
}

.editor-shell {
  flex: 1;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .05);
}

#editor {
  width: 100%;
  flex: 1;
  min-height: 500px;
  padding: clamp(24px, 4vw, 52px);
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.72;
  tab-size: 2;
}

#editor::placeholder {
  color: #aaa9a2;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.04em;
}

#editor:focus {
  box-shadow: inset 0 0 0 2px var(--focus);
}

.statusbar {
  min-height: 50px;
  padding: 0 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.privacy {
  margin: 14px 2px 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--text);
  color: white;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: .2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 20px, 1120px);
    padding-top: 12px;
  }

  .header {
    margin-bottom: 10px;
  }

  .button {
    min-height: 34px;
    padding: 0 11px;
  }

  .button.ghost:first-child {
    display: none;
  }

  .editor-shell {
    min-height: calc(100vh - 112px);
    border-radius: 16px;
  }

  #editor {
    min-height: calc(100vh - 164px);
    padding: 22px 18px;
  }

  .statusbar {
    padding: 0 14px;
  }

  #status {
    max-width: 70%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .privacy {
    display: none;
  }
}


.signature{
  margin:16px 0 6px;
  text-align:center;
  font-size:12px;
  color:#8a8a84;
  letter-spacing:.02em;
}
