@font-face {
  font-family: Rubik;
  src: url(fonts/rubik-cyrillic-wght-normal.woff2) format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0400-052F;
}
@font-face {
  font-family: Rubik;
  src: url(fonts/rubik-latin-wght-normal.woff2) format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF;
}
:root {
  color-scheme: light;
  --ink: #243b32;
  --muted: #58685d;
  --line: #bfc8b9;
  --paper: #fdfdf4;
  --green: #285640;
  --lime: #c8e990;
  --mono: ui-monospace, "Courier New", monospace;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font:
    16px/1.45 Rubik,
    Arial,
    sans-serif;
  background-color: #edefe4;
  background-image: radial-gradient(#a6b09d77 0.8px, transparent 0.9px);
  background-size: 7px 7px;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #57895a;
  outline-offset: 2px;
}
body > header,
main,
.foot {
  width: min(1120px, calc(100% - 96px));
  margin-inline: auto;
}
.mast,
.mast-right,
.foot,
.foot span,
.brand,
.connection,
.dialog-head,
.side-top,
.chat-head,
.post-caption,
.primary,
.secondary,
.check {
  display: flex;
  align-items: center;
}
.mast {
  height: 100px;
  justify-content: space-between;
  border-bottom: 1px solid #abb7a8;
}
.brand {
  gap: 12px;
  font-size: 39px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2.6px;
}
.brand-dot,
.welcome-form h1 span {
  color: #769742;
}
.bird,
.landscape {
  image-rendering: pixelated;
}
.brand .bird {
  width: 45px;
  height: auto;
}
.mast-right {
  gap: 22px;
}
.mast time,
.connection,
.foot,
.post-caption {
  font: 13px/1.4 var(--mono);
}
.connection {
  gap: 8px;
}
.connection:before {
  content: "";
  width: 8px;
  height: 8px;
  background: #789d50;
  border: 1px solid #4e7043;
}
.connection.off:before {
  background: #bba06d;
}
.mast time {
  padding-left: 20px;
  border-left: 1px solid #aab6a5;
}
main {
  margin-block: clamp(25px, 6vh, 58px) 20px;
}
.surface {
  background: var(--paper);
  border: 1.5px solid #405747;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 4px 5px 0 #bac6b2;
}
.welcome {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  min-height: 480px;
}
.welcome-form {
  padding: clamp(30px, 4.8vw, 70px);
  align-self: center;
}
.post-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 41px;
  background: #e5efce;
  border: 1px solid #a0b586;
  border-radius: 11px;
}
.post-icon svg {
  width: 24px;
}
h1,
h2,
p {
  margin: 0;
}
.welcome-form h1 {
  font-size: clamp(54px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -4.5px;
  margin: 23px 0 9px;
  font-weight: 570;
}
.welcome-form > p,
dialog > p,
.empty p {
  color: var(--muted);
}
.welcome-form form {
  margin: 27px 0 11px;
}
.welcome-form small {
  font-size: 12px;
  color: var(--muted);
}
label:not(.check) {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 6px;
}
input:not([type="checkbox"]),
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #a4b19f;
  background: #fffff9;
  border-radius: 8px;
  padding: 12px 14px;
}
input::placeholder,
textarea::placeholder {
  color: #727d72;
}
.primary,
.secondary {
  border-radius: 8px;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 17px;
  font-weight: 520;
}
.primary {
  border: 1px solid #234432;
  background: var(--green);
  color: #fffef4;
}
.primary:hover,
.send:hover {
  background: #38674b;
}
.primary:active,
.send:active {
  transform: translateY(1px);
}
.welcome .primary,
dialog .primary {
  width: 100%;
  margin-top: 12px;
}
.welcome .primary {
  justify-content: space-between;
}
.secondary {
  background: #eef3e5;
  border: 1px solid var(--line);
}
i[data-icon],
span[data-icon]:not(.post-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.postcard {
  position: relative;
  background: #dce6c8;
  border-left: 1.5px solid #526951;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.postcard > .landscape {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.stamp {
  position: absolute;
  right: 28px;
  top: 26px;
  background: #e9eccf;
  border: 3px dotted #758c65;
  z-index: 1;
  padding: 6px 8px;
  transform: rotate(7deg);
}
.stamp canvas {
  display: block;
  width: 33px;
}
.post-caption {
  z-index: 1;
  margin: 18px 24px;
  color: #f5f4d4;
  justify-content: space-between;
  border-top: 1px dashed #a6bb90;
  padding-top: 8px;
  letter-spacing: 0.04em;
}
.foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-bottom: 20px;
}
.foot span {
  gap: 8px;
}
.foot svg {
  width: 15px;
}
.desk {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: clamp(430px, calc(100dvh - 212px), 760px);
}
.sidebar {
  display: flex;
  flex-direction: column;
  background: #f5f6ea;
  border-right: 1px solid var(--line);
  min-height: 0;
}
.side-top {
  justify-content: space-between;
  padding: 24px 20px 12px;
}
.side-top h1 {
  font-size: 26px;
  letter-spacing: -1.1px;
  font-weight: 560;
}
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #e5ebda;
}
.side-top .icon-button {
  background: var(--lime);
  border-color: #a1ba81;
}
.searchbox {
  margin: 2px 18px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf3;
  padding-left: 11px;
}
.searchbox svg {
  width: 17px;
  color: var(--muted);
}
.searchbox input {
  border: none;
  background: transparent;
  font-size: 14px;
  padding: 9px 5px;
}
.list {
  overflow: auto;
  flex: 1;
  padding: 0 9px;
}
.list-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 18px 10px;
}
.contact,
.own-profile {
  width: 100%;
  display: flex;
  text-align: left;
  align-items: center;
  gap: 11px;
  padding: 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}
.contact:hover {
  background: #e9eedd;
}
.contact.selected {
  background: #dfebd0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  border: 1px solid #b5c2ae;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 570;
  background: #d9e5cc;
  color: #314c3d;
}
.avatar[data-tone="1"] {
  background: #f1dfbe;
}
.avatar[data-tone="2"] {
  background: #ccdee0;
}
.avatar[data-tone="3"] {
  background: #e7d9e6;
}
.person {
  flex: 1;
  min-width: 0;
}
.person strong,
.person small,
.person h2 {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person strong {
  font-weight: 560;
}
.person small {
  font-size: 12px;
  color: var(--muted);
}
.person small.online:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #669644;
  margin: 0 5px 1px 0;
}
.badge {
  font: 12px var(--mono);
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--green);
  color: white;
}
.own-profile {
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 15px 18px;
}
.own-profile:hover {
  background: #eaf0df;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 22px;
  background: #fafbf1;
}
.mini-post {
  width: min(195px, 60%);
  border: 6px solid #fffef3;
  box-shadow:
    0 0 0 1px #aab79d,
    2px 3px 0 #c1cbb5;
  transform: rotate(-4deg);
  margin: 8px 0 19px;
}
.mini-post canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1.85;
  object-fit: cover;
}
.empty h2 {
  font-size: 30px;
  letter-spacing: -1.2px;
}
.empty .primary {
  margin-top: 8px;
}
.chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.chat-head {
  padding: 15px 22px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.chat-head h2 {
  font-size: 18px;
  font-weight: 550;
}
.back {
  display: none;
}
.history {
  flex: 1;
  overflow: auto;
  padding: 12px 24px;
  overflow-wrap: anywhere;
}
.date {
  text-align: center;
  color: var(--muted);
  font: 12px var(--mono);
  margin: 13px 0;
}
.bubble {
  width: fit-content;
  max-width: 85%;
  border-radius: 11px 11px 11px 2px;
  background: #eaf0e2;
  padding: 9px 13px 6px;
  margin: 5px 0;
  border: 1px solid #d3decb;
}
.bubble.mine {
  margin-left: auto;
  border-radius: 11px 11px 2px 11px;
  background: #e1edce;
  border-color: #c8d9b6;
}
.bubble p {
  white-space: pre-wrap;
}
.bubble small {
  display: block;
  text-align: right;
  color: #52684f;
  font: 11px/1.5 var(--mono);
  margin-top: 2px;
}
.bubble.pending {
  border-style: dashed;
}
.conversation-start {
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  margin-top: 35px;
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
}
.composer textarea {
  resize: none;
  max-height: 130px;
  line-height: 1.4;
}
.send {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
}
dialog {
  color: var(--ink);
  background: var(--paper);
  width: min(415px, calc(100% - 32px));
  border: 1.5px solid #435e4e;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 4px 5px 0 #899b82;
}
dialog::backdrop {
  background: #19312366;
}
.dialog-head {
  justify-content: space-between;
  margin-bottom: 12px;
}
.dialog-head h2 {
  font-size: 24px;
  letter-spacing: -1px;
}
dialog > p {
  font-size: 15px;
  margin-bottom: 20px;
}
dialog label:not(:first-child) {
  margin-top: 13px;
}
.check {
  gap: 9px;
  font-size: 15px;
  margin-block: 12px;
}
.check input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}
dialog .secondary {
  width: 100%;
  font-size: 14px;
}
.error {
  color: #9b3525 !important;
  font-size: 14px;
}
#toast {
  position: fixed;
  z-index: 10;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 92%;
  width: max-content;
  border-radius: 8px;
  background: #263f30;
  color: white;
  padding: 10px 16px;
  box-shadow: 0 2px 12px #0002;
}
@media (max-width: 800px) {
  body > header,
  main,
  .foot {
    width: calc(100% - 40px);
  }
  .desk {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  .welcome-form {
    padding: 35px;
  }
  .mast {
    height: 77px;
  }
  .desk {
    height: calc(100dvh - 168px);
  }
}
@media (max-width: 620px) {
  body > header,
  main,
  .foot {
    width: calc(100% - 28px);
  }
  .mast {
    height: 63px;
  }
  .brand {
    font-size: 31px;
    gap: 7px;
  }
  .brand .bird {
    width: 34px;
  }
  .mast-right {
    gap: 8px;
  }
  .mast time {
    display: none;
  }
  main {
    margin-block: 17px 14px;
  }
  .welcome {
    display: flex;
    flex-direction: column-reverse;
    min-height: auto;
  }
  .postcard {
    border: 0;
    border-bottom: 1px solid #526951;
    height: clamp(125px, 23vh, 195px);
  }
  .postcard > .landscape {
    object-position: 50% 64%;
  }
  .post-caption {
    display: none;
  }
  .stamp {
    top: 11px;
    right: 16px;
    transform: rotate(6deg) scale(0.76);
  }
  .welcome-form {
    width: 100%;
    padding: 26px;
  }
  .welcome-form h1 {
    font-size: 51px;
    margin: 0 0 5px;
  }
  .welcome-form .post-icon {
    display: none;
  }
  .welcome-form form {
    margin-top: 21px;
  }
  .surface {
    border-radius: 13px;
    box-shadow: 2px 3px 0 #bac6b2;
  }
  .desk {
    height: calc(100dvh - 128px);
    min-height: 250px;
    display: flex;
  }
  .sidebar {
    width: 100%;
    border: 0;
  }
  .desk .empty {
    display: none;
  }
  .desk.mobile-chat .sidebar {
    display: none;
  }
  .desk.mobile-chat .chat {
    width: 100%;
  }
  .desk:not(.mobile-chat) .chat {
    display: none;
  }
  .back {
    display: inline-grid;
  }
  .chat-head {
    padding: 8px;
    gap: 6px;
  }
  .history {
    padding: 6px 12px;
  }
  .composer {
    padding: 9px;
  }
  .foot {
    font-size: 11px;
  }
  .side-top {
    padding-top: 18px;
  }
  .foot {
    margin-bottom: 6px;
  }
}

.mobile-invite {
  display: none;
}
@media (max-width: 620px) {
  .mobile-invite {
    display: flex;
    margin: 0 10px;
  }
}
