:root {
  color-scheme: light;
  font-family: ui-serif, Georgia, "Times New Roman", "Noto Serif SC", serif;
  background: #fbfaf7;
  color: #20201d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fbfaf7;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  margin-bottom: 42px;
}

.brand {
  color: #20201d;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.button-row,
.manage-row,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor {
  display: grid;
  gap: 20px;
}

.editor.compact {
  gap: 14px;
}

.title-input,
.content-input,
.password-input,
.inline-form input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #d8d2c8;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #20201d;
}

.title-input {
  min-width: 0;
  padding: 10px 0 12px;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

.content-input {
  min-height: 50vh;
  resize: vertical;
  padding: 6px 0;
  font-size: 20px;
  line-height: 1.72;
}

.password-input,
.inline-form input {
  min-width: 0;
  padding: 11px 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

.primary-button,
.ghost-button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid #20201d;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.primary-button {
  background: #20201d;
  color: #fffdf8;
}

.ghost-button {
  background: transparent;
  color: #20201d;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.page {
  max-width: 760px;
}

.page h1 {
  margin: 0 0 28px;
  overflow-wrap: anywhere;
  font-size: clamp(36px, 8vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 500;
}

.page pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 20px;
  line-height: 1.76;
}

.manage-panel {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid #ded8cd;
}

.manage-panel form + form {
  margin-top: 24px;
}

.status-view {
  padding-top: 30vh;
}

.status-view p {
  max-width: 640px;
  margin: 26px 0 0;
  font-size: 20px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 880px);
    padding-top: 18px;
  }

  .topbar {
    margin-bottom: 30px;
  }

  .button-row {
    gap: 8px;
  }

  .manage-row,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .button-row .primary-button,
  .button-row .ghost-button,
  .topbar > .ghost-button {
    width: auto;
  }

  .content-input,
  .page pre {
    font-size: 18px;
  }
}
