/* Профиль. Одна колонка: карточка игрока, числа, коллекция узоров. */

.profile {
  padding: clamp(34px, 6vw, 68px) 0 clamp(56px, 9vw, 100px);
  display: flex;
  flex-direction: column;
  gap: clamp(34px, 5vw, 62px);
}

.idcard {
  display: flex;
  align-items: center;
  gap: var(--gap-4);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(214, 178, 92, 0.09), transparent 60%),
    rgba(22, 26, 24, 0.6);
  flex-wrap: wrap;
}

.idcard__seal {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  position: relative;
  flex-shrink: 0;
}

.idcard__seal::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px dashed var(--line);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.idcard__seal:hover::after {
  opacity: 1;
}

.idcard__acts {
  display: flex;
  gap: var(--gap-2);
}

.idcard__text {
  flex: 1;
  min-width: 180px;
}

.idcard h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  margin: 4px 0 6px;
}

.idcard .muted {
  font-size: 13px;
}

.renamebox {
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(214, 178, 92, 0.04);
  margin-top: calc(-1 * clamp(34px, 5vw, 62px) + var(--gap-3));
}

.renamebox[hidden] {
  display: none;
}

.renamebox label {
  display: block;
  font-size: 12px;
  color: var(--dim);
  margin-bottom: var(--gap-2);
}

.renamebox__row {
  display: flex;
  gap: var(--gap-2);
  max-width: 420px;
}

.renamebox__row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 16px;
  padding: 11px 13px;
  color: var(--ivory);
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.renamebox__row input:focus {
  border-color: var(--gold-dim);
  outline: none;
}

.renamebox__note {
  font-size: 12px;
  margin-top: var(--gap-2);
  max-width: 60ch;
}

.renamebox__note.is-bad {
  color: var(--alarm);
}

/* Числа */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  overflow: hidden;
}

.stat {
  background: var(--lacquer);
  padding: var(--gap-4) var(--gap-3);
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1;
  color: var(--gold);
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.stat--quiet b {
  color: var(--ivory);
}

/* Коллекция */
.collection__lede {
  margin-bottom: var(--gap-5);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: var(--gap-2);
}

.pcard {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: var(--gap-3);
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

/* Заливка снизу — доля этого узора среди забранных. */
.pcard::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 0%);
  background: linear-gradient(180deg, rgba(214, 178, 92, 0.16), rgba(214, 178, 92, 0.05));
  pointer-events: none;
}

.pcard--none {
  opacity: 0.45;
}

.pcard:hover {
  border-color: var(--line);
}

.pcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-2);
  position: relative;
}

.pcard .mini {
  width: 40px;
  height: 34px;
}

.pcard__count {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold);
}

.pcard--none .pcard__count {
  color: var(--faint);
}

.pcard__name {
  font-size: 13.5px;
  position: relative;
}

.pcard__pts {
  font-size: 10.5px;
  color: var(--faint);
  position: relative;
}

.notice {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--gap-4);
  max-width: 74ch;
}

.notice p {
  font-size: 14px;
  margin-top: var(--gap-3);
}

/* ------------------------------------------------------------------ */
/* Печать и ключ                                                       */
/* ------------------------------------------------------------------ */

.stampbox {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: var(--gap-4);
  background: rgba(214, 178, 92, 0.04);
  margin-top: calc(-1 * clamp(34px, 5vw, 62px) + var(--gap-3));
}

.stampbox[hidden] {
  display: none;
}

.stampbox .muted {
  font-size: 13px;
  margin-bottom: var(--gap-3);
}

.stamp__grid {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: var(--gap-2);
}

.stamp__cell {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.stamp__cell:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.stamp__cell--on {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--gold);
}

.keybox {
  margin-top: var(--gap-4);
  padding: var(--gap-3);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: rgba(7, 9, 7, 0.5);
  display: flex;
  flex-direction: column;
  gap: var(--gap-2);
  max-width: 560px;
}

.keybox__row {
  display: flex;
  align-items: center;
  gap: var(--gap-2);
  flex-wrap: wrap;
}

.keybox code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  background: var(--deep);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.keybox input {
  flex: 1;
  min-width: 180px;
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  color: var(--ivory);
  background: var(--deep);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}

.keybox input:focus {
  border-color: var(--gold-dim);
  outline: none;
}

.keybox__note {
  font-size: 11.5px;
  line-height: 1.5;
}

.notice b {
  color: var(--ivory);
  font-weight: 500;
}
