@font-face {
  font-family: "Brasika";
  src: url("../../objects/fonts/Brasika.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jakarta Sans";
  src: url("../../objects/fonts/JakartaSans.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #050505;
  --white: #f4f4f0;
  --dim: rgba(244, 244, 240, 0.5);
  --faint: rgba(244, 244, 240, 0.18);
  --glow-size: min(38vw, 260px);

  --font-display: "Brasika", "Jakarta Sans", serif;
  --font-body: "Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 5vh, 3rem);
  padding: 8vh 6vw;
  background-color: var(--black);
  background-image: var(--home-background, url("../../objects/images/background6.gif"));
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

::selection {
  background: var(--white);
  color: var(--black);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--faint);
  border: 2px solid var(--black);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dim);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--faint) var(--black);
}

main,
section,
article,
header,
footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 40rem;
}

.home-dock {
  position: fixed;
  z-index: 25;
  right: 0;
  left: 0;
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  padding: 0 1rem;
  pointer-events: none;
}

.home-dock-holder {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(244, 244, 240, 0.2);
  border-radius: 999px;
  padding: 0.5rem;
  background: rgba(18, 20, 25, 0.68);
  box-shadow: 0 0.7rem 2rem rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  pointer-events: auto;
}

.home-dock .dock-button {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 0 0 2.8rem;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  min-width: 2.8rem;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(244, 244, 240, 0.1);
  border-radius: 50%;
  outline: none;
  outline-offset: 2px;
  padding: 0;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 244, 240, 0.8);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
  transition: flex-basis 180ms ease, width 180ms ease, gap 180ms ease, padding 180ms ease, border-radius 180ms ease, transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.home-dock .dock-button:hover,
.home-dock .dock-button:focus-visible {
  flex-basis: var(--dock-expanded-width);
  width: var(--dock-expanded-width);
  gap: 0.45rem;
  border-radius: 999px;
  transform: translateY(-0.18rem);
  border-color: rgba(244, 244, 240, 0.4);
  outline: 2px solid rgba(244, 244, 240, 0.72);
  background: rgba(255, 255, 255, 0.14);
  padding: 0 0.75rem;
}

.home-dock .dock-button[hidden] {
  display: none;
}

.home-dock .dock-button i,
.home-dock .dock-button svg {
  flex: 0 0 auto;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.home-dock .dock-button-label {
  position: static;
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: max-width 180ms ease, opacity 120ms ease;
}

.home-dock .dock-button:hover .dock-button-label,
.home-dock .dock-button:focus-visible .dock-button-label {
  max-width: 100%;
  opacity: 1;
}

.admin-button {
  --dock-expanded-width: 8rem;
}

.feed-button {
  --dock-expanded-width: 5.8rem;
}

.chat-button {
  --dock-expanded-width: 5.6rem;
}

.voice-button {
  --dock-expanded-width: 8rem;
}

.settings-button {
  --dock-expanded-width: 7rem;
}

.legal-button {
  --dock-expanded-width: 5.4rem;
}

.profile-button {
  --dock-expanded-width: 7.4rem;
}

.admin-button .fa-hammer {
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
  color: inherit !important;
}

.admin-button .fa-hammer::before {
  content: "\f6e3";
}

.admin-button[hidden] {
  display: none;
}

.chat-button .fa-comment {
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
  color: inherit !important;
}

.chat-button .fa-comment::before {
  content: "\f075";
}

.feed-button .fa-newspaper {
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
  color: inherit !important;
}

.feed-button .fa-newspaper::before {
  content: "\f1ea";
}

.settings-button .fa-sliders {
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
  color: inherit !important;
}

.settings-button .fa-sliders::before {
  content: "\f1de";
}

.home-dock .profile-action-icon {
  display: block;
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.home-dock .profile-button-avatar {
  display: block;
  flex: 0 0 calc(2.8rem - 2px);
  width: calc(2.8rem - 2px);
  height: calc(2.8rem - 2px);
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 480px) {
  .home-dock {
    bottom: max(0.65rem, env(safe-area-inset-bottom));
    padding: 0 0.5rem;
  }

  .home-dock-holder {
    gap: 0.3rem;
    padding: 0.4rem;
  }

  .home-dock .dock-button {
    flex-basis: 2.55rem;
    width: 2.55rem;
    height: 2.55rem;
    min-width: 2.55rem;
  }

  .home-dock .profile-button-avatar {
    flex-basis: calc(2.55rem - 2px);
    width: calc(2.55rem - 2px);
    height: calc(2.55rem - 2px);
  }

  .admin-button {
    --dock-expanded-width: 6.8rem;
  }

  .feed-button {
    --dock-expanded-width: 5.2rem;
  }

  .chat-button {
    --dock-expanded-width: 5.2rem;
  }

  .voice-button {
    --dock-expanded-width: 7.2rem;
  }

  .settings-button {
    --dock-expanded-width: 6rem;
  }

  .profile-button {
    --dock-expanded-width: 7.2rem;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: normal;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h1 {
  text-align: center;
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.15);
}

.mythos-title-wrap {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto;
}

.mythos-subtitle {
  position: absolute;
  left: 50%;
  bottom: 100%;
  margin: 0;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, 0.7rem);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.mythos-title-wrap:hover .mythos-subtitle,
.mythos-title-wrap:focus-within .mythos-subtitle {
  opacity: 1;
  transform: translate(-50%, -0.35rem);
}

.admin-abuse-countdown {
  margin: 0 0 -1.5rem;
  color: var(--dim);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

#splash-text {
  margin: -1.5rem 0 0;
  color: var(--white);
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
  animation: splash-pulse 2.4s ease-in-out infinite;
}

@keyframes splash-pulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
}

h4,
h5,
h6 {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}

p {
  position: relative;
  z-index: 1;
  margin: 0 0 1em;
  color: var(--dim);
  max-width: 34rem;
}

p:last-child {
  margin-bottom: 0;
}

strong,
b {
  color: var(--white);
  font-weight: 700;
}

em,
i {
  color: var(--white);
  font-style: normal;
  opacity: 0.85;
}

small {
  font-size: 0.8em;
  color: var(--dim);
}

a {
  color: var(--white);
  text-decoration-line: underline;
  text-decoration-color: var(--faint);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  text-decoration-color: var(--white);
}

a:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 3px;
}

hr {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 34rem;
  border: none;
  border-top: 1px solid var(--faint);
  margin: 1.5rem 0;
}

ul,
ol {
  position: relative;
  z-index: 1;
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
  color: var(--dim);
  max-width: 34rem;
}

ul li,
ol li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.5em;
}

ul li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--faint);
}

ol {
  counter-reset: item;
}

ol li::before {
  content: counter(item, decimal-leading-zero);
  counter-increment: item;
  position: absolute;
  left: 0;
  font-size: 0.75em;
  letter-spacing: 0.05em;
  color: var(--faint);
}

blockquote {
  position: relative;
  z-index: 1;
  margin: 1em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 2px solid var(--faint);
  color: var(--dim);
  max-width: 34rem;
}

code,
pre,
kbd,
samp {
  font-family: "Jakarta Sans", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  color: var(--white);
  background-color: var(--faint);
  border-radius: 2px;
}

code,
kbd,
samp {
  padding: 0.15em 0.4em;
}

pre {
  position: relative;
  z-index: 1;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  max-width: 34rem;
  border: 1px solid var(--faint);
}

pre code {
  background-color: transparent;
  padding: 0;
}

table {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.6em 0.8em;
  border-bottom: 1px solid var(--faint);
}

th {
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75em;
}

td {
  color: var(--dim);
}

figure {
  position: relative;
  z-index: 1;
  margin: 0 0 1em;
  max-width: 34rem;
}

figure img,
img {
  max-width: 100%;
  display: block;
  height: auto;
}

figcaption {
  margin-top: 0.5em;
  font-size: 0.8em;
  color: var(--faint);
  text-align: center;
}

label {
  position: relative;
  z-index: 1;
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
  margin-bottom: 0.85rem;
}

form {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

fieldset {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--faint);
  padding: 1.2rem;
}

legend {
  padding: 0 0.5em;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}


button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  position: relative;
  z-index: 1;
  display: block;
  width: min(90vw, 380px);
  color-scheme: dark;
  accent-color: var(--white);
  background-color: transparent;
  border: 1px solid var(--faint);
  border-radius: 0;
  outline: 1px solid var(--faint);
  outline-offset: 6px;
  padding: 0.95rem 1.2rem;
  margin: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, outline-color 0.15s ease, box-shadow 0.15s ease;
}

.lesson-picker {
  position: relative;
  z-index: 2;
  width: min(90vw, 380px);
}

.lesson-picker-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.lesson-picker-button img,
.lesson-option img {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.lesson-options {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  width: 100%;
  max-height: min(60vh, 24rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: hidden;
  padding: 0.5rem;
  background: var(--black);
  border: 1px solid var(--faint);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.lesson-search {
  flex: 0 0 auto;
  width: 100%;
  border: 1px solid var(--faint);
  outline: none;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.lesson-random-option {
  font-weight: 700;
}

.lesson-random-option i {
  flex: 0 0 1.5rem;
  text-align: center;
}

.lesson-search::placeholder {
  color: var(--dim);
}

.lesson-search:focus-visible {
  border-color: var(--dim);
  outline: 1px solid var(--dim);
  outline-offset: 1px;
}

.lesson-option-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.lesson-picker.is-open .lesson-options {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lesson-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: none;
  outline: none;
  background: transparent;
  color: var(--white);
  text-align: left;
  text-transform: none;
  letter-spacing: 0.04em;
}

.lesson-option[hidden] {
  display: none;
}

.lesson-empty {
  margin: 0;
  padding: 0.8rem;
  color: var(--dim);
  text-align: center;
}

.lesson-option:hover,
.lesson-option:focus-visible {
  border: none;
  outline: none;
  background: var(--white);
  color: var(--black);
  box-shadow: none;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  appearance: none;
  -webkit-appearance: none;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  border-color: var(--dim);
  outline-color: var(--dim);
}

button:disabled,
input:disabled,
textarea:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
input[type="reset"]:focus-visible {
  outline-color: var(--white);
  background-color: var(--white);
  color: var(--black);
  border-color: var(--white);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.45);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea {
  position: relative;
  z-index: 1;
  display: block;
  width: min(90vw, 380px);
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--faint);
  border-radius: 0;
  padding: 0.6rem 0.1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  transition: border-color 0.2s ease;
}

textarea {
  border: 1px solid var(--faint);
  padding: 0.8rem 1rem;
  min-height: 6rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
textarea:hover {
  border-color: var(--dim);
}

input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="search"]:focus-visible,
input[type="tel"]:focus-visible,
input[type="url"]:focus-visible,
input[type="number"]:focus-visible,
input[type="date"]:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--white);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.1em;
  height: 1.1em;
  accent-color: var(--white);
  color-scheme: dark;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  #splash-text {
    animation: none;
  }

  * {
    scroll-behavior: auto;
  }
}

@media (max-width: 420px) {
  h1 {
    letter-spacing: 0;
  }

  label,
  legend {
    letter-spacing: 0.15em;
  }
}