/* /friends/: вход и страница друга. Тема и компоненты (.key, .index, .sec) из /design/, здесь только своё. */

.hero .meta { margin-top: 20px; font: 500 12px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.hero .meta b { color: var(--text); font-weight: 500; }

.notice {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  margin: 0 calc(-1 * var(--pad)); padding: 16px var(--pad); border-top: 1px solid var(--line);
  background: var(--accent); color: var(--on-accent);
}
.notice[hidden] { display: none; }
.notice .key { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
.notice .key:disabled { background: transparent; color: var(--on-accent); border-color: currentColor; opacity: .8; }

/* статус в правой колонке указателя */
.index.status .row { grid-template-columns: 44px minmax(0, 4fr) minmax(0, 5fr) 180px; }
.index .row .k.on { color: var(--ok-ink); }
.index .row .k .led-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.index .row .k.on .led-dot { box-shadow: 0 0 6px currentColor; }
a.row:hover .k.on { color: var(--bg); }

/* плашка с блёстками (style: "glitter" в projects.json): розовая, блик идёт по ряду, точки мерцают */
.index .row.glitter {
  position: relative; overflow: hidden; color: #4A0F2E;
  background: linear-gradient(110deg, #FFC2DA, #FF8FBC 45%, #FFB3D1 70%, #FFD3E4);
}
.index .row.glitter > * { position: relative; z-index: 1; }
.index .row.glitter .no, .index .row.glitter .d, .index .row.glitter .k { color: #7A2350; }
.index .row.glitter::before, .index .row.glitter::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.index .row.glitter::before {
  background:
    radial-gradient(circle, #fff 0 1px, transparent 1.6px) 0 0 / 37px 29px,
    radial-gradient(circle, #FFF3B0 0 1.2px, transparent 1.8px) 11px 17px / 53px 41px,
    radial-gradient(circle, #fff 0 .8px, transparent 1.4px) 23px 7px / 29px 43px;
  animation: glitter 2.4s steps(4, jump-none) infinite;
}
.index .row.glitter::after {
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%) 0 0 / 250% 100%;
  animation: sheen 4.5s linear infinite;
}
@keyframes glitter {
  0% { opacity: .9; background-position: 0 0, 11px 17px, 23px 7px; }
  33% { opacity: .45; background-position: 9px 13px, 31px 3px, 5px 21px; }
  66% { opacity: 1; background-position: 21px 5px, 3px 29px, 15px 33px; }
  100% { opacity: .6; background-position: 5px 19px, 41px 11px, 27px 3px; }
}
@keyframes sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
a.row.glitter:hover { background: linear-gradient(110deg, #FF8FBC, #F0559A 45%, #FF8FBC 70%, #FFC2DA); color: #4A0F2E; }
a.row.glitter:hover .no, a.row.glitter:hover .d, a.row.glitter:hover .k { color: #4A0F2E; opacity: 1; }

.skel .t, .skel .d { display: block; height: 18px; background: var(--surface); animation: breathe 1.4s ease-in-out infinite; }
.skel .t { width: 50%; }
.skel .d { width: 80%; }
@keyframes breathe { 50% { opacity: .5; } }

.admin-note { padding: 14px var(--pad); border-top: 1px solid var(--border); font: 500 12px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.admin-note[hidden] { display: none; }

/* вход: слева шаги и клавиша, справа — ячейка с QR */
.gate { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.gate-main { display: flex; flex-direction: column; }
.steps { list-style: none; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 0 20px; padding: 18px var(--pad); font-size: 20px; font-weight: 550; letter-spacing: -.015em; line-height: 1.3; }
.steps li + li { border-top: 1px solid var(--border); }
.steps li::before { counter-increment: s; content: "0" counter(s); font: 500 12px/2 var(--mono); color: var(--accent); }
.desk .steps li.only-mobile, .mobile .steps li.only-desk { display: none; }
.mobile .steps li.only-mobile { border-top: 0; }

.gate-act { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: auto; padding: 18px var(--pad); border-top: 1px solid var(--line); }
.gate-act .key { height: 42px; padding: 0 18px; }
.alt { font: 500 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.state { display: flex; align-items: center; gap: 10px; font: 500 12px/1.5 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.state::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.wait::before, .state.hot::before { animation: breathe 1.2s ease-in-out infinite; }
.state.hot { color: var(--accent); }
.state.good { color: var(--ok-ink); }
.state.good::before { box-shadow: 0 0 6px currentColor; }
.state.bad { color: var(--bad-ink); }

.qr-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.qr-box { padding: var(--pad); background: #fff; border-bottom: 1px solid var(--line); }
.qr-box svg, .qr-box .ph { display: block; width: 100%; aspect-ratio: 1; }
.qr-box .ph { background: #E4E4DF; animation: breathe 1.4s ease-in-out infinite; }
.code-row { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--pad); font: 500 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.code { font-size: 24px; letter-spacing: .14em; color: var(--text); }
.mobile .qr-side { display: none; }
.mobile.show-qr .qr-side { display: flex; }
.desk .only-mobile, .mobile .only-desk { display: none; }

@media (max-width: 760px) {
  .index.status .row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .gate { grid-template-columns: 1fr; }
  .qr-side { border-left: 0; border-top: 1px solid var(--line); }
  .qr-box { max-width: 320px; }
  .steps li { font-size: 18px; grid-template-columns: 30px 1fr; gap: 0 10px; }
}

