.entry-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr) 52px;
  background: rgba(20, 15, 11, 0.58);
}

.entry-header,
.entry-footer {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  border-color: var(--line-strong);
  background: rgba(28, 21, 15, 0.94) url("../assets/images/panel-texture.jpg") center / cover;
}

.entry-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line-strong);
}

.entry-footer {
  justify-content: center;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
}

.entry-brand {
  display: block;
  width: 190px;
  height: 56px;
  object-fit: contain;
}

.entry-main {
  display: grid;
  width: min(1040px, calc(100% - 48px));
  min-height: 0;
  grid-template-columns: minmax(260px, 0.72fr) minmax(460px, 1.28fr);
  align-items: center;
  gap: 54px;
  margin: 0 auto;
  padding: 24px 0;
}

.entry-heading h1 {
  margin-top: 7px;
  color: #fff3d2;
  font-size: 38px;
  line-height: 1.2;
}

.entry-heading > p:last-child {
  max-width: 390px;
  margin-top: 14px;
  color: var(--loess-300);
  font-size: 15px;
  line-height: 1.75;
}

.entry-modes {
  display: grid;
  gap: 12px;
}

.entry-mode {
  position: relative;
  display: grid;
  min-height: 154px;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  column-gap: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--self-bright);
  border-radius: 7px;
  background: rgba(36, 26, 18, 0.94);
  color: var(--paper);
  text-align: left;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.entry-mode:hover,
.entry-mode:focus-visible {
  border-color: var(--gold-bright);
  background: rgba(54, 39, 27, 0.98);
  transform: translateY(-2px);
}

.entry-mode-tutorial {
  border-left-color: var(--gold-bright);
}

.entry-mode-index {
  grid-row: 1 / 4;
  align-self: center;
  color: var(--gold);
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.entry-mode strong {
  color: #fff3d2;
  font-size: 22px;
}

.entry-mode > span:not(.entry-mode-index) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.entry-mode small {
  margin-top: 12px;
  color: var(--self-bright);
  font-size: 11px;
}

.entry-mode-tutorial small {
  color: var(--gold-bright);
}

.tutorial-help {
  position: absolute;
  top: 78px;
  right: 14px;
  z-index: 70;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(36, 26, 18, 0.94);
  color: var(--gold-bright);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.tutorial-help:hover,
.tutorial-help:focus-visible {
  background: var(--gold);
  color: var(--earth-950);
}

.tutorial-layer {
  position: absolute;
  inset: 0;
  z-index: 4000;
  pointer-events: none;
}

.tutorial-mask {
  position: absolute;
  pointer-events: auto;
  background: rgba(12, 9, 7, 0.78);
  transition: left 160ms ease, top 160ms ease, width 160ms ease, height 160ms ease;
}

.tutorial-spotlight {
  position: absolute;
  border: 2px solid var(--gold-bright);
  border-radius: 7px;
  pointer-events: none;
  box-shadow: 0 0 0 3px rgba(214, 173, 85, 0.22), 0 0 24px rgba(240, 209, 129, 0.28);
  transition: left 160ms ease, top 160ms ease, width 160ms ease, height 160ms ease;
}

.tutorial-popover {
  position: absolute;
  width: min(390px, calc(var(--ui-viewport-width) - 20px));
  max-height: min(430px, calc(var(--ui-viewport-height) - 20px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--gold-bright);
  border-radius: 7px;
  pointer-events: auto;
  background: #302219 url("../assets/images/panel-texture.jpg") center / cover;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.52);
}

.tutorial-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.tutorial-progress strong {
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.tutorial-eyebrow {
  margin-top: 14px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.tutorial-popover h2 {
  margin-top: 5px;
  color: #fff3d2;
  font-size: 21px;
  line-height: 1.3;
}

.tutorial-body {
  margin-top: 10px;
  color: var(--paper);
  font-size: 13px;
  line-height: 1.7;
}

.tutorial-action-hint {
  margin-top: 12px;
  padding: 8px 10px;
  border-left: 3px solid var(--self-bright);
  background: var(--self-soft);
  color: var(--self-bright);
  font-size: 11px;
}

.tutorial-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.tutorial-actions > div {
  display: flex;
  gap: 8px;
}

.tutorial-skip,
.tutorial-back {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.tutorial-skip:hover,
.tutorial-back:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--paper);
}

.tutorial-back:disabled {
  visibility: hidden;
}

.tutorial-next {
  min-width: 92px;
}

@media (max-width: 820px) {
  .entry-screen {
    grid-template-rows: 60px minmax(0, 1fr) 42px;
  }

  .entry-header {
    padding: 6px 10px;
  }

  .entry-header .btn {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .entry-brand {
    width: 104px;
    height: 42px;
  }

  .entry-main {
    width: min(560px, calc(100% - 24px));
    grid-template-columns: 1fr;
    align-content: center;
    gap: 18px;
    padding: 18px 0;
    overflow: auto;
  }

  .entry-heading h1 {
    font-size: 26px;
  }

  .entry-heading > p:last-child {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.55;
  }

  .entry-modes {
    gap: 8px;
  }

  .entry-mode {
    min-height: 116px;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 12px;
    padding: 14px;
  }

  .entry-mode-index {
    font-size: 19px;
  }

  .entry-mode strong {
    font-size: 17px;
  }

  .entry-mode > span:not(.entry-mode-index) {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.45;
  }

  .entry-mode small {
    margin-top: 6px;
    font-size: 9px;
  }

  .entry-footer {
    padding: 6px 10px;
    font-size: 9px;
  }

  .tutorial-help {
    top: 64px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .tutorial-popover {
    width: min(350px, calc(var(--ui-viewport-width) - 20px));
    max-height: min(360px, calc(var(--ui-viewport-height) - 20px));
    padding: 14px;
  }

  .tutorial-popover h2 {
    font-size: 18px;
  }

  .tutorial-body {
    font-size: 12px;
    line-height: 1.55;
  }

  .tutorial-actions {
    margin-top: 13px;
  }

  .tutorial-skip,
  .tutorial-back {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 10px;
  }
}

@media (max-width: 430px) {
  .entry-main {
    align-content: start;
    padding-top: 24px;
  }

  .entry-heading .eyebrow {
    font-size: 10px;
  }

  .entry-mode {
    min-height: 110px;
  }

  .tutorial-progress span {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-mask,
  .tutorial-spotlight {
    transition: none;
  }
}
