@font-face {
  font-family: 'Emoji';
  src: local('Apple Color Emoji'),
       local('Gecko Emoji'),
       local('Noto Sans Emoji'),
       local('Segoe UI Emoji'),
       local('Segoe UI Symbol'),
       local('Noto Sans Symbols');
}

* {
  box-sizing: border-box;
  font-family: 'Noto Sans JP', 'Noto Color Emoji', 'Emoji', sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

body {
  background-color: black;
  color: white;
}

a {
  color: yellow;
}

a:visited {
  color: orange;
}

th {
  min-width: 3rem;
  padding: 0;
}

input, textarea {
  border-radius: .25rem;
  border: 2px inset;
  margin: .25rem;
}

button {
  appearance: none;
  color: black;
  margin: .25rem;
  padding: .25rem .5rem;
  border-radius: .5rem;
  background-color: silver;
  box-shadow: inset 4px 4px 4px rgba(255, 255, 255, 0.6),
    inset -4px -4px 4px rgba(0, 0, 0, 0.4);
}

button:hover {
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.6),
    inset -2px -2px 4px rgba(0, 0, 0, 0.4);
}

button:active {
  box-shadow: inset -2px -2px 4px rgba(255, 255, 255, 0.4),
    inset 2px 2px 4px rgba(0, 0, 0, 0.8);
  transform: translateY(2px);
}

img {
  max-width: 100%;
  max-height: 100dvh;
  object-fit: scale-down;
}

.answer {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center
}

.label {
  display: inline-block;
}

.label > span {
  white-space: nowrap;
}

.post {
  display: flex;
  margin: .25rem;
}

.name {
  text-align: right;
  min-width: 6rem;
  padding: .25rem 0;
  color: lime;
}

.balloon {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  background-color: rgba(255, 255, 255, .125);
  border-radius: .25rem;
  padding: .25rem;
}

.message {
  flex-grow: 1;
  flex-basis: auto;
  word-break: break-all;
  overflow-wrap: break-word;
  word-wrap: break-word;
  line-break: anywhere;
  white-space: pre-wrap;
  white-space: break-spaces;
} 

.date {
  align-self: end;
  font-size: 50%;
}

.unsent {
  align-self: end;
}

#preview .name {
  color: green;
}

#preview .message {
  color: gray;
}

#preview .date {
  color: gray;
}

#hints > div, #hints-all > div {
  max-width: 30rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

#footer {
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
}

body.light {
  background-color: white;
  color: black;
}

body.light a {
  color: blue;
}

body.light a:visited {
  color: purple;
}

body.light .name {
  color: green;
}

body.light .balloon {
  background-color: rgba(0, 0, 0, .125);
}

body.light #preview .name {
  color: lime;
}

body.light #preview .message {
  color: gray;
}

body.light #preview .date {
  color: gray;
}