* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: #000;
}

body {
  max-width: 40em;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  color: #000;
  font-family:
    "MS Gothic",
    "MS Mincho",
    monospace;
  line-height: 1.8;
}

main {
  width: 100%;
}

header {
  margin-bottom: 2.25em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-weight: normal;
}

h1 {
  margin-bottom: 0.15em;
  font-size: 1.2em;
}

h2 {
  margin-bottom: 0.35em;
  font-size: 1em;
}

section {
  margin: 1.5em 0;
}

button,
input {
  font: inherit;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6em;
}

input[type="text"] {
  width: 100%;
  min-width: 0;
  padding: 0.25em 0.35em;
  border: 1px solid #000;
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: #000;
}

input[type="text"]:focus-visible {
  outline: 1px solid #000;
  outline-offset: 3px;
}


button {
  margin: 0;
  padding: 0.15em 0.6em;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  cursor: pointer;
}

button:hover,
button:active {
  background: #000;
  color: #fff;
}

button:focus-visible {
  outline: 1px solid #000;
  outline-offset: 3px;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
  background: #fff;
  color: #000;
}

.text-button {
  padding: 0;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.text-button:hover,
.text-button:active {
  background: #fff;
  color: #000;
  text-decoration-thickness: 2px;
}

.note,
.message,
time {
  font-size: 0.9em;
}

.note {
  margin-bottom: 0;
}

.message {
  margin: 0.25em 0 0;
}

.message:empty {
  display: none;
}

.timeline {
  margin-top: 2.5em;
}

.timeline-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  border-bottom: 1px solid #000;
}

.timeline-heading h2 {
  margin-bottom: 0.2em;
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post {
  padding: 0.85em 0 0.7em;
  border-bottom: 1px solid #000;
}

.post-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-meta {
  margin-top: 0.15em;
}


@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .input-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .input-row button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
