/* Сайт рекордов — палитра и шрифты «Лоскута» (docs/design/guidelines.md). Без сборки.
   Сначала телефон (ширина от 320 px): одна колонка, кнопки на всю ширину, цели касания не меньше 48 px;
   шире 720 px — крупнее шрифты и сетки. */
@font-face { font-family: "Neucha"; src: url("/site/fonts/Neucha-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "PT Sans"; src: url("/site/fonts/PTSans-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "PT Sans"; font-weight: 700; src: url("/site/fonts/PTSans-Bold.ttf") format("truetype"); font-display: swap; }

:root {
  --canvas: #C7C3B6; --bone: #ECE6D6; --muted: #B6B0A3; --coal: #3A322D; --screen: #2A2420; --soot: #231E1B;
  --rust: #8C3A24; --rust-light: #E07A5C; --mustard: #D2A23A; --moss: #8D8F62; --thorn: #5B4331;
  --seam: rgba(236, 230, 214, .55); --shadow: 6px 6px 0 rgba(0, 0, 0, .32);
  --vk: #0077FF; --ok: #EE8208; --tg: #26A5E4;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--screen); color: var(--bone); font: 16px/1.45 "PT Sans", system-ui, sans-serif; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--bone); text-underline-offset: 3px; }
h1, h2, h3, .site-title, .place, .value, .big, .game { font-family: "Neucha", "PT Sans", cursive; font-weight: 400; }
h1 { font-size: 28px; margin: 4px 0 10px; line-height: 1.15; }
h2 { font-size: 22px; margin: 0 0 10px; line-height: 1.2; }
.muted, .date { color: var(--muted); }
.site-header, .site-main, .site-footer { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
.site-header { padding-top: 12px; padding-bottom: 4px; }
.site-title { font-size: 20px; text-decoration: none; color: var(--mustard); display: inline-block; padding: 6px 0; }
.site-footer { color: var(--muted); font-size: 14px; padding-top: 20px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.site-footer a { color: var(--muted); }

.panel { background: var(--coal); border: 2px dashed var(--seam); border-radius: 6px; padding: 14px; margin: 14px 0; box-shadow: var(--shadow); }
.empty { color: var(--muted); font-size: 18px; margin: 20px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; background: var(--coal); color: var(--bone);
  border: 2px dashed var(--seam); border-radius: 6px; padding: 8px 16px; font: 19px "Neucha", cursive; text-decoration: none; cursor: pointer; }
.btn:hover, .btn:focus-visible { border-color: var(--mustard); color: var(--mustard); outline: none; }

/* Иконки */
.icon { width: 24px; height: 24px; flex: none; display: block; }

/* Кнопки публикации: соцсети в ряд из трёх (иконка над подписью), затем «Скопировать ссылку» и две картинки */
.share-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.share-grid > * { grid-column: span 3; }
.share-grid > .share-vk, .share-grid > .share-ok, .share-grid > .share-tg { grid-column: span 2; flex-direction: column; justify-content: center;
  gap: 6px; min-height: 72px; padding: 10px 4px; font-size: 13px; text-align: center; }
.share-grid > .share-vk .icon, .share-grid > .share-ok .icon, .share-grid > .share-tg .icon { width: 28px; height: 28px; }
.share-btn { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border-radius: 8px;
  border: 2px solid transparent; background: var(--screen); color: var(--bone); font: 16px/1.15 "PT Sans", sans-serif; font-weight: 700;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; min-width: 0; }
.share-btn span { overflow-wrap: normal; word-break: normal; hyphens: none; }
.share-btn:active { transform: translateY(1px); }
.share-btn:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.share-vk { background: var(--vk); color: #fff; }
.share-ok { background: var(--ok); color: #fff; }
.share-tg { background: var(--tg); color: #fff; }
.share-grid > .share-copy { grid-column: 1 / -1; }
.share-copy { justify-content: center; border: 2px dashed var(--seam); }
.share-file { border: 2px dashed var(--seam); justify-content: center; }
.share-status { color: var(--moss); margin: 8px 0 0; text-align: center; }
.share-status:empty { display: none; }

/* Персонажи: круглые медальоны с костяным ободком (как в лаунчере) */
.chars { display: inline-flex; vertical-align: middle; }
.char { display: block; border-radius: 50%; object-fit: cover; object-position: center top; background: var(--canvas);
  border: 2px solid var(--bone); }
.chars-sm .char { width: 28px; height: 28px; margin-right: 6px; }
.chars-sm .char + .char { margin-left: -14px; }
.chars-lg .char { width: 72px; height: 72px; border-width: 3px; }
.chars-lg .char + .char { margin-left: -18px; }
.char-itria { transform: scaleX(-1); }

/* Карточка рекорда */
.record-card .crew { display: block; width: 100%; height: auto; max-height: 220px; object-fit: cover; border-radius: 4px; }
.record-who { display: flex; align-items: flex-end; gap: 12px; margin-top: -22px; padding: 0 6px; position: relative; }
.record-who > div { min-width: 0; padding-bottom: 2px; }
.record-who .game { font-size: 24px; margin: 0; line-height: 1.1; }
.record-who .played-for { margin: 2px 0 0; color: var(--muted); }
.record-card .big { font-size: 40px; color: var(--mustard); margin: 10px 0 0; line-height: 1.1; overflow-wrap: anywhere; }
.record-card .record-date { color: var(--muted); margin: 4px 0 0; }
.record-card .challenge { font: 22px/1.25 "Neucha", cursive; color: var(--rust-light); margin: 10px 0 4px; }
.badge { display: inline-block; border-radius: 4px; padding: 6px 10px; margin: 8px 0 0; }
.badge.beaten { background: var(--rust); color: var(--bone); }
.badge.reset { background: var(--thorn); color: var(--bone); }
.badge.place { background: var(--mustard); color: var(--soot); font-family: "Neucha", cursive; font-size: 20px; }

/* Таблицы: на телефоне компактно, без горизонтальной прокрутки */
table.records { width: 100%; border-collapse: collapse; table-layout: auto; }
table.records th { text-align: left; color: var(--muted); font-weight: 400; font-size: 13px; padding: 4px; }
table.records td { padding: 8px 4px; border-top: 1px dashed rgba(236, 230, 214, .2); vertical-align: middle; font-size: 15px; }
table.records td.place { width: 1.6em; font-size: 19px; }
table.records td.value { font-size: 19px; }
table.records td.value a { text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
table.records tr.first td.place, table.records tr.first td.value a { color: var(--mustard); }
table.records td.date { white-space: nowrap; font-size: 13px; }

/* Схематичная карта баров: условная схема города без координат, поверх — заплатки */
.scheme { position: relative; background: var(--canvas); border-radius: 6px; padding: 22px 12px; margin: 14px 0; overflow: hidden; }
.scheme-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scheme-bg .street { fill: none; stroke: var(--soot); stroke-opacity: .25; stroke-width: 1.2; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.scheme-bg .river { fill: var(--thorn); fill-opacity: .55; }
.patches { position: relative; display: grid; grid-template-columns: 1fr; gap: 20px; }
.patch { position: relative; display: flex; flex-direction: column; gap: 4px; background: var(--coal); color: var(--bone);
  border: 2px dashed var(--seam); border-radius: 6px; padding: 20px 14px 12px; text-decoration: none; transform: rotate(var(--tilt, 0deg));
  box-shadow: var(--shadow); min-width: 0; }
.patch:hover, .patch:focus-visible { border-color: var(--mustard); outline: none; }
.pin { position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--rust); border: 2px solid var(--soot); }
.patch-name { font-family: "Neucha", cursive; font-size: 22px; }
.patch-address { color: var(--muted); font-size: 14px; }
.patch-game { font-size: 15px; overflow-wrap: anywhere; }
.patch-game.first { color: var(--mustard); }
.game-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.game-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 2px dashed var(--seam); border-radius: 6px;
  text-decoration: none; font: 18px "Neucha", cursive; }
.my-records ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.my-records a { display: inline-flex; align-items: center; min-height: 40px; }

/* Яндекс Карты */
.venue-yandex .links { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; }
.venue-yandex .links a { display: inline-flex; align-items: center; min-height: 40px; }
.yandex-consent { background: var(--screen); border: 2px dashed var(--seam); border-radius: 6px; padding: 12px; }
.yandex-consent p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.yandex-consent .btn { width: 100%; }
.yandex-widget { display: block; border: 0; border-radius: 6px; }
.prose p { margin: 0 0 12px; }
.prose h2 { margin-top: 14px; }

@media (min-width: 720px) {
  body { font-size: 17px; }
  h1 { font-size: 34px; margin-top: 8px; }
  h2 { font-size: 24px; }
  .panel { padding: 18px; margin: 18px 0; }
  .share-grid > .share-vk, .share-grid > .share-ok, .share-grid > .share-tg { font-size: 15px; }
  .record-who { margin-top: -36px; }
  .record-card .crew { max-height: 300px; }
  .record-card .big { font-size: 48px; }
  .chars-lg .char { width: 96px; height: 96px; }
  .patches { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
  .scheme { padding: 28px 16px; }
  .venue-yandex .links { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .yandex-consent .btn { width: auto; }
  table.records td { font-size: 16px; padding: 8px 6px; }
  table.records td.date { font-size: 15px; }
}
