@font-face {
  font-family: Rodin;
  src: url("../assets/rodin-ntlg-pro-db.otf") format("opentype");
}
@font-face {
  font-family: "Notifications Header";
  src: url("../../assets/Metropolis-Regular.otf") format("opentype");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: Rodin, Arial, sans-serif; color: #242b2e; cursor: url("../assets/point-cursor.png") 18 5, auto; }
button { font: inherit; color: inherit; }
button, a { cursor: url("../assets/point-cursor.png") 18 5, pointer; }
img { -webkit-user-drag: none; }

.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: linear-gradient(#dedede, #d4d4d4);
}
.launch-screen::before {
  content: "";
  position: absolute;
  inset: 5.5% 0 0;
  border-radius: min(10vw, 18dvh) min(10vw, 18dvh) 0 0;
  background: linear-gradient(#fafafa, #d0d0d0);
}
.launch-brand {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .7em;
  margin-top: 3dvh;
  font-size: clamp(17px, 2.65vw, 4.7dvh);
}
.launch-brand img {
  width: clamp(58px, 10.4vw, 18.5dvh);
  height: auto;
  border-radius: 12%;
  box-shadow: 0 4px 12px #0002;
}
.launch-screen.leaving { animation: launch-fade .22s ease-out forwards; }
@keyframes launch-fade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .launch-screen.leaving { animation: none; }
}

.channel {
  --header-height: clamp(40px, 6vw, 10.7dvh);
  --footer-height: clamp(50px, 9.4vw, 16.7dvh);
  --corner-size: clamp(58px, 11.7vw, 20.8dvh);
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(60deg, #a9a0b1 0%, #bcbdc8 34%, #dce7eb 73%, #efffff 100%);
}

.channel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 23% 26%, #fff9 0 2px, transparent 4px),
    radial-gradient(circle at 11% 70%, #fff8 0 2px, transparent 3px),
    radial-gradient(circle at 72% 40%, #fff8 0 1px, transparent 4px),
    radial-gradient(circle at 43% 75%, #fff7 0 2px, transparent 5px);
  background-size: 43% 70%, 59% 60%, 37% 59%, 67% 78%;
  opacity: .5;
}

.screen { position: absolute; inset: 0; }
.inbox { background: #139dc1; }
.inbox-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 1.5dvh 3.1% 0;
  color: #f5fcff;
  background: linear-gradient(108deg, #10a3c8, #148caf);
  font-family: "Notifications Header", Arial, sans-serif;
}
.inbox-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("textures/dots.png") 0 0 / 22px;
  opacity: .045;
  pointer-events: none;
}
.inbox-header::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 6% -8px;
  height: 10px;
  background: #13a6c9;
  filter: blur(6px);
  opacity: .5;
  pointer-events: none;
}
.inbox-header h1, .unread {
  margin: 0;
  font-size: clamp(15px, 2.65vw, 4.7dvh);
  font-weight: normal;
}
.inbox-header h1 { display: flex; align-items: center; gap: 1.65vw; }
.inbox-header img { width: clamp(23px, 4.05vw, 7.2dvh); }
.unread { display: flex; align-items: center; gap: 2.5vw; padding-right: 2.1vw; }
.unread span { font-size: 1.55em; }

.scroll-content { overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.scroll-content::-webkit-scrollbar { display: none; }
.inbox-scroll {
  position: absolute;
  inset: var(--header-height) 0 0;
  padding: clamp(9px, 1.25vw, 2.2dvh) 12.7% 3%;
  border-radius: min(7vw, 12dvh) min(7vw, 12dvh) 0 0;
  box-shadow: inset 0 10px 19px -12px #1599b6;
}
.inbox-scroll, .reader {
  background:
    linear-gradient(#d3d6d68c, #d3d6d68c),
    url("textures/dots.png") 0 0 / 30px,
    linear-gradient(115deg, #c8caca, #e0e2e2 48%, #cdd0d0);
  background-blend-mode: normal, soft-light, normal;
}
.notices { list-style: none; margin: 0; padding: 0; }
.notices li + li { margin-top: clamp(9px, 2vw, 3.6dvh); }
.notice {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.6vw, 4.6dvh);
  width: 100%;
  min-height: clamp(52px, 9.35vw, 16.6dvh);
  padding: .3em .44em;
  text-align: left;
  font-size: clamp(17px, 3.7vw, 6.6dvh);
  line-height: 1.15;
  border: 1px solid #ffffffa8;
  border-radius: .43em;
  background: linear-gradient(#d6d8d8, #c0c3c3 62%, #cdd0d0);
  box-shadow: inset 0 -3px 4px #ffffffe0, inset 0 1px 4px #fff8,
    0 5px 0 #b6baba, 0 9px 10px #313c3c48;
}
.notice[data-unread] {
  background: linear-gradient(112deg, #d0f8f3, #edf7f7);
  box-shadow: inset 0 -5px 0 #ffffffbf, inset 0 -8px 12px #d9ffff, 0 0 13px #96ffffe0, 0 5px 10px #579fa68c;
}
.notice:hover { filter: brightness(1.055); }
.notice:focus { outline: none; }
.keyboard .notice:focus {
  background: #8cebf0;
  outline: none;
}
.selector { display: none; position: absolute; inset: 0; pointer-events: none; }
.keyboard .notice:focus .selector { display: block; }
.selector i {
  position: absolute;
  width: clamp(17px, 3vw, 34px);
  height: clamp(17px, 3vw, 34px);
  z-index: 1;
  background: url("../friends/selector-sheet.png") left top / 200% 200% no-repeat;
  filter: url("#selector-teal") drop-shadow(0 0 2px #00abc3a0);
}
.selector i:nth-child(1) { top: -3px; left: -7px; }
.selector i:nth-child(2) { top: -3px; right: -7px; background-position: right top; }
.selector i:nth-child(3) { bottom: -4px; left: -7px; background-position: left bottom; }
.selector i:nth-child(4) { bottom: -4px; right: -7px; background-position: right bottom; }
.notice:active { filter: brightness(.94); }
.notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.86em;
  aspect-ratio: 1;
  border-radius: 5%;
  background: #f8f8f8 url("textures/info-trimmed.png") center / 100% no-repeat;
}

.reader-scroll { position: absolute; inset: 0; padding: .9vw 0 var(--footer-height); }
.reader-scroll.scroll-locked { overflow: clip; }
.notice-heading {
  display: flex;
  align-items: center;
  gap: 3.6vw;
  margin: 0 8.7% 0 6.35%;
  padding: .16em .6em;
  border-radius: .2em;
  background: linear-gradient(100deg, #3299b0, #3cb8d2);
  box-shadow: inset 0 1px 3px #a8f6ff, 0 2px 9px #00a3c16e;
  color: white;
  font-size: clamp(19px, 3.65vw, 6.5dvh);
  line-height: 1.1;
}
.notice-heading .notice-icon { width: 1.38em; }
.notice-heading h2 { margin: 0; font: inherit; }
.message {
  margin: 1.7vw 15% 4vw 13.65%;
  font-size: clamp(16px, 2.9vw, 5.15dvh);
  line-height: 1.45;
}
.message p { margin: 0; }
.message p + p { margin-top: 1.45em; }
.message a { color: #075d7c; }
.reader-footer {
  position: absolute;
  inset: auto 0 0;
  height: var(--footer-height);
  display: flex;
  padding-left: var(--corner-size);
  border-radius: 2.5vw 2.5vw 0 0;
}
.page-arrow, .back {
  --footer-button-fill: linear-gradient(#fcfdfcef, #e4e6e4e8);
}
.reader-footer::after {
  content: "";
  flex: 1;
  background: linear-gradient(#444645a0, #292b2aaa);
  border-top-right-radius: 2.5vw;
}
.page-arrow {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(45px, 19.5vw, 34.7dvh);
  border: 0;
  border-right: 1px solid #a5aaa9;
  background: var(--footer-button-fill);
}
.page-arrow .arrow-symbol {
  width: clamp(20px, 4.5vw, 8dvh);
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(50% 7%, 93% 50%, 78% 65%, 60% 47%, 60% 91%, 40% 91%, 40% 47%, 22% 65%, 7% 50%);
}
.page-arrow.next .arrow-symbol { rotate: 180deg; }
.page-arrow:disabled { color: #aeb1af; cursor: default; }
.page-arrow, .corner.back {
  transition: margin-top 160ms ease-out, height 160ms ease-out,
    border-radius 160ms ease-out, box-shadow 160ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .page-arrow, .corner.back { transition: none; }
}
.page-arrow:not(:disabled):is(:hover, :active, :focus-visible),
.back:is(:hover, :active, :focus-visible) {
  border-radius: calc(var(--footer-height) * .22) calc(var(--footer-height) * .22) 0 0;
  box-shadow: 0 -2px 7px #26343826;
  outline: none;
}
.page-arrow:not(:disabled):is(:hover, :active, :focus-visible) {
  z-index: 1;
  margin-top: calc(var(--footer-height) * -.18);
}
.back:is(:hover, :active, :focus-visible) {
  height: calc(var(--footer-height) * 1.18);
}
.page-arrow:not(:disabled):focus-visible .selector,
.back:focus-visible .selector {
  display: block;
  animation: footer-selector-in 120ms ease-out both;
}
@keyframes footer-selector-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .page-arrow:focus-visible .selector, .back:focus-visible .selector { animation: none; }
}
.page-arrow .selector i, .back .selector i {
  width: calc(var(--footer-height) * .26);
  height: calc(var(--footer-height) * .26);
}
.page-arrow .selector i:nth-child(odd), .back .selector i:nth-child(odd) { left: 0; }
.page-arrow .selector i:nth-child(even), .back .selector i:nth-child(even) { right: 0; }
.page-arrow .selector i:nth-child(-n+2), .back .selector i:nth-child(-n+2) { top: 0; }
.page-arrow .selector i:nth-child(n+3), .back .selector i:nth-child(n+3) { bottom: 0; }
.corner {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  width: var(--corner-size);
  height: calc(var(--corner-size) * .74);
  border: 0;
  background: transparent;
}
.close {
  border-top-right-radius: 100% 100%;
  background: linear-gradient(#555756, #363837);
  box-shadow: 0 -2px 8px #0003;
}
.back {
  height: var(--footer-height);
  border-right: 1px solid #a5aaa9;
  border-top-left-radius: 2.5vw;
  background: var(--footer-button-fill);
}
.back .corner-symbol {
  left: 50%;
  top: 50%;
  bottom: auto;
  width: 42%;
  transform: translate(-50%, -50%);
}
.corner-symbol { position: absolute; left: 13%; bottom: 6%; width: 58%; }
.close .corner-symbol { opacity: .55; }
.close:focus-visible { outline: 2px solid #0d88a8; outline-offset: -3px; }

.scrollbar {
  position: absolute;
  top: calc(var(--header-height) + 9.2dvh);
  bottom: 10.9%;
  right: 2.85%;
  width: clamp(25px, 6.5vw, 11.55dvh);
  touch-action: none;
}
.channel.reading .scrollbar { top: 22.3%; bottom: calc(var(--footer-height) + 2.2%); }
.scrollbar::before {
  content: "";
  position: absolute;
  inset: 2% 41.5% 0;
  border-radius: 999px;
  background: #6571739c;
}
.scroll-grip {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: clamp(38px, 9.3vw, 16.5dvh);
  border: 1px solid #c8d1d1;
  border-radius: 24%;
  background: url("../friends/official-grip-ridges.png") center / 83% auto no-repeat, linear-gradient(#fff, #e4ebeb);
  box-shadow: inset 0 0 6px #fff, 0 2px 5px #27383b57;
  cursor: url("../assets/open-hand-cursor.png") 42 22, grab;
}
.reading .scroll-grip { height: clamp(45px, 12vw, 21.5dvh); }
html.dragging, html.dragging * {
  cursor: url("../assets/grab-cursor.png") 42 29, grabbing;
}

@media (max-width: 600px) and (orientation: portrait) {
  .inbox-scroll { padding-inline: 9% 15%; }
  .message { margin-inline: 9% 15%; }
  .notice-heading { margin-right: 12%; }
}
