@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  --g: #39ff14;
  --g2: #1aff4d;
  --gd: #1a6b28;
  --gm: #2a9a3a;
  --bg: #030a03;
  --red: #ff5555;
  --font: 'IBM Plex Mono', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  min-height: 100%;
  font-family: var(--font);
  background: #000;
  color: var(--g);
}

body {
  min-height: 100vh;
  display: flex;
  padding: 12px;
  background: #010301;
}

/* --- ГЛАВНЫЙ СКРОЛЛБАР САЙТА --- */

/* Для Chrome, Edge, Safari, Яндекс.Браузера */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #010301;
  border-left: 1px solid var(--gd);
}

::-webkit-scrollbar-thumb {
  background: var(--gd);
  border-radius: 4px;
  border: 2px solid #010301;
}

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

/* Для Firefox */
html {
  scrollbar-width: auto;
  scrollbar-color: var(--gd) #010301;
}

.frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 4px solid var(--g2);
  border-radius: 12px;
  box-shadow:
    0 0 0 6px #0a1a0c,
    0 0 40px rgba(57,255,20,0.22);
  background: #0a140a;
  padding: 8px;
  overflow: hidden;
}

.screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at center, #061406 0%, #020802 70%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.18) 2px,
      rgba(0,0,0,0.18) 4px
    );
  border: 2px solid #0f3a18;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.55);
}

/* лёгкая сетка терминала */
.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57,255,20,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,255,20,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gd);
  background: rgba(0,12,4,0.75);
}
.logo {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--g);
  text-shadow: 0 0 10px rgba(57,255,20,0.45);
}
.logo span { color: #ffe066; }
.top-right {
  margin-left: auto;
  font-size: 11px;
  color: var(--gm);
  letter-spacing: 0.06em;
}
.top-right a {
  color: var(--gm);
  text-decoration: none;
}
.top-right a:hover { color: var(--g); }

.main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  overflow-y: auto;
}

.hero {
  text-align: center;
  max-width: 420px;
  width: 100%;
}
.hero .mark {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gm);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  text-shadow: 0 0 14px rgba(57,255,20,0.3);
}
.hero p {
  font-size: 13px;
  color: var(--gm);
  line-height: 1.5;
  margin-bottom: 28px;
}

.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 16px 28px;
  border: 2px solid var(--g2);
  background: rgba(57,255,20,0.12);
  color: var(--g);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: 0.15s;
  text-shadow: 0 0 10px rgba(57,255,20,0.4);
  box-shadow: 0 0 20px rgba(57,255,20,0.15);
}
.btn-main:hover {
  background: rgba(57,255,20,0.22);
  box-shadow: 0 0 32px rgba(57,255,20,0.35);
  transform: translateY(-1px);
}

.card {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--gd);
  background: rgba(4,14,4,0.92);
  padding: 22px 20px;
  box-shadow: 0 0 24px rgba(57,255,20,0.05);
}
.card h1 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.label {
  display: block;
  font-size: 11px;
  color: var(--gm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.input {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--gd);
  background: #010601;
  color: var(--g);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}
.input:focus {
  border-color: var(--g2);
  box-shadow: 0 0 12px rgba(57,255,20,0.2);
}
.input::placeholder { color: #145020; }

/* Фикс белого автозаполнения браузера */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #010601 inset !important;
  box-shadow: 0 0 0 1000px #010601 inset !important;
  -webkit-text-fill-color: var(--g) !important;
  caret-color: var(--g) !important;
  border-color: var(--gd) !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
  border-color: var(--g2) !important;
  -webkit-box-shadow: 0 0 0 1000px #010601 inset, 0 0 12px rgba(57,255,20,0.2) !important;
  box-shadow: 0 0 0 1000px #010601 inset, 0 0 12px rgba(57,255,20,0.2) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border: 2px solid var(--g2);
  background: rgba(57,255,20,0.12);
  color: var(--g);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s;
}
.btn:hover {
  background: rgba(57,255,20,0.22);
  box-shadow: 0 0 14px rgba(57,255,20,0.22);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row .btn { width: auto; flex: 1; }
.btn-ghost {
  border-color: var(--gd);
  background: transparent;
  color: var(--gm);
  font-weight: 600;
}
.btn-ghost:hover { color: var(--g); border-color: var(--gm); }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tabs button {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--gd);
  background: transparent;
  color: var(--gm);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
}
.tabs button.on {
  border-color: var(--g2);
  color: var(--g);
  background: rgba(57,255,20,0.1);
}

.code {
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
  padding: 16px 0 8px;
  cursor: pointer;
  user-select: all;
  text-shadow: 0 0 18px rgba(57,255,20,0.4);
}
.bar {
  height: 3px;
  background: rgba(57,255,20,0.12);
  margin: 8px auto 0;
  max-width: 240px;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--g2);
  transition: width 0.25s linear;
}
.meta {
  text-align: center;
  font-size: 12px;
  color: var(--gm);
  margin-top: 10px;
}
.meta b { color: var(--g); font-weight: 600; }
.hint { font-size: 12px; color: var(--gm); margin: -6px 0 12px; }
.msg { font-size: 13px; color: var(--gm); margin-bottom: 8px; }
.err { color: var(--red); }

.split {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 820px;
}
@media (min-width: 800px) {
  .split { grid-template-columns: 1fr 1.1fr; }
}

.foot {
  position: relative;
  z-index: 2;
  padding: 10px 16px;
  border-top: 1px solid var(--gd);
  font-size: 11px;
  color: var(--gm);
  background: rgba(0,10,3,0.85);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}
.foot a { color: var(--gm); text-decoration: none; }
.foot a:hover { color: var(--g); }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }

.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 520px;
  margin: 0 auto;
  border: 2px solid var(--g2);
  background: #031003;
  padding: 16px 18px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  display: none;
}
.cookie.show { display: block; }
.cookie p {
  font-size: 12px;
  color: var(--gm);
  line-height: 1.45;
  margin-bottom: 12px;
}
.cookie p a { color: var(--g); }
.cookie-actions { display: flex; gap: 8px; }
.cookie-actions .btn { width: auto; padding: 8px 16px; font-size: 12px; }

.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0,0,0,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-bg.show { display: flex; }
.modal {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  border: 2px solid var(--gd);
  background: #031003;
  padding: 20px;
}
.modal h2 { font-size: 14px; margin-bottom: 12px; }
.modal p, .modal li {
  font-size: 12px;
  color: var(--gm);
  line-height: 1.5;
  margin-bottom: 8px;
}
.modal ul { padding-left: 18px; margin-bottom: 12px; }
.modal .btn { margin-top: 8px; }

.toast {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 120;
  padding: 10px 14px;
  border: 1px solid var(--g2);
  background: #031003;
  font-size: 12px;
  max-width: 280px;
}
.toast.bad { border-color: var(--red); color: var(--red); }

.steps {
  border: 1px solid var(--gd);
  background: rgba(4,14,4,0.9);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--gm);
  line-height: 1.55;
}
.steps b { color: var(--g); font-weight: 600; }
.steps ol { padding-left: 18px; margin-top: 6px; }
.steps li { margin-bottom: 4px; }

.acc-list { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; }
.acc-item {
  border: 1px solid var(--gd);
  padding: 12px;
  background: rgba(0,8,0,0.5);
  min-height: 48px;
  overflow: hidden;
}
.acc-item .login {
  font-size: 12px;
  color: var(--gm);
  margin-bottom: 6px;
}
.acc-item .login b { color: var(--g); }
.acc-item .code-sm {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  user-select: all;
  text-shadow: 0 0 12px rgba(57,255,20,0.35);
}

/* button pulse */
.btn-main, .btn {
  position: relative;
  overflow: hidden;
}
.btn-main::after, .btn:not(.btn-ghost)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(57,255,20,0.25) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: sheen 3.5s ease-in-out infinite;
}
@keyframes sheen {
  0%, 60% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}
.btn-main:hover, .btn:hover {
  animation: btnGlow 1.2s ease-in-out infinite alternate;
}
@keyframes btnGlow {
  from { box-shadow: 0 0 12px rgba(57,255,20,0.2); }
  to { box-shadow: 0 0 28px rgba(57,255,20,0.45); }
}

.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: rgba(57,255,20,0.12);
  animation: scanMove 6s linear infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes scanMove {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.lib-search {
  width: 100%;
  margin-bottom: 12px;
}
.acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  user-select: none;
  min-height: 48px;
}
.acc-head:hover { background: rgba(57,255,20,0.06); }
.acc-head .title { font-size: 13px; font-weight: 600; }
.acc-head .meta-g { font-size: 11px; color: var(--gm); }
.acc-head .chev {
  color: var(--gm);
  transition: transform 0.2s;
  font-size: 12px;
}
.acc-item.open .chev { transform: rotate(90deg); color: var(--g); }
.acc-body {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid var(--gd);
}
.acc-item.open .acc-body { display: block; }
.cred {
  font-size: 12px;
  margin: 10px 0;
  color: var(--gm);
  word-break: break-all;
}
.cred b { color: var(--g); cursor: pointer; }
.cred b:hover { text-decoration: underline; }
.games-list {
  list-style: none;
  font-size: 12px;
  color: var(--gm);
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.45;
}
.games-list li { padding: 2px 0; border-bottom: 1px dashed rgba(26,107,40,0.35); }
.games-list li mark {
  background: rgba(57,255,20,0.2);
  color: var(--g);
  padding: 0 2px;
}
.empty-lib { color: var(--gm); font-size: 13px; padding: 8px 0; }

.acc-head-text { min-width: 0; flex: 1; }
.acc-login {
  font-size: 14px;
  font-weight: 700;
  color: var(--g) !important;
  text-shadow: 0 0 8px rgba(57,255,20,0.35);
  word-break: break-all;
}
.acc-count {
  font-size: 11px;
  color: var(--gm) !important;
  margin-top: 3px;
}
.copyable {
  color: var(--g) !important;
  cursor: pointer;
}
.copyable:hover { text-decoration: underline; }
#locked {
  padding: 12px 0;
  color: var(--gm);
  font-size: 13px;
  line-height: 1.45;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #2a9a3a 50%), linear-gradient(135deg, #2a9a3a 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.detail-box {
  margin-top: 14px;
  border: 1px solid var(--gd);
  background: rgba(0, 8, 0, 0.5);
  padding: 14px;
}

.cred-block { margin-bottom: 14px; }
.cred-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.cred-label {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--gm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cred-val {
  border: none;
  background: transparent;
  color: var(--g);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  padding: 0;
  text-shadow: 0 0 8px rgba(57,255,20,0.3);
  word-break: break-all;
}
.cred-val:hover { text-decoration: underline; }
.cred-val-static {
  color: var(--g);
  font-size: 13px;
  word-break: break-all;
}

.games-head {
  font-size: 12px;
  color: var(--gm);
  margin-bottom: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--gd);
}
.games-ol {
  margin: 0;
  padding-left: 20px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--gm);
  line-height: 1.5;
}
.games-ol li { padding: 2px 0; }

.guard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--gd);
}
.guard-row:last-child { border-bottom: none; }
.guard-login {
  font-size: 12px;
  color: var(--gm);
  word-break: break-all;
}
.guard-code {
  border: 1px solid var(--g2);
  background: rgba(57,255,20,0.1);
  color: var(--g);
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 8px 12px;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(57,255,20,0.35);
}
.guard-code:hover {
  background: rgba(57,255,20,0.2);
  box-shadow: 0 0 14px rgba(57,255,20,0.25);
}

.guard-one {
  text-align: center;
  padding: 8px 0 4px;
}
.guard-login-big {
  font-size: 12px;
  color: var(--gm);
  margin-bottom: 10px;
  word-break: break-all;
}
.guard-one .guard-code {
  display: inline-block;
  min-width: 160px;
  font-size: 1.6rem;
  letter-spacing: 0.22em;
  padding: 12px 18px;
}


/* ===== Кабинет: без скролла страницы, список игр скроллится ===== */
html, body.page-cabinet {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
body.page-cabinet .frame {
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  box-sizing: border-box;
}
body.page-cabinet .screen {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
body.page-cabinet .top {
  flex: 0 0 auto;
}
body.page-cabinet .foot {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 10px;
  padding-bottom: 6px;
}
body.page-cabinet .main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 10px 14px 16px; 
  box-sizing: border-box;
}
body.page-cabinet .split {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: none;
  align-items: stretch;
  overflow: hidden;
  gap: 12px;
}
body.page-cabinet .split > div {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 10px;
}
body.page-cabinet .steps {
  flex: 0 1 auto;
  max-height: 22%;
  overflow: hidden !important;
}
body.page-cabinet .split > div > .card {
  flex: 0 0 auto;
}

body.page-cabinet #guardCard {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden !important;
}

body.page-cabinet .lib-card {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
body.page-cabinet #locked {
  flex: 1 1 auto;
  overflow-y: auto;
}
body.page-cabinet #libWrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.page-cabinet #libWrap > .label,
body.page-cabinet #libWrap > .input,
body.page-cabinet #libWrap > h1 {
  flex: 0 0 auto;
}
body.page-cabinet #detail.detail-box,
body.page-cabinet .detail-box {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin-top: 10px;
}
body.page-cabinet .cred-block,
body.page-cabinet .games-head {
  flex: 0 0 auto;
}
/* ВАЖНО: список игр должен скроллиться */
body.page-cabinet .games-list {
  flex: 1 1 auto !important;
  min-height: 80px !important;
  max-height: 650px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  list-style: none !important;
  margin: 0;
  padding: 0 6px 8px 0;
  font-size: 12px;
  color: var(--gm);
  line-height: 1.5;
  overscroll-behavior: contain;
}
body.page-cabinet .games-list li {
  padding: 4px 0;
  border-bottom: 1px dashed rgba(42, 154, 58, 0.15);
  list-style: none;
}
body.page-cabinet .games-list li:last-child {
  border-bottom: none;
}
body.page-cabinet .split > div:last-child {
  min-height: 0;
}
body.page-cabinet .split > div:last-child > .card {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
body.page-cabinet .split > div:last-child > .card > h1,
body.page-cabinet .split > div:last-child > .card > .label,
body.page-cabinet .split > div:last-child > .card > .input,
body.page-cabinet .split > div:last-child > .card > #locked {
  flex-shrink: 0;
}

/* Кабинет: колонки на всю ширину */
body.page-cabinet .main {
  max-width: none;
  width: 100%;
  align-items: stretch;
}
body.page-cabinet .split {
  width: 100%;
  max-width: none !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px;
}
body.page-cabinet .card,
body.page-cabinet .lib-card,
body.page-cabinet #guardCard,
body.page-cabinet .steps {
  max-width: none !important;
  width: 100%;
  box-sizing: border-box;
}
body.page-cabinet .split > div {
  width: 100%;
}


/* —— отзыв + терминальный персонаж (кабинет) —— */
.review-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--gd);
  border-radius: 8px;
  background: rgba(10, 40, 14, 0.65);
  box-shadow: inset 0 0 20px rgba(57, 255, 20, 0.06);
  position: relative;
  z-index: 2;
}

.review-text {
  flex: 1;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--g2);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.35);
  animation: reviewPulse 2.8s ease-in-out infinite;
}

@keyframes reviewPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; text-shadow: 0 0 14px rgba(57, 255, 20, 0.55); }
}

.term-buddy {
  flex-shrink: 0;
  width: 52px;
  height: 58px;
  position: relative;
  animation: buddyBob 2.2s ease-in-out infinite;
}

@keyframes buddyBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.buddy-screen {
  width: 44px;
  height: 34px;
  margin: 0 auto;
  border: 2px solid var(--g2);
  border-radius: 4px;
  background: #021002;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.35), inset 0 0 8px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.buddy-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.25) 2px,
    rgba(0, 0, 0, 0.25) 3px
  );
  pointer-events: none;
}

.buddy-eye {
  position: absolute;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--g2);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--g);
  animation: buddyBlink 3.5s step-end infinite;
}

.buddy-eye.left { left: 9px; }
.buddy-eye.right { right: 9px; }

@keyframes buddyBlink {
  0%, 42%, 46%, 100% { transform: scaleY(1); opacity: 1; }
  44% { transform: scaleY(0.15); opacity: 0.7; }
}

.buddy-mouth {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 14px;
  height: 4px;
  margin-left: -7px;
  border-bottom: 2px solid var(--g);
  border-radius: 0 0 6px 6px;
  animation: buddyTalk 1.6s ease-in-out infinite;
}

@keyframes buddyTalk {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(1.25); }
}

.buddy-body {
  width: 28px;
  height: 12px;
  margin: 4px auto 0;
  border: 1px solid var(--gd);
  border-radius: 2px;
  background: rgba(26, 107, 40, 0.4);
  position: relative;
}

.buddy-body::before,
.buddy-body::after {
  content: '';
  position: absolute;
  top: 3px;
  width: 8px;
  height: 2px;
  background: var(--gm);
}

.buddy-body::before { left: -10px; }
.buddy-body::after { right: -10px; animation: buddyWave 1.8s ease-in-out infinite; transform-origin: left center; }

@keyframes buddyWave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-25deg); }
}

.review-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start; 
  gap: 12px;                   
}
.review-text {
  flex: 1;
  margin: 0;
  text-align: left;
}
.review-link {
  flex: 0 0 auto;
  display: none; 
  font-size: 14px;
  font-weight: 600;
  color: #0a0;
  background: rgba(57,255,20,0.12);
  border: 1px solid var(--g2);
  border-radius: 6px;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(57,255,20,0.2);
}
.review-link:hover {
  background: rgba(57,255,20,0.22);
  color: var(--g2);
}

/* =========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ЕДИНЫЙ БЛОК)
   ========================================= */

input.input, select.input, textarea.input {
  font-size: 16px !important;
}

@media (max-width: 900px) {
  html, body.page-cabinet {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-x: hidden !important;
  }
  body.page-cabinet {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-height: 100dvh;
    padding: 0;
  }
  body.page-cabinet .frame {
    height: auto !important;
    max-height: none !important;
    min-height: calc(100dvh - 24px);
  }
  body.page-cabinet .screen,
  body.page-cabinet .main {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.page-cabinet .split {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
    width: 100%;
  }
  body.page-cabinet .split > div,
  body.page-cabinet .steps,
  body.page-cabinet #guardCard,
  body.page-cabinet .lib-card {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (max-width: 768px) {
  body.page-cabinet { padding: 6px !important; }
  .card, .detail-box { padding: 16px 14px; }
  .top { padding: 10px 12px; }
  .logo { font-size: 13px; }
  .foot { flex-direction: column; justify-content: center; text-align: center; gap: 12px; padding: 16px 12px; }
  .foot-links { justify-content: center; width: 100%; gap: 12px; }
  .cred-line { flex-direction: row !important; flex-wrap: wrap !important; align-items: flex-start !important; gap: 2px !important; margin-bottom: 12px !important; }
  .cred-label { flex: 0 0 auto !important; width: 100% !important; font-size: 10px !important; margin-bottom: 2px !important; }
  .cred-val { flex: 0 0 100% !important; width: 100% !important; font-size: 15px !important; }
}

@media (max-width: 640px) {
  .review-banner { padding: 10px 12px; gap: 10px; }
  .review-text { font-size: 15px; }
  .review-copy { flex-direction: column; align-items: stretch; }
  .review-link { white-space: normal; text-align: center; }
  body { padding: 6px; }
  .frame { padding: 6px; border-width: 3px; }
  .btn-main { min-width: 100%; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .btn-row { flex-direction: column; gap: 10px; }
  .btn-row .btn { width: 100%; }
  .modal { padding: 16px; max-height: 85vh; }
}

/* ===== Фикс зума (Ctrl + колесико мыши) только для ПК ===== */
@media (pointer: fine) {
  /* 1. Отключаем блокировку экрана. Теперь вся страница скроллится как обычный сайт */
  html, body.page-cabinet {
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
  }
  
  /* 2. Жестко фиксируем минимальный размер, чтобы блоки внутри никогда не плющились */
  body.page-cabinet .frame {
    height: auto !important;
    max-height: none !important;
    min-height: 750px !important; 
    min-width: 950px !important;  
  }
  
  /* 3. Принудительно удерживаем 2 колонки рядом, игнорируя зум */
  body.page-cabinet .split {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
  
  /* 4. Разрешаем внутренним блокам растягиваться вниз */
  body.page-cabinet .screen,
  body.page-cabinet .main,
  body.page-cabinet .split > div {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}