.start {
  --panel-w: min(582px, 100%);
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  transition: visibility 0s 0.7s;
}

.start.is-open {
  visibility: visible;
  transition: none;
}

.start__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.start.is-open .start__overlay {
  opacity: 1;
}

.start__character {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: var(--panel-w);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  cursor: pointer;
}

.start.is-open .start__character {
  opacity: 1;
  transform: none;
}

.start__character-img {
  width: auto;
  height: min(100%, 1080px);
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
}

.start__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  padding: 100px 32px 32px;
  overflow-y: auto;
  background: var(--kraft);
  color: var(--ink);
  transform: translateX(100%);
  transition: transform 0.6s var(--ease);
}

.start.is-open .start__panel {
  transform: none;
}

.start__close {
  position: absolute;
  top: 32px;
  right: 32px;
  border-color: var(--kraft-dark);
}

.start__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 32px;
}

.start__tab {
  height: 67px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 3px solid var(--kraft-dark);
  background: none;
  color: rgba(42, 28, 10, 0.7);
  font: 700 44px/1 var(--font-serif);
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.start__tab:hover {
  color: var(--black);
}

.start__tab[aria-selected="true"] {
  border-color: var(--black);
  color: var(--black);
}

.start__pane[hidden] {
  display: none;
}

.reg form {
  display: flex;
  flex-direction: column;
}

.reg .form-group {
  position: relative;
  isolation: isolate;
  margin: 0 0 16px;
}

.reg .form-group:has(> .form-control:not([type="hidden"]))::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 54px;
  background: var(--kraft-dark);
  filter: url(#rough-edge);
  pointer-events: none;
}

.reg .field-signupform-password::before {
  filter: url(#rough-edge-alt);
}

.reg .form-control {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 32px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  font: 500 16px/1 var(--font-sans);
}

.reg .form-control::placeholder {
  color: #81705C;
  opacity: 1;
}

.reg .form-control:focus {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.reg .has-error .form-control {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.reg .help-block {
  margin-top: 6px;
  color: var(--accent);
  font: 500 14px/1.3 var(--font-sans);
}

.reg .help-block:empty {
  display: none;
}

.reg .input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.reg .input-group > .form-group {
  flex: 1;
  margin: 0;
}

.reg .prefiks_block {
  flex: none;
  width: 64px;
  max-width: 64px !important;
  padding: 0;
  background-color: var(--ink) !important;
  color: var(--white) !important;
  font: 700 16px/1 var(--font-sans) !important;
  text-align: center;
}

.reg .checkbox {
  order: 2;
  margin: 0 0 8px;
}

.reg .checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font: 400 14px/1.3 var(--font-sans);
  letter-spacing: 0.014px;
  cursor: pointer;
}

.reg .checkbox input[type="checkbox"] {
  position: static;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  background: var(--kraft-dark);
  appearance: none;
  cursor: pointer;
}

.reg .checkbox input[type="checkbox"]:checked {
  background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--kraft-dark);
}

.reg .checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.reg .checkbox a {
  font-weight: 700;
  text-decoration: underline;
}

.reg .mb-16 {
  order: 1;
  margin: 0 0 16px;
}

.reg .mb-16 small {
  display: block;
  margin-top: 8px;
  color: #4E463B;
  font: 500 12px/1.3 var(--font-sans);
}

.reg .mb-16 small a {
  text-decoration: underline;
}

.reg .gold_button {
  order: 3;
  display: flex;
  flex-direction: column;
  margin: 40px 0 0;
}

.reg .gold_button_in {
  --rough-bg: var(--ink);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 55px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--white);
  font: 700 18px/1 var(--font-sans);
  text-transform: none;
  cursor: pointer;
}

.reg .gold_button_in::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--rough-bg);
  filter: url(#rough-edge);
  transition: background-color 0.25s var(--ease);
}

.reg .gold_button_in:hover {
  --rough-bg: var(--accent);
}

.reg #signed-up {
  margin: 16px 0 0;
  color: #342512;
  font: 500 15px/1.3 var(--font-sans);
}

.reg #signed-up a {
  font-weight: 700;
  text-decoration: underline;
}

.reg__submit {
  --rough-bg: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 55px;
  margin-top: 48px;
  border: 0;
  color: var(--white);
  font: 700 18px/1 var(--font-sans);
  cursor: pointer;
}

.reg__submit:hover {
  --rough-bg: var(--accent);
}

.files__launcher {
  display: flex;
  gap: 16px;
}

.files__logo {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(#444, #222);
}

.files__logo::after {
  content: "";
  position: absolute;
  inset: 12px;
  background: var(--accent);
  -webkit-mask: url("../assets/eye.svg") center / contain no-repeat;
  mask: url("../assets/eye.svg") center / contain no-repeat;
}

.files__title {
  color: var(--black);
  font: 700 18px/1.3 var(--font-sans);
}

.files__text {
  margin-top: 4px;
  color: #4E463B;
  font: 500 16px/1.4 var(--font-sans);
}

.files .reg__submit {
  margin-top: 28px;
}

.files__label {
  margin-top: 40px;
  color: #4E463B;
  font: 700 16px/1.3 var(--font-sans);
}

.files__video {
  aspect-ratio: 16 / 9;
  margin-top: 16px;
  background: var(--kraft-dark);
}

@media (max-width: 900px) {
  .start__character {
    display: none;
  }

  .start__panel {
    padding: 100px 32px 32px;
  }

  .start__tab {
    font-size: 40px;
  }
}

@media (max-width: 420px) {
  .start__panel {
    padding: 96px 16px 24px;
  }

  .start__close {
    top: 24px;
    right: 16px;
  }

  .start__tab {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .reg .form-control {
    height: 48px;
    color: #5F5245;
    font: 500 14px/24px var(--font-sans);
  }

  .reg .form-group:has(> .form-control:not([type="hidden"]))::before {
    height: 48px;
  }

  .reg .form-control::placeholder {
    color: #5F5245;
  }

  .reg .gold_button_in {
    color: #F5F5F5;
    font: 700 16px/1.2 var(--font-sans);
  }
}

/* Залогиненный пользователь: только вкладка с файлами */
.start__tabs--single {
  grid-template-columns: 1fr;
}
