:root{--red:#FF1210;--red-d:#B80B09;--ink:#091E23;--muted:#6b6862;--faint:#a39d93;--paper:#faf9f6;--line:#e7e5df;--green:#287650;--green-light:#eaf4ed;--display:"Arial Black","Arial Bold",Arial,Helvetica,sans-serif;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}
button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{font:inherit;cursor:pointer;border:0}
button:disabled{cursor:wait;opacity:.55}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
a{color:inherit}
[hidden]{display:none!important}
button,article,a{transition:background .18s,box-shadow .18s,transform .18s}
h1,h2,h3,p{margin:0}
button:active{transform:translateY(1px)}

/* Шапка */
.site-header{height:80px;max-width:1248px;margin:0 auto;padding:0 36px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;border-radius:8px}
.brand img{display:block;height:32px;width:auto}
.text-button{background:transparent;min-height:44px;padding:10px 4px;font-size:13px;font-weight:600;display:inline-flex;gap:8px;align-items:center;color:inherit}
.help-icon{border:1.5px solid var(--faint);width:18px;height:18px;border-radius:50%;font-size:11px;display:inline-flex;align-items:center;justify-content:center}
.subdued{color:var(--muted);font-size:12px}

/* Интро */
.intro{max-width:1248px;margin:auto;padding:0 36px;overflow-x:clip}
.hero{min-height:613px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:10px}
.hero-copy{padding:47px 0}
.eyebrow{font-size:11px;letter-spacing:1px;font-weight:800;display:flex;align-items:center;gap:8px}
.hero-copy>.eyebrow{color:var(--red);margin-bottom:28px}
.live-dot{height:6px;width:6px;border-radius:50%;background:currentColor}
.hero h1{font-family:var(--display);font-size:clamp(64px,6.7vw,94px);font-weight:900;line-height:1.04;letter-spacing:-.04em}
.hero h1>span{color:var(--red);position:relative}
.hero h1>span:after{content:"";position:absolute;left:3px;right:0;height:5px;bottom:-10px;border-radius:100%;background:var(--red);transform:rotate(-2deg);opacity:.22}
.hero-description{font-size:16px;line-height:1.7;color:var(--muted);margin-top:28px}
.primary-button{background:var(--red);color:white;border-radius:12px;padding:17px 23px;display:inline-flex;justify-content:space-between;align-items:center;gap:32px;font-size:14px;font-weight:800;box-shadow:0 6px 13px #FF121013;min-height:54px}
.primary-button>span{font-size:24px;line-height:18px;font-weight:500}
.start-button{margin-top:28px;min-width:218px}
.game-facts{margin-top:18px;display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted)}
.game-facts i{width:3px;height:3px;border-radius:50%;background:var(--faint)}
.personal-best{font-size:13px;margin-top:15px;color:var(--red)}
.error-message{max-width:360px;color:var(--red);font-size:13px;margin-top:12px}

.showcase{height:490px;position:relative;display:flex;align-items:center;justify-content:center}
.showcase-orbit{position:absolute;width:430px;max-width:85%;height:355px;border-radius:50%;border:1px dashed #e0d8d0;transform:rotate(-15deg);background:radial-gradient(ellipse,#f4ece16e,transparent 70%)}
.showcase-cards{display:flex;align-items:center;justify-content:center;width:100%;height:300px;position:relative}
.showcase-card{position:absolute;top:25px;width:176px;background:white;border:1px solid #ece8e1;border-radius:16px;padding:14px 12px 16px;box-shadow:0 15px 30px #5b423610;min-height:270px}
.showcase-card:nth-child(1){left:1%;transform:rotate(-12deg) translateY(22px)}
.showcase-card:nth-child(2){left:32%;transform:rotate(2deg);z-index:2}
.showcase-card:nth-child(3){right:-1%;transform:rotate(13deg) translateY(29px)}
.showcase-card .mini-tag{font-size:11px;letter-spacing:1px;font-weight:700;color:var(--muted)}
.showcase-card img{width:100%;height:135px;object-fit:contain;mix-blend-mode:multiply;margin:9px 0}
.showcase-card h3{font-size:13px;line-height:1.35;min-height:35px}
.showcase-card .preview-detail{font-size:12px;color:var(--muted);margin-top:4px}
.showcase-card .preview-price{border-top:1px dashed #e4e1db;margin-top:12px;padding-top:8px;font-weight:800;font-size:19px}
.showcase-line{position:absolute;left:13%;right:9%;bottom:4px;display:flex;align-items:center;gap:14px;font-size:11px;letter-spacing:1px;color:var(--muted);font-weight:700}
.showcase-line div{height:1px;background:#d8d2c7;flex:1;position:relative}
.showcase-line div:after{content:'→';right:-3px;position:absolute;top:-9px;color:var(--faint)}

/* Футер */
.site-footer{max-width:1248px;margin:32px auto 0;padding:22px 36px 26px;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);gap:15px}
.site-footer>span{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.site-footer a{text-decoration:none;border-bottom:1px solid #c7c0b6}
.source-dot{width:5px;height:5px;background:#729c79;border-radius:50%;margin-right:4px}
.site-footer button{font-size:12px;font-weight:500}

/* Игра */
.game-screen{max-width:1248px;margin:0 auto;padding:0 36px}
.game-hud{display:flex;align-items:center;justify-content:space-between;padding:25px 0 20px;border-bottom:1px solid var(--line);gap:25px}
.round-block{min-width:155px}
.label{display:block;font-size:11px;letter-spacing:1px;color:var(--muted);font-weight:800;margin-bottom:5px}
.round-block strong{font-size:16px;font-weight:800}
.round-block strong span{color:var(--faint);font-weight:500}
.progress{display:flex;gap:7px;align-items:center}
.progress span{width:26px;height:5px;border-radius:5px;background:#e7e3dc}
.progress span.current{background:var(--red)}
.progress span.right{background:#6caa80}
.progress span.wrong{background:#eaa8a8}
.hud-right{display:flex;gap:26px;align-items:center}
.score-block{text-align:right}
.score-block strong{font-size:20px;line-height:1}
.hearts{color:var(--red);display:flex;gap:5px;font-size:24px}
.heart-empty{color:#e3ded5}
.game-question{text-align:center;margin:26px auto 20px}
.game-question h2{font-family:var(--display);font-size:30px;letter-spacing:-.02em;font-weight:900;line-height:1.2}
.current-stage{position:relative;min-height:275px;display:flex;justify-content:center;align-items:center;gap:36px;margin-bottom:26px}
.current-card{width:220px;border:1.5px solid var(--red);border-radius:17px;background:white;padding:16px;position:relative;box-shadow:0 9px 25px #FF121013;cursor:grab;flex-shrink:0;transform:rotate(-2deg)}
.current-card:active{cursor:grabbing}
.current-card.dragging{opacity:.45;transform:rotate(-4deg)}
.category-tag{font-size:11px;letter-spacing:.5px;background:#f8f5f0;color:var(--muted);padding:5px 7px;border-radius:5px;display:inline-block;max-width:168px}
.drag-handle{position:absolute;top:15px;right:12px;color:#c3b9b2;font-size:20px}
.current-image-wrap{height:128px;margin:8px 0;display:flex;align-items:center;justify-content:center}
.current-image-wrap img{max-width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.current-card h3{font-size:14px;font-weight:800;line-height:1.4;text-wrap:balance}
.current-card p{color:var(--muted);font-size:12px;line-height:1.5;margin-top:4px}
.hidden-price{font-size:25px;font-weight:800;letter-spacing:-1px;border-top:1px dashed #e9e3dc;padding-top:9px;margin-top:12px;color:var(--red)}
.hidden-price span{font-size:17px}
.drag-tip{font-size:12px;color:var(--muted);line-height:1.7;position:absolute;left:calc(50% + 160px);width:180px}
.drag-tip>span{display:block;font-size:28px;margin-bottom:10px;color:var(--faint)}
.drag-tip b{display:inline-flex;justify-content:center;align-items:center;border:1px dashed #c2b4a9;width:20px;height:20px;border-radius:5px;color:var(--red);margin:0 2px}
.current-card.revealed{transform:rotate(0);border-color:#87b599;box-shadow:0 10px 25px #2876500e;cursor:default}
.current-card.revealed.wrong{border-color:#e9b5a6}
.current-card.revealed .hidden-price{color:var(--ink)}
.feedback{max-width:265px}
.feedback-badge{display:inline-block;border-radius:6px;background:var(--green-light);color:var(--green);font-size:11px;letter-spacing:1px;font-weight:800;padding:6px 8px}
.feedback.is-wrong .feedback-badge{background:#fbe9e4;color:#ad4e38}
.feedback h3{font-family:var(--display);font-size:24px;font-weight:900;letter-spacing:-.02em;margin-top:10px;line-height:1.2}
.feedback p{font-size:13px;color:var(--muted);line-height:1.6;margin:10px 0 14px}
.feedback .primary-button{padding:14px 18px;font-size:14px;min-height:48px;width:100%;border-radius:10px}
.product-source{display:inline-flex;align-items:center;min-height:44px;font-size:12px;color:var(--muted);text-underline-offset:3px;margin-top:4px}
.shelf-heading{display:flex;align-items:center;justify-content:space-between;font-size:11px;letter-spacing:1px;font-weight:700;color:var(--muted);gap:10px}
.shelf-heading>span{display:flex;gap:9px;align-items:center}
.shelf-scroll{overflow-x:auto;padding:20px 8px 10px;scrollbar-width:thin;scrollbar-color:#d4cec2 transparent;scroll-behavior:smooth}
.shelf{display:flex;align-items:stretch;width:max-content;min-width:100%;justify-content:center;gap:0;padding:0 8px}
.shelf-card{width:130px;flex-shrink:0;border:1px solid #eee9e0;border-radius:11px 11px 3px 3px;background:#fff;padding:11px 10px 12px;box-shadow:0 3px 5px #534c3805;position:relative}
.shelf-card img{width:100%;height:83px;object-fit:contain;mix-blend-mode:multiply}
.shelf-card h3{font-size:12px;font-weight:700;line-height:1.35;min-height:2.7em;margin-top:6px}
.shelf-card p{font-size:12px;color:var(--muted);line-height:1.35;min-height:1.35em;margin-top:3px}
.shelf-price{font-size:17px;font-weight:800;letter-spacing:-.5px;margin-top:6px;white-space:nowrap}
.shelf-price span{font-size:12px;font-weight:600}
.shelf-card.just-placed{border-color:#6d9f7b;background:#f7fbf7;animation:pop-in .35s ease-out}
.shelf-card.just-placed.was-wrong{border-color:#dea694;background:#fff7f3}
.placed-marker{position:absolute;top:-11px;left:50%;transform:translateX(-50%);border-radius:4px;background:#43845b;color:#fff;padding:3px 6px;font-size:11px;font-weight:700;white-space:nowrap}
.was-wrong .placed-marker{background:#bb6d54}
.slot{width:67px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:transparent;padding:0 8px;min-height:184px;border-radius:9px}
.slot>span{height:48px;width:100%;border:1.5px dashed #d5c9bc;color:var(--red);background:#f5f0e9;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:24px;transition:all .15s}
.slot:active>span,.slot:focus-visible>span,.slot.drag-over>span{background:var(--red);color:white;border-color:var(--red)}
.slot.drag-over>span{transform:scale(1.08);box-shadow:0 4px 10px #FF12101c}
.slot.drag-over{background:#FF12100a}
.slot:focus-visible{outline-offset:0}
.shelf-base{height:12px;background:linear-gradient(#e8dfd1,#e2d8c9);border-radius:3px 3px 6px 6px;box-shadow:0 7px 9px #9b8c7310;position:relative}
.shelf-base:after{position:absolute;content:"";bottom:-5px;left:5%;right:5%;height:5px;background:#dfd4c4;border-radius:0 0 4px 4px;z-index:-1}
.shelf-hint{text-align:center;font-size:12px;color:var(--muted);margin-top:18px}
.game-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:12px}
.streak{font-size:12px;color:var(--red);font-weight:700}

/* Итог */
.results-screen{max-width:880px;margin:40px auto;padding:0 24px;text-align:center}
.results-screen:focus{outline:none}
.results-screen>.eyebrow{justify-content:center;color:var(--red)}
.results-screen h1{font-family:var(--display);font-size:44px;font-weight:900;letter-spacing:-.03em;line-height:1.12;margin-top:16px}
.results-subtitle{font-size:14px;color:var(--muted);line-height:1.6;margin:13px 0 25px}
.receipt{max-width:430px;margin:0 auto;text-align:left;background:white;padding:28px 30px 32px;box-shadow:0 7px 35px #67543b0b;position:relative;border-top:4px solid var(--red)}
.receipt:after{content:"";position:absolute;bottom:-9px;left:0;right:0;height:10px;background:linear-gradient(135deg,white 5px,transparent 0) 0 0/10px 10px,linear-gradient(225deg,white 5px,transparent 0) 0 0/10px 10px}
.receipt-header{text-align:center;margin-bottom:18px}
.receipt-header strong{font-size:18px;letter-spacing:2px;color:var(--red)}
.receipt-header p{font-size:11px;color:var(--muted);letter-spacing:1px;margin-top:8px}
.receipt-score{display:flex;justify-content:space-between;align-items:center;padding:17px 0;border-block:1px dashed #d6cdc2}
.receipt-score>span{font-size:11px;letter-spacing:1px;color:var(--muted)}
.receipt-score strong{font-size:39px;letter-spacing:-2px;font-weight:800}
.receipt-score small{font-size:13px;letter-spacing:0;color:var(--faint)}
.receipt-lines{margin:18px 0;display:grid;gap:10px}
.receipt-line{display:flex;align-items:center;justify-content:space-between;font-size:13px;gap:12px}
.receipt-line>span:first-child{display:flex;align-items:center;gap:8px}
.receipt-line .mark{color:var(--green);font-weight:800}
.receipt-line .mark.no{color:var(--red)}
.receipt-line strong{white-space:nowrap}
.receipt-meta{display:flex;justify-content:space-between;gap:12px;border-top:1px dashed #d6cdc2;padding-top:16px;font-size:13px;color:var(--muted)}
.barcode{margin:20px auto 0;width:180px;height:28px;background:repeating-linear-gradient(90deg,#3a3935 0px,#3a3935 1px,transparent 1px,transparent 3px,#3a3935 3px,#3a3935 5px,transparent 5px,transparent 6px,#3a3935 6px,#3a3935 7px,transparent 7px,transparent 11px);opacity:.65}
.results-actions{margin:34px auto 0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px}
.secondary-button{border:1px solid #dcd5ca;border-radius:12px;background:transparent;padding:17px 19px;font-size:14px;font-weight:700;min-height:54px;color:inherit}
.share-status{font-size:13px;color:var(--green);margin-top:15px;min-height:18px}
.share-text{display:block;width:100%;max-width:430px;margin:10px auto;padding:12px;border:1px solid var(--line);border-radius:12px;font:inherit;font-size:14px;min-height:85px;color:var(--ink);background:#fff}

/* Диалоги */
.modal{border:1px solid #eee4d9;border-radius:22px;padding:36px;max-width:540px;width:calc(100% - 32px);max-height:85dvh;color:var(--ink);background:var(--paper);overflow:auto}
.modal::backdrop{background:#091E2361;backdrop-filter:blur(4px)}
.close-button{position:absolute;right:10px;top:10px;width:44px;height:44px;display:grid;place-items:center;background:transparent;font-size:25px;line-height:1;color:var(--muted);padding:0;border-radius:10px}
.modal>.eyebrow{color:var(--red)}
.modal h2{font-family:var(--display);font-size:28px;font-weight:900;letter-spacing:-.02em;line-height:1.2;margin:15px 0 23px}
.rules{padding-left:20px;font-size:14px;line-height:1.6;color:var(--muted);display:grid;gap:12px}
.rules strong{color:var(--ink)}
.modal-note{font-size:13px;line-height:1.6;color:var(--muted);margin:20px 0}
.modal>.primary-button{width:100%}
.sources-modal{max-width:640px}
.sources-modal p{font-size:13px;line-height:1.6;color:var(--muted);margin-bottom:15px}
.sources-info{padding:15px;background:#f2ede5;border-radius:10px;margin-bottom:20px;font-size:13px;line-height:1.6}
.sources-list{display:grid;gap:0}
.source-row{display:flex;align-items:center;justify-content:space-between;min-height:44px;border-top:1px solid var(--line);padding:10px 0;gap:15px;font-size:13px;text-decoration:none;line-height:1.4}
.source-row>span:last-child{white-space:nowrap;font-weight:800}
.confirm-dialog .confirm-actions{display:flex;gap:10px;margin-top:20px}
.confirm-dialog .confirm-actions>button{flex:1;font-size:14px;gap:8px;padding:14px}

@keyframes pop-in {
  from{transform:translateY(-12px);opacity:.5}
  to{transform:translateY(0);opacity:1}
}

/* Hover только там, где есть мышь: на тач-экране он залипает после тапа */
@media(hover:hover) {
  .text-button:hover,.source-row:hover{color:var(--red)}
  .primary-button:hover{background:var(--red-d);box-shadow:0 8px 20px #FF121025}
  .secondary-button:hover{background:white}
  .current-card:not(.revealed):not(.dragging):hover{transform:rotate(0deg) translateY(-3px);box-shadow:0 15px 30px #FF12101a}
  .slot:hover>span{background:var(--red);color:white;border-color:var(--red);transform:scale(1.08);box-shadow:0 4px 10px #FF12101c}
}
/* На тач-экране перетаскивание ненадёжно: подсказываем только «+» */
@media(hover:none),(pointer:coarse) {
  .drag-handle,.drag-only{display:none}
  .current-card{cursor:default}
}
@media(prefers-reduced-motion:reduce) {
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

@media(min-width:1500px) {
  .hero{min-height:660px}
  .showcase{transform:scale(1.07)}
}

@media(max-width:1050px) {
  .hero h1{font-size:clamp(52px,7.4vw,76px)}
  .showcase-card{width:150px;padding:12px;min-height:250px}
  .showcase-card img{height:120px}
  .showcase-card:nth-child(2){left:29%}
  .showcase-orbit{width:350px}
  .showcase-line{left:6%;right:2%}
  .drag-tip{left:calc(50% + 140px)}
}

@media(max-width:760px) {
  .site-header{height:56px;padding:0 16px}
  .brand img{height:28px}
  .intro,.game-screen,.results-screen{padding:0 16px}

  .hero{min-height:auto;display:flex;flex-direction:column;gap:0}
  .hero-copy{padding:36px 0 20px;width:100%;text-align:center}
  .hero-copy>.eyebrow{justify-content:center;margin-bottom:20px}
  .hero h1{font-size:clamp(44px,15vw,68px);line-height:1.02}
  .hero h1>br{display:none}
  .hero h1>span{display:block}
  .hero-description{font-size:15px;margin-top:22px}
  .start-button{margin-top:22px;min-width:240px}
  .game-facts{justify-content:center;margin-top:17px}
  .showcase{width:100%;max-width:480px;height:364px;margin-top:3px}
  .showcase-cards{height:250px}
  .showcase-card{width:145px;min-height:223px;top:3px;padding:11px;border-radius:12px}
  .showcase-card img{height:96px}
  .showcase-card:nth-child(1){left:4%;transform:rotate(-12deg) translateY(13px)}
  .showcase-card:nth-child(2){left:calc(50% - 72px);transform:rotate(2deg)}
  .showcase-card:nth-child(3){right:3%;transform:rotate(13deg) translateY(18px)}
  .showcase-card .mini-tag{letter-spacing:.5px}
  .showcase-card h3{font-size:12px}
  .showcase-card .preview-price{font-size:17px;margin-top:8px;padding-top:6px}
  .showcase-orbit{width:300px;height:250px}
  .showcase-line{bottom:4px;left:9%;right:8%}

  .site-footer{padding:15px 16px 24px;margin-top:24px;gap:4px;flex-direction:column;align-items:center;text-align:center}
  .site-footer>span{justify-content:center}

  .game-hud{padding:12px 0;gap:10px;flex-wrap:wrap}
  .round-block{min-width:0}
  .label{margin-bottom:3px}
  .hud-right{gap:15px}
  .score-block strong{font-size:19px}
  .hearts{font-size:21px;gap:2px}
  .progress{order:3;width:100%;gap:6px}
  .progress span{height:4px;width:auto;flex:1}
  .game-question{margin:12px 0}
  .game-question h2{font-size:22px}
  .current-stage{min-height:0;margin-bottom:16px;gap:14px}
  .current-stage.is-feedback{flex-direction:column;gap:12px}
  .current-card{width:187px;padding:13px}
  .current-image-wrap{height:80px;margin:6px 0}
  .hidden-price{font-size:20px;margin-top:8px;padding-top:8px}
  .hidden-price span{font-size:15px}
  .category-tag{max-width:145px}
  .drag-handle{top:12px;right:9px;font-size:17px}
  .drag-tip{position:static;width:120px;line-height:1.6}
  .drag-tip>span{font-size:24px;margin-bottom:6px}
  .feedback{width:100%;max-width:340px;text-align:center}
  .feedback h3{font-size:20px}
  .shelf-card{width:120px;padding:9px 8px}
  .shelf-card img{height:64px}
  .shelf-price{font-size:16px}
  .shelf-price span{font-size:11px}
  .slot{width:52px;min-height:165px;padding:0 4px}
  .slot>span{height:44px;font-size:23px;border-radius:7px}
  .shelf-scroll{padding:19px 0 9px;margin:0 -5px}
  .shelf{padding:0 2px}
  .shelf-hint{line-height:1.5;margin-top:15px}

  .results-screen{margin:30px auto}
  .results-screen h1{font-size:32px}
  .receipt{padding:20px 18px 24px}
  .results-actions{gap:9px}
  .results-actions>button{flex:1 1 auto;gap:12px;padding:14px 16px;min-height:50px}
  .modal{padding:28px 20px}
  .modal h2{font-size:24px;padding-right:32px}
}

@media(max-width:370px) {
  .showcase-card{width:128px}
  .showcase-card:nth-child(2){left:calc(50% - 64px)}
  .showcase-card img{height:88px}
  .current-card{width:167px}
}
