html {
  --rgb-primary: 33, 37, 41;
  --txt-primary: rgba(var(--rgb-primary), 1);
  --txt-secondary: rgba(var(--rgb-primary), 0.8);
  --txt-tertiary: rgba(var(--rgb-primary), 0.6);
  --txt-btn: var(--txt-primary);
  --txt-accent: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f9f8fe;
  --bg-btn: #f1f1f1;
  --border: #dee2e6;
  --accent: #ff7766;
  --accent2: #bd34fe;
  --green: #1eca7a;
  --gold: #ffbf00;
  --gold2: #ffea83;
  --red: #f6283c;
  --blue: #00b2ff;
  --popup-bg: rgba(0, 0, 0, 0.45);
  --skeleton-bg: #e5e7eb;

  --shadow: 0 2px 2px rgba(0, 0, 0, 0.15);

  --main-font:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  --container-space: 1rem;
  --header-height: 3.5rem;
  --content-max-width: 63rem;
}

@media (min-width: 1024px) {
  html {
    --content-max-width: 1050px;
  }
}

html.is-dark-mode {
  --rgb-primary: 255, 255, 255;
  --bg-primary: #212529;
  --bg-secondary: #272c31;
  --border: #2e3339;
  --bg-btn: var(--border);
  --popup-bg: rgba(0, 0, 0, 0.75);
  --skeleton-bg: var(--border);
}

@media (prefers-color-scheme: dark) {
  html:not(.is-light-mode) {
    --rgb-primary: 255, 255, 255;
    --bg-primary: #212529;
    --bg-secondary: #272c31;
    --border: #575757;
    --bg-btn: var(--border);
    --popup-bg: rgba(0, 0, 0, 0.75);
    --skeleton-bg: var(--border);
  }
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html,
body,
#root,
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  scrollbar-gutter: stable;
}

html:has(.popup:not(.is-minimized)) {
  overflow: hidden;
}

@media (min-width: 1024px) {
  html {
    font-size: 18px;
  }
}

html,
body {
  font-family: var(--main-font);
  background: var(--bg-primary);
  color: var(--txt-secondary);
}

body {
  min-width: 320px;
  margin: 0;
}

input,
optgroup,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

input {
  overflow: visible;
}

select {
  text-transform: none;
}

button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  user-select: none;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  overflow: visible;
  text-transform: none;
  font: inherit;
  color: inherit;
  margin: 0;
}

button::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

:active,
:focus:not(:focus-visible) {
  outline: none;
}

img {
  vertical-align: middle;
  border: none;
  max-width: 100%;
  height: auto;
}

b,
strong {
  font-weight: 500;
  color: var(--txt-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-position: from-font;
  text-underline-position: under;
  text-decoration-color: color-mix(in srgb, currentColor 25%, transparent);
}

.link:hover {
  text-decoration-color: currentColor;
}

h1,
h2,
h3,
.title-1,
.title-2,
.title-3 {
  font-family: inherit;
  font-weight: 400;
  color: var(--txt-primary);
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
}

h1,
.title-1 {
  font-size: 1.5rem;
  line-height: 1.2;
}

h2,
.title-2 {
  font-size: 1.125rem;
  line-height: 1.44;
}

h3,
.title-3 {
  font-size: 1rem;
  line-height: 1.5;
}

body,
.text-normal {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-small {
  font-size: 0.75rem;
  line-height: 1rem;
}

p,
ul,
ol,
figure,
blockquote {
  margin: 0 0 1rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  column-gap: 0.75rem;
  background-color: var(--accent);
  color: var(--txt-accent);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.btn:active {
  background-color: var(--accent2);
}

.container {
  max-width: var(--content-max-width);
  padding: 0 var(--container-space);
  margin: 0 auto;
}

.content {
  flex-grow: 1;
  min-height: 1px;
  display: flex;
  flex-direction: column;
}

.main {
  flex-grow: 1;
  min-height: 1px;
  padding: 1rem 0;
  position: relative;
}

.footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 1rem;
}

.header {
  flex-shrink: 0;
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 9;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 1rem;
  height: var(--header-height);
}

.header__nav {
  display: flex;
  align-items: center;
  column-gap: 1rem;
  margin-left: auto;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--txt-primary);
  column-gap: 0.5rem;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.logo__image {
  width: 1.875rem;
  height: 1.875rem;
  flex-shrink: 0;
  pointer-events: auto;
}

.logo__image img {
  display: block;
  width: 100%;
  height: 100%;
}

.logo__text {
  flex-grow: 1;
  min-width: 1px;
  font-size: 1.5rem;
  line-height: 1.875rem;
  position: relative;
  white-space: nowrap;
}

.logo__text > span {
  display: inline-block;
  vertical-align: top;
  pointer-events: auto;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.color-mode-btn .icon {
  color: var(--txt-primary);
}

.home-page__header {
  text-align: center;
  margin: 1rem auto 2rem;
  max-width: 42rem;
  text-wrap: balance;
}

.home-page__header h1,
.home-page__header h2 {
  text-wrap: balance;
}

.home-page__list-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.home-page__list-header h3 {
  text-wrap: balance;
  margin-bottom: 0.5rem;
}

.home-page__list-header .btn {
  display: inline-flex;
  width: auto;
}

.home-page__section:not(.is-active) {
  display: none;
}

.home-page__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 -0.5rem;
  row-gap: 1rem;
}

.home-page__list li {
  flex: 0 0 auto;
  width: 33.33%;
  padding: 0 0.5rem;
  position: relative;
}

@media (min-width: 430px) {
  .home-page__list li {
    width: 25%;
  }
}

@media (min-width: 550px) {
  .home-page__list li {
    width: 20%;
  }
}

@media (min-width: 630px) {
  .home-page__list li {
    width: 16.66%;
  }
}

@media (min-width: 740px) {
  .home-page__list li {
    width: 14.28%;
  }
}

@media (min-width: 820px) {
  .home-page__list li {
    width: 12.5%;
  }
}

@media (min-width: 960px) {
  .home-page__list li {
    width: 11.11%;
  }
}

.home-page__list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  color: inherit;
  text-decoration: none;
  row-gap: 0.5rem;
  font-weight: 500;
  transition: color 0.15s ease-in-out;
}

.home-page__list a:hover {
  color: var(--accent);
}

.home-page__list img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--txt-accent);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  max-width: none;
}

.home-page__footer {
  text-align: center;
  margin-top: 1.5rem;
}

.home-page__nav {
  box-shadow: 0 -1px 0 var(--border) inset;
  margin-top: 0.5rem;
}

.home-page__nav-menu {
  display: flex;
  justify-content: center;
  column-gap: 1.5rem;
}

@media (max-width: 1023px) {
  .home-page__nav-menu {
    font-size: 0.85rem;
  }
}

.home-page__nav-menu-btn {
  display: flex;
  align-items: center;
  height: var(--header-height);
  color: inherit;
  text-decoration: none;
  position: relative;
  column-gap: 0.5em;
}

.home-page__nav-menu-btn:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 3px solid transparent;
}

.home-page__nav-menu-btn.is-active:after {
  border-bottom-color: var(--accent);
}

.home-page__nav-menu-btn svg {
  width: 1.25em;
  height: 1.25em;
  color: var(--accent);
}

.home-page__previously {
  box-shadow: 0 -1px 0 var(--border) inset;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  text-align: center;
}

.home-page__previously-footer {
  margin-top: 1rem;
  text-align: center;
}

.home-page__list-remove-btn {
  position: absolute;
  left: calc(50% + 40px);
  top: -0.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-primary);
  transform: translate(-50%, 0);
}

@media (min-width: 1024px) {
  .home-page__header {
    margin: 1rem auto 3rem;
  }

  .home-page__list-remove-btn {
    opacity: 0;
    visibility: hidden;
    transition: 0.15s ease-in-out;
    transition-property: opacity, visibility;
  }

  .home-page__list li:hover .home-page__list-remove-btn {
    opacity: 1;
    visibility: visible;
  }
}
