* { box-sizing: border-box; }

:root {
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --paper: #faf9f5;
  --ink: #1f1e1b;
  --terra: #d97757;
  --wall: #46423a;
  --wall-deep: #3a362f;
  --muted: #8a887f;
  --cream: #f6f3ea;
  --mint: #9fe1cb;
}

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
}

html, body {
  margin: 0;
  height: 100%;
  background: #faf9f5;
  color: #1f1e1b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#app[data-state="cover"] #timer { display: none; }

.menu-btn {
  font: inherit;
  font-size: 15px;
  border: none;
  cursor: pointer;
  line-height: inherit;
}

#menu[hidden] { display: none; }

#menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 250;
  min-width: 224px;
  background: #ffffff;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(40, 35, 20, 0.22), 0 0 0 1px #eceadf;
}

.menu-item {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 9px;
  background: none;
  color: #1f1e1b;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover { background: #f5f3ec; }

.menu-item.menu-static { cursor: default; }

.menu-item.menu-static:hover { background: none; }

.menu-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #8a887f;
}

.menu-arrow {
  color: #b4b2a9;
  font-size: 16px;
  line-height: 1;
}

header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
}

#app[data-state="cover"] .progress-wrap,
#app[data-state="cover"] #stage { display: none; }

#app[data-state="play"] #cover { display: none; }

#cover {
  flex: 1;
  margin-top: 10px;
  background: var(--wall) radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, 0.07), transparent 55%);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 16px;
}

.duel-banner {
  margin: 0;
  max-width: 340px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: #fff;
  background: rgba(217, 119, 87, 0.92);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.cover-art-wrap {
  position: relative;
  width: min(66%, 280px);
  aspect-ratio: 4 / 3;
  background: #fbf9f4;
  padding: 9px;
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 3px 8px rgba(0, 0, 0, 0.3);
}

.cover-art {
  position: absolute;
  inset: 9px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2px;
  background: #2f2b25;
}

.cover-tile {
  background: linear-gradient(135deg, #57524a 0%, #4c4740 55%, #423d36 100%);
  background-repeat: no-repeat;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.cover-meta { text-align: center; }

.cover-title {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b0a892;
}

.cover-teaser {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cream);
}

#start-btn {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  width: min(100%, 320px);
  padding: 14px 0;
  border-radius: 12px;
  border: none;
  background: var(--terra);
  color: #ffffff;
  cursor: pointer;
}

#start-btn:hover { filter: brightness(1.07); }

#start-btn { animation: cta-breathe 2.8s ease-in-out infinite; }

#start-btn:active { transform: scale(0.97); animation: none; }

@keyframes cta-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(217, 119, 87, 0.3); }
  50% { transform: scale(1.02); box-shadow: 0 8px 24px rgba(217, 119, 87, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
  #start-btn { animation: none; }
  .cover-tile { transition: none; }
  #reveal.show .reveal-art-wrap,
  .reveal-art-wrap::before,
  #reveal.show .reveal-body,
  .streak-line .streak-n,
  #board.done,
  .piece.placed.pop { animation: none; }
  #board { transition: box-shadow 0.6s ease, background 0.6s ease; }
}

.cover-record {
  margin: 0;
  font-size: 12px;
  color: #b0a892;
}

.cover-streak {
  margin: -6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #e8c547;
}

.cover-streak.urgent {
  color: #fff;
  background: rgba(217, 119, 87, 0.92);
  border-radius: 999px;
  padding: 7px 14px;
}

.foot-link {
  color: #d97757;
  text-decoration: none;
}

#cover .cover-about { color: #b0a892; }

#cover .cover-about:hover { color: var(--cream); }

.cover-about {
  font-size: 12px;
  margin-top: -4px;
}

.day-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 0;
}

.day-arrow {
  font: inherit;
  font-size: 20px;
  width: 36px;
  height: 36px;
  padding: 0;
  line-height: 33px;
  border: 1px solid #dcd9cd;
  border-radius: 50%;
  background: #ffffff;
  color: #55534c;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(40, 35, 20, 0.08);
}

.day-arrow:active { background: #f0eee6; }

.day-arrow:disabled { opacity: 0.3; cursor: default; box-shadow: none; }

.date {
  margin: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #1f1e1b;
  border: 1px solid #dcd9cd;
  border-radius: 999px;
  background: #ffffff;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(40, 35, 20, 0.08);
}

.date:active { background: #f0eee6; }

.date-caret { font-size: 10px; color: #8a887f; }

.hud { display: flex; gap: 6px; }

.pill.streak { background: #faeeda; color: #854f0b; }

.pill.streak[hidden] { display: none; }

.pill {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #f0eee6;
  color: #55534c;
  border-radius: 999px;
  padding: 5px 11px;
}

.tagline {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #8a887f;
}

.collection-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 13px;
  color: #d9d5c9;
  margin: 0 0 14px;
}

.collection-row > span { white-space: nowrap; }

.museum-link {
  margin-left: auto;
  color: #e89a7a;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.museum-link:hover { color: #f0b299; }

.tomorrow {
  border-top: 1px solid rgba(246, 243, 234, 0.16);
  padding: 12px 0 0;
  margin: 0 0 16px;
  text-align: center;
}

.tomorrow-teaser {
  margin: 0 0 3px;
  font-size: 14px;
  color: var(--cream);
}

.tomorrow-teaser em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
}

#next-line {
  margin: 0;
  font-size: 12px;
  color: #a09a8c;
  font-variant-numeric: tabular-nums;
}

.tagline strong { color: #55534c; font-weight: 600; }

.progress-wrap { margin: 12px 0 10px; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #8a887f;
  margin-bottom: 5px;
}

.progress-track {
  height: 5px;
  background: #ecebe3;
  border-radius: 999px;
  overflow: hidden;
}

.progress-track.pulse { animation: prog-pulse 0.15s ease; }

@keyframes prog-pulse {
  50% { transform: scaleY(1.6); }
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--terra);
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.progress-fill.last { background: #4d9166; }

#app[data-state="play"] .day-nav { display: none; }

#stage {
  position: relative;
  flex: 1;
  touch-action: none;
  background: var(--wall) radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, 0.06), transparent 55%);
  border-radius: 16px;
  overflow: hidden;
}

.stage-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 30;
  pointer-events: none;
  animation: dim-in 0.45s ease both;
}

@keyframes dim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

#stage::before,
#stage::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 26px;
  height: var(--tray-h, 0px);
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#stage::before {
  left: 0;
  background: linear-gradient(90deg, #46423a, rgba(70, 66, 58, 0));
}

#stage::after {
  right: 0;
  background: linear-gradient(270deg, #46423a, rgba(70, 66, 58, 0));
}

#stage.tray-fade-l::before { opacity: 1; }

#stage.tray-fade-r::after { opacity: 1; }

.tray-nav {
  position: absolute;
  z-index: 45;
  width: 30px;
  height: 30px;
  padding: 0;
  transform: translateY(-50%);
  border: none;
  border-radius: 50%;
  background: rgba(20, 19, 16, 0.55);
  color: #f5f3ec;
  font: inherit;
  font-size: 19px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
}

.tray-nav:active { background: rgba(20, 19, 16, 0.8); }

.tray-nav-l { left: 5px; }

.tray-nav-r { right: 5px; }

.tray-scrollbar {
  position: absolute;
  left: 16px;
  right: 16px;
  height: 4px;
  border-radius: 999px;
  background: rgba(246, 243, 234, 0.14);
  z-index: 45;
}

.tray-thumb {
  height: 100%;
  border-radius: 999px;
  background: rgba(246, 243, 234, 0.45);
  transition: transform 0.15s ease-out, width 0.15s ease-out;
}

.tray-scrollbar.live .tray-thumb { transition: none; }

#board {
  position: absolute;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.6s ease, background 0.6s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

#board .cell {
  position: absolute;
  border: 1px dashed rgba(250, 249, 245, 0.26);
  border-radius: 3px;
  transition: opacity 0.4s ease, background 0.12s ease, border-color 0.12s ease;
}

/* Нейтральная подсветка ячейки под фрагментом — без подсказки, где его место */
#board .cell.hover {
  border-color: rgba(250, 249, 245, 0.55);
  background: rgba(250, 249, 245, 0.07);
}

#board .cell.ring {
  animation: cell-ring 0.35s ease-out;
}

/* Выбранная ячейка не подходит выбранному фрагменту */
#board .cell.reject {
  border-style: solid;
  border-color: rgba(192, 57, 43, 0.9);
  background: rgba(192, 57, 43, 0.22);
  animation: cell-shake 0.3s ease;
}

@keyframes cell-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@keyframes cell-ring {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 87, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(217, 119, 87, 0); }
}

#board.done .cell { opacity: 0; }

/* Поднятая доска — над притемнением стола (z 30), в луче света */
#board.done {
  background: transparent;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 80px rgba(217, 119, 87, 0.25);
  transform: scale(1.03) translateY(-6px);
  z-index: 35;
}

@keyframes settle-board {
  0% { transform: scale(1); }
  35% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

.piece {
  position: absolute;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
  touch-action: none;
  cursor: grab;
  transform-origin: top left;
  will-change: transform, left, top;
  -webkit-user-select: none;
  user-select: none;
}

.piece.animated { transition: left 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1); }

.piece.lifting { transition: transform 0.12s ease-out; }

.piece.dragging {
  cursor: grabbing;
  z-index: 50;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}

.piece.placed {
  filter: none;
  cursor: default;
  z-index: 1;
}

/* Фрагмент выбран тапом — ждёт клика по своей ячейке */
.piece.selected {
  z-index: 40;
  animation: sel-pulse 1.2s ease-in-out infinite;
}

@keyframes sel-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(217, 119, 87, 0.85)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)); }
  50% { filter: drop-shadow(0 0 11px rgba(217, 119, 87, 1)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)); }
}

/* Собранная картина остаётся в свету над притемнённым столом */
#board.done ~ .piece.placed { z-index: 36; }


#calendar[hidden] { display: none; }

#calendar {
  position: fixed;
  inset: 0;
  background: rgba(31, 30, 27, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.cal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 18px 14px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 16px 48px rgba(40, 35, 20, 0.3);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-head p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  text-transform: capitalize;
}

.cal-nav {
  font: inherit;
  font-size: 20px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #dcd9cd;
  background: #ffffff;
  color: #55534c;
  cursor: pointer;
}

.cal-nav:disabled { opacity: 0.3; cursor: default; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-wd {
  font-size: 11px;
  color: #8a887f;
  text-align: center;
  padding: 4px 0;
}

.cal-day {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid #e7e4d9;
  background: #ffffff;
  color: #1f1e1b;
  cursor: pointer;
  position: relative;
}

.cal-day:hover { border-color: #d97757; }

.cal-day.today { border: 2px solid #d97757; font-weight: 700; }

.cal-day.solved { background: #eaf3de; border-color: #c0dd97; color: #3b6d11; }

.cal-day.solved::after {
  content: "✓";
  position: absolute;
  right: 3px;
  top: 1px;
  font-size: 9px;
  color: #3b6d11;
}

.cal-day.future,
.cal-day.blank {
  background: #f5f3ec;
  border-color: transparent;
  color: #b4b2a9;
  cursor: default;
}

.cal-day.future::after {
  content: "🔒";
  position: absolute;
  right: 2px;
  top: 1px;
  font-size: 8px;
}

.cal-day.blank { visibility: hidden; }

.cal-day.selected { box-shadow: 0 0 0 2px #1f1e1b inset; }

.cal-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #d97757;
  line-height: 1;
  pointer-events: none;
}

.cal-legend {
  margin: 10px 0 0;
  font-size: 11px;
  color: #8a887f;
  text-align: center;
}

#tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
}

.tut-target {
  position: relative;
  z-index: 302 !important;
  box-shadow: 0 0 0 4px #d97757 !important;
  border-radius: 12px;
}

.tour-bubble {
  position: fixed;
  z-index: 303;
  width: 264px;
  background: #ffffff;
  color: #1f1e1b;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.tour-bubble p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
}

.tour-bubble button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  padding: 8px 0;
  border-radius: 8px;
  border: none;
  background: #d97757;
  color: #ffffff;
  cursor: pointer;
}

.play-hint {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(88vw, 400px);
  background: rgba(20, 19, 16, 0.92);
  color: #f5f3ec;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 16px;
  border-radius: 999px;
  text-align: center;
  z-index: 150;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.play-hint.show { opacity: 1; }

.diff-row {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
}

.diff-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 243, 234, 0.35);
  background: transparent;
  color: #d9d3c4;
  cursor: pointer;
}

.diff-btn:hover { border-color: rgba(246, 243, 234, 0.65); }

.diff-btn .diff-n {
  font-weight: 500;
  color: #b0a892;
}

.diff-btn.active {
  background: var(--terra);
  border-color: var(--terra);
  color: #ffffff;
}

.diff-btn.active .diff-n { color: rgba(255, 255, 255, 0.75); }

.piece.placed.pop { animation: settle-piece 0.18s ease; }

@keyframes settle-piece {
  0% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@media (min-width: 800px) {
  #app { max-width: 1160px; }
  .tagline, .progress-wrap { max-width: 640px; }
}

#reveal {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: rgba(18, 17, 14, 0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 100;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
}

#reveal.show {
  opacity: 1;
  pointer-events: auto;
}

.reveal-inner {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reveal-art-wrap {
  position: relative;
  text-align: center;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 60px rgba(232, 154, 90, 0.4)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6));
}

/* Лучи за картиной — «открылся сундук с лутом» */
.reveal-art-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(150vmin, 980px);
  height: min(150vmin, 980px);
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(232, 197, 71, 0.13) 0deg 6deg, transparent 6deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, rgba(0, 0, 0, 0.95), transparent 72%);
  mask-image: radial-gradient(closest-side, rgba(0, 0, 0, 0.95), transparent 72%);
  animation: rays-spin 48s linear infinite;
  pointer-events: none;
}

@keyframes rays-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

#reveal-art {
  position: relative;
  max-width: min(82%, 380px);
  max-height: 34vh;
  border: 8px solid #f6f3ea;
  border-radius: 3px;
  display: inline-block;
}

#reveal.show .reveal-art-wrap {
  animation: art-pop 0.7s cubic-bezier(0.26, 1.35, 0.45, 1) 0.1s both, glow-settle 1.8s ease 0.15s both;
}

@keyframes art-pop {
  0% { transform: scale(0.55) translateY(40px); opacity: 0; }
  62% { transform: scale(1.05) translateY(-4px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes glow-settle {
  0% { filter: drop-shadow(0 0 130px rgba(232, 154, 90, 0.95)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)); }
  100% { filter: drop-shadow(0 0 60px rgba(232, 154, 90, 0.4)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)); }
}

#reveal.show .reveal-body {
  animation: fade-up 0.5s ease 0.45s both;
}

@keyframes fade-up {
  0% { transform: translateY(18px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.confetti {
  position: absolute;
  left: 50%;
  top: 34%;
  z-index: 5;
  border-radius: 2px;
  pointer-events: none;
}

.solved-line {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint);
  text-align: center;
}

.time-hero {
  margin: 0;
  font-size: 46px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
  text-align: center;
  line-height: 1.1;
}

.time-compare {
  margin: 2px 0 0;
  font-size: 13px;
  color: #a09a8c;
  text-align: center;
}

.time-compare.record { color: var(--terra); font-weight: 600; }

.duel-verdict {
  margin: 8px auto 0;
  max-width: 340px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  background: rgba(217, 119, 87, 0.25);
  border: 1px solid rgba(217, 119, 87, 0.6);
  border-radius: 10px;
  padding: 8px 14px;
}

.streak-line {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #e8c547;
  text-align: center;
}

.streak-line .streak-n {
  display: inline-block;
  animation: streak-roll 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.9s both;
}

@keyframes streak-roll {
  0% { transform: translateY(0.7em); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}


#reveal h2 {
  margin: 18px 0 5px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
  color: #ffffff;
  text-align: center;
}

.art-meta {
  margin: 0 auto 14px;
  padding-bottom: 12px;
  max-width: 320px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #a09a8c;
  text-align: center;
  border-bottom: 1px solid rgba(246, 243, 234, 0.16);
}

.art-story {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #d9d5c9;
}

/* Блок вызова: заголовок объясняет замысел, кнопки — конкретные действия */
.share-block {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 14px 14px 12px;
}

.share-head {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  text-align: center;
}

.share-sub {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #a09a8c;
  text-align: center;
}

#share-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  padding: 10px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #cfcabd;
  cursor: pointer;
  margin: 10px 0 0;
}

#share-btn:hover { border-color: rgba(255, 255, 255, 0.45); color: #f6f3ea; }

#share-btn:active { transform: scale(0.97); }

#next-btn {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  padding: 14px 0;
  border-radius: 12px;
  border: none;
  background: var(--terra);
  color: #ffffff;
  cursor: pointer;
  margin: 14px 0 0;
}

#next-btn:hover { filter: brightness(1.07); }

#next-btn:active { transform: scale(0.97); }

.again-row {
  margin: 10px 0 0;
  text-align: center;
}

#again-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
  color: #a09a8c;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px 8px;
}

#again-btn:hover { color: #cfcabd; }

#art-more {
  margin: 0 0 14px;
}

#art-more summary {
  font-size: 14px;
  font-weight: 600;
  color: #e89a7a;
  cursor: pointer;
}

#art-more[open] summary { margin-bottom: 8px; }

#art-more p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #cfcabd;
}

.share-nets { display: flex; flex-wrap: wrap; gap: 10px; }

/* Кнопки соцсетей — в официальных фирменных стилях сервисов:
   Telegram — белый самолётик на градиенте #2AABEE→#229ED9 (telegram.org),
   VK — белая монограмма на синем #0077FF (vk.com/brand) */
.share-net {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 8px;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.share-net svg {
  width: 17px;
  height: 17px;
  fill: #ffffff;
  flex: none;
}

.share-net.share-tg { background: linear-gradient(180deg, #2aabee, #229ed9); }

.share-net.share-vk { background: #0077ff; }

.share-net.share-max { background: linear-gradient(135deg, #4a90e2, #9b59d6); }

.share-net .max-icon { fill: none; }

.share-net:hover { filter: brightness(1.07); }

.share-net:active { transform: scale(0.97); }

#intro {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.intro-inner {
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.intro-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d97757;
}

.intro-inner h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0;
}

.intro-sub {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.55;
  color: #55534c;
}

.intro-board {
  position: relative;
  width: 240px;
  margin: 14px auto;
  background: var(--wall);
  border-radius: 4px;
  box-shadow: 0 0 0 14px var(--wall), 0 12px 30px rgba(40, 35, 20, 0.3);
}

.intro-piece {
  position: absolute;
  background-repeat: no-repeat;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(40, 35, 20, 0.25);
  transition: left 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2), top 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2), transform 0.45s ease, border-radius 0.45s ease;
}

.intro-slot {
  position: absolute;
  border: 1.5px dashed rgba(250, 249, 245, 0.4);
  border-radius: 4px;
}

.intro-loose {
  cursor: pointer;
  z-index: 2;
  transform: rotate(-7deg);
  animation: loose-pulse 1.6s ease-in-out infinite;
  box-shadow: 0 8px 20px rgba(40, 35, 20, 0.35);
}

@keyframes loose-pulse {
  0%, 100% { scale: 1; }
  50% { scale: 1.08; }
}

.intro-board.intro-done .intro-piece {
  border-radius: 0;
  box-shadow: none;
}

.intro-board.intro-done {
  filter: drop-shadow(0 10px 24px rgba(40, 35, 20, 0.3));
  animation: settle-board 0.7s ease;
}

.intro-hint {
  margin: 16px 0 20px;
  font-size: 13px;
  font-weight: 600;
  color: #854f0b;
  min-height: 20px;
}

.intro-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 24px;
  font-size: 14px;
  color: #55534c;
  text-align: left;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

#intro-cta {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  display: block;
  width: 100%;
  padding: 15px 0;
  border-radius: 12px;
  border: none;
  background: #d97757;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

#intro-cta:active { transform: scale(0.97); }

.intro-foot {
  margin: 12px 0 0;
  font-size: 12px;
  color: #8a887f;
}
