:root {
  --bg: #141414;
  --bg-slip: #181818;
  --msg: #e4e4e4;
  --name: #e4e4e48d;
  --meta: #e4e4e45e;
  --green: #3fa266;
  --blue: #7bafe9;
  --warn: #f1b467;
  --stroke: #e4e4e433;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--msg);
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  text-transform: lowercase;
}

button,
input {
  font: inherit;
  text-transform: lowercase;
  color: inherit;
  background: none;
  border: 0;
}

textarea,
.slip-body,
.slip-quote,
.quote-preview,
.row .body,
.share-page .body,
.share-page .q {
  text-transform: none;
}

a {
  color: var(--meta);
  text-decoration: none;
}

a:hover {
  color: var(--msg);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100%;
  max-width: 32rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 0;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.25rem 0 1rem;
}

.empty {
  color: var(--meta);
  text-align: center;
  padding: 2rem 0;
}

.slip {
  --frame: var(--blue);
  background: var(--bg-slip);
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}

.slip:hover,
.slip.selected {
  border-top-color: var(--frame);
  border-bottom-color: var(--frame);
}

.slip-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.slip-name {
  color: var(--name);
  font-size: 0.8rem;
}

.slip-meta {
  color: var(--meta);
  font-size: 0.75rem;
}

.slip-quote {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--meta);
  font: inherit;
  font-size: 0.85rem;
  border-left: 2px solid var(--frame);
  padding: 0.35rem 0.6rem;
  margin-bottom: 0.5rem;
  background: #060606;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slip-quote:hover {
  color: var(--frame);
}

.slip-body {
  color: var(--msg);
  white-space: pre-wrap;
  word-break: break-word;
}

.slip-actions {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.slip-actions .share {
  justify-self: start;
}

.slip-actions .reply {
  justify-self: center;
}

.slip-actions .karma {
  justify-self: end;
}

.karma {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.karma button {
  color: var(--meta);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.1rem 0.15rem;
}

.karma button.up.on {
  color: var(--green);
}

.karma button.down.on {
  color: var(--warn);
}

.karma .score {
  color: var(--meta);
  font-size: 0.75rem;
  min-width: 1.25rem;
  text-align: center;
}

.text-btn,
.slip-actions button {
  color: var(--meta);
  font-size: 0.75rem;
  cursor: pointer;
}

.text-btn:hover {
  color: var(--blue);
}

.slip-actions button:hover,
.slip-actions button.on:hover,
.slip-actions .score:hover {
  color: var(--frame);
}

.composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  border-top: 1px solid var(--stroke);
  padding-top: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--bg);
}

.quote-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  background: #060606;
  border-left: 2px solid var(--frame, var(--blue));
  padding: 0.4rem 0.6rem;
}

.quote-preview {
  color: var(--meta);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

textarea {
  font: inherit;
  width: 100%;
  resize: none;
  background: var(--bg-slip);
  padding: 0.7rem 0.8rem;
  color: var(--msg);
  outline: none;
  border: 0;
  min-height: 4.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--meta) var(--bg-slip);
}

textarea::-webkit-scrollbar {
  width: 6px;
}

textarea::-webkit-scrollbar-track {
  background: var(--bg-slip);
}

textarea::-webkit-scrollbar-thumb {
  background: var(--meta);
  border-radius: 999px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: var(--name);
}

textarea:focus {
  outline: 1px solid var(--blue);
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status {
  flex: 1;
  color: var(--meta);
  font-size: 0.8rem;
}

.status.warn {
  color: var(--warn);
}

.count {
  color: var(--meta);
  font-size: 0.8rem;
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.brand {
  justify-self: start;
  color: var(--meta);
  font-size: 0.85rem;
}

.you {
  justify-self: center;
  color: var(--name);
  font-size: 0.85rem;
  text-align: center;
}

#send {
  justify-self: end;
  color: var(--green);
  cursor: pointer;
  padding: 0.2rem 0;
  font-weight: 500;
}

#send:disabled {
  color: var(--warn);
  cursor: default;
}

.turnstile {
  width: 100%;
  overflow: visible;
  text-transform: none;
  transform: none;
}

.reveal {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  z-index: 5;
}

.reveal-name {
  font-size: 1.6rem;
  color: var(--msg);
  text-align: center;
}

.reveal button {
  color: var(--green);
  cursor: pointer;
  margin-top: 1rem;
}

.share-page {
  min-height: 100%;
}

.share-page .col {
  max-width: 32rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.share-page .body {
  white-space: pre-wrap;
  word-break: break-word;
}

.share-page .q {
  color: var(--meta);
  border-left: 2px solid var(--blue);
  padding: 0.35rem 0.6rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.thread {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1rem;
  z-index: 6;
  overflow: auto;
}

.thread-sheet {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  background: var(--bg-slip);
  padding: 1rem 0.9rem 1.1rem;
  border: 1px solid var(--stroke);
}

.thread-kicker {
  color: var(--meta);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.thread-kicker + .slip-name {
  margin-bottom: 0.35rem;
}

.thread .slip-body {
  margin-bottom: 1.1rem;
}

.thread-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

#thread-share:hover {
  color: var(--msg);
}

#thread-close {
  justify-self: end;
  color: var(--green);
  cursor: pointer;
}

.share-page .meta,
.share-page .actions {
  color: var(--meta);
  font-size: 0.85rem;
}
