html {
  font-size: 16px;
  font-family: sans-serif;
  background: white;
}

body,
body * {
  display: block;
  background: none;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  padding: 0;
  outline: 0;
}

script {
  display: none;
}

body,
noscript {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffd658;
  transition: background 0.5s;
}

main {
  width: 100%;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  max-width: 480px;
  max-height: 720px;
  background: #fff;
}

nav {
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

ul {
  flex: 1 1 100%;
  -webkit-overflow-scrolling: touch;
}

nav,
form {
  flex: none;
  align-items: center;
  display: flex;
  > * + * {
    margin-left: 0.38rem;
  }
}

form {
  padding: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

row- {
  display: flex;
  align-items: flex-start;
}

.avatar {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  margin-left: auto;
}

[disabled] {
  opacity: 0.5;
}

[disabled] + svg {
  opacity: 0.5;
}

nav > img {
  width: 40px;
  height: 40px;
  margin-right: 4px;
}

noscript {
  width: 100vw;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

button {
  padding: 0.62rem 16px;
  font-size: 16px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

input {
  width: 100%;
  font-size: 18px;
}

input[type='file'] {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0 !important;
}

file- {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
  flex: none;
}

file- svg {
  width: 32px;
  height: 32px;
  fill: rgba(0, 0, 0, 0.5);
}

h1 {
  margin-right: auto;
  font-size: 1.38rem;
  cursor: pointer;
  text-align: center;
}

ul {
  padding: 16px;
}

empty- {
  display: none;
}

empty-:only-child {
  display: flex;
  flex-direction: column;
  margin: auto;
  text-align: center;
  padding: 16px;
  align-items: center;
}

empty- img {
  width: 50%;
}

empty- > * + * {
  margin-top: 24px;
}

ul[horizontal] {
  flex: none;
  display: flex;
  overflow-x: scroll;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

ul[vertical] {
  display: flex;
  flex-direction: column-reverse;
  height: 100%;
  overflow-y: scroll;
}

ul[vertical] > div {
  margin-top: auto;
  width: 100%;
}

ul[vertical] > div > * + * {
  margin-top: 8px;
}

welcome- {
  width: 100%;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: #fff;
}

welcome- > * + * {
  margin-top: 24px;
}

message- {
  flex: none;
  display: flex;
  border-left: 2px solid;
  font-weight: lighter;
  padding: 8px 16px;
  padding-right: 0;
  /*border-bottom: 1px solid rgba(0, 0, 0, 0.05);*/
  word-break: break-word;
  flex-direction: column;
}

message- > * + * {
  margin-top: 16px;
}

message- img {
  flex: none;
  width: 100%;
}

message- p {
  max-width: 100%;
}

p {
  line-height: 162%;
  max-width: 35ex;
  color: rgba(0, 0, 0, 0.62);
}

room- {
  flex: none;
  width: 40px;
  height: 40px;
  margin-right: 16px;
  transition: border-radius 0.3s;
}

room-:not([data-selected]) {
  border-radius: 50%;
}

alert- {
  display: flex;
  flex: none;
  padding: 16px;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-weight: bold;
  font-size: 14px;
  margin: 16px;
  cursor: pointer;
}

alert- p {
  margin-right: auto;
  max-width: 100%;
}
alert- > * + * {
  margin-left: 16px;
}

@media only screen and (min-width: 720px) {
  nav,
  ul,
  form,
  alert- {
    padding: 24px;
  }
}
