.sense-page { min-height:100vh; background:radial-gradient(circle at 14% 13%,rgba(80,217,197,.11),transparent 28%),radial-gradient(circle at 86% 30%,rgba(125,135,255,.1),transparent 31%),var(--bg); }
.sense-shell { width:min(1180px,calc(100% - 28px)); margin:0 auto; padding:18px 0 58px; }
.sense-heading { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:8px; }
.sense-heading h1 { margin:3px 0 0; font-size:clamp(1.55rem,4vw,2.2rem); }
.sense-heading p { margin:3px 0 0; color:var(--muted); font-size:.9rem; }
.sense-unavailable { margin-top:40px; padding:28px; border:1px solid #ffcc6655; border-radius:18px; background:#332914; text-align:center; }

.sense-board { padding:12px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(155deg,#11192b,#0d1322 70%); box-shadow:0 22px 60px #0004; }
.sense-status { display:grid; grid-template-columns:auto minmax(140px,1fr) auto auto; align-items:center; gap:12px; padding:2px 2px 10px; border-bottom:1px solid #28324a; }
.sense-stat strong,.sense-stat span { display:block; }
.sense-stat strong { color:#ffd166; font-family:var(--font-display); font-size:1.35rem; line-height:1; }
.sense-stat span { margin-top:2px; color:#9aa6c2; font-size:.58rem; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.sense-stat-right { min-width:62px; text-align:right; }
.sense-progress-track { height:7px; overflow:hidden; border-radius:999px; background:#070b14; box-shadow:inset 0 0 0 1px #29344c; }
.sense-progress-track span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#50d9c5,#ffd166); transition:width .5s cubic-bezier(.2,.8,.2,1); }

.sense-question { padding:9px 4px 8px; text-align:center; }
.sense-question h2 { margin:0; font-size:clamp(1.2rem,3vw,1.55rem); }
.sense-question p { margin:2px 0 0; color:#aab5cf; font-size:.76rem; }
.sense-solved-groups { display:grid; gap:8px; margin-bottom:10px; }
.sense-solved-group { position:relative; display:grid; grid-template-columns:minmax(155px,.8fr) minmax(0,1.8fr); gap:14px; align-items:center; padding:10px 13px; overflow:hidden; border:1px solid color-mix(in srgb,var(--group-color) 64%,#ffffff22); border-radius:13px; background:color-mix(in srgb,var(--group-color) 18%,#11192b); animation:sense-lock .5s cubic-bezier(.16,1,.3,1); }
.sense-solved-group::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--group-color); }
.sense-solved-copy b,.sense-solved-copy span { display:block; }
.sense-solved-copy b { color:#fff; font-size:.92rem; line-height:1.15; }
.sense-solved-copy span { margin-top:3px; color:#dce4f5; font-size:.72rem; line-height:1.25; }
.sense-solved-products { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.sense-solved-product { display:flex; align-items:center; min-width:0; gap:7px; color:#fff; font-size:.72rem; font-weight:900; line-height:1.2; text-shadow:0 1px 2px #000b; }
.sense-solved-product img { width:32px; height:32px; flex:0 0 32px; object-fit:contain; padding:2px; border-radius:7px; background:#fff; }
.sense-solved-product span { display:-webkit-box; overflow:hidden; line-height:1.15; white-space:normal; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
@keyframes sense-lock { from { opacity:0; transform:translateY(18px) scale(.97); } to { opacity:1; transform:none; } }

.sense-feedback { position:fixed; z-index:90; left:50%; bottom:max(22px,env(safe-area-inset-bottom)); width:min(480px,calc(100% - 28px)); margin:0; padding:13px 18px; border:1px solid #4c5875; border-radius:14px; text-align:center; font-size:.88rem; font-weight:1000; transform:translateX(-50%); box-shadow:0 18px 45px #000a,0 0 0 3px #ffffff0d; pointer-events:none; }
.sense-hint-panel { margin:0 0 8px; padding:8px 11px; border:1px solid #4c5875; border-radius:11px; text-align:center; font-size:.75rem; font-weight:900; }
.sense-feedback.success { border-color:#55e08a88; background:#143225; color:#aef4c8; }
.sense-feedback.one-away { border-color:#ffd16688; background:#332914; color:#ffe6a5; animation:sense-pulse .65s ease; }
.sense-feedback.wrong { border-color:#ff657e77; background:#2c1720; color:#ffc0cb; animation:sense-shake .4s ease; }
.sense-hint-panel { border-color:#7d87ff77; background:#1b2040; color:#d9ddff; }
.sense-hint-panel b { color:#ffd166; }
@keyframes sense-shake { 0%,100% { transform:translateX(-50%); } 30% { transform:translateX(calc(-50% - 8px)); } 65% { transform:translateX(calc(-50% + 8px)); } }
@keyframes sense-pulse { 50% { transform:translateX(-50%) scale(1.035); box-shadow:0 18px 45px #000a,0 0 0 7px #ffd1661f; } }

.sense-products { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:7px; }
.sense-product { position:relative; display:grid; grid-template-rows:auto auto 1fr; min-width:0; min-height:0; padding:8px; overflow:hidden; border:1px solid #33405b; border-radius:14px; background:#161f33; color:var(--text); text-align:left; transition:transform .17s ease,border-color .17s ease,background .17s ease,box-shadow .17s ease,opacity .22s ease; }
.sense-product:hover { transform:translateY(-3px); border-color:#7d87ff99; background:#1c2740; box-shadow:0 10px 24px #0004; }
.sense-product:focus-visible { outline:3px solid #ffd166; outline-offset:2px; }
.sense-product img { display:block; width:100%; height:92px; object-fit:contain; padding:4px; border-radius:9px; background:#fff; }
.sense-product span,.sense-product b { display:block; overflow:hidden; text-overflow:ellipsis; }
.sense-product span { margin-top:6px; color:#50d9c5; font-size:.54rem; font-weight:900; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; }
.sense-product b { display:-webkit-box; min-height:4.28em; margin-top:2px; overflow:hidden; font-size:.68rem; line-height:1.07; -webkit-box-orient:vertical; -webkit-line-clamp:4; }
.sense-products.has-selection .sense-product:not(.is-selected) { opacity:.92; filter:none; }
.sense-products.has-selection .sense-product:not(.is-selected):hover,
.sense-products.has-selection .sense-product:not(.is-selected):focus-visible { opacity:1; }
.sense-product.is-selected { z-index:1; transform:translateY(-5px) scale(1.025); border:3px solid #ffd166; background:linear-gradient(150deg,#453817,#27233b); box-shadow:0 0 0 3px #ffec9b45,0 0 28px #ffd1664d,0 15px 28px #0008; }
.sense-product.is-selected span { color:#ffe9a1; }
.sense-product.is-selected b { color:#fff; font-size:.72rem; line-height:1.12; text-shadow:0 2px 4px #000; }
.sense-product.is-selected::after { content:attr(data-selection-order); position:absolute; top:11px; right:11px; display:grid; width:29px; height:29px; place-items:center; border:2px solid #fff4c2; border-radius:50%; background:#ffd166; color:#111827; font-family:var(--font-display); font-size:.9rem; font-weight:1000; box-shadow:0 5px 14px #0009; }
.sense-product.is-hinted { border-color:#7d87ff; box-shadow:0 0 0 3px #7d87ff38; animation:sense-hint-glow 1.2s ease-in-out infinite alternate; }
.sense-product.is-removing { pointer-events:none; opacity:0; transform:scale(.78) translateY(-18px); }
@keyframes sense-hint-glow { to { box-shadow:0 0 0 4px #7d87ff22,0 0 24px #7d87ff36; } }

.sense-actions { display:grid; grid-template-columns:90px 1fr auto; align-items:center; gap:10px; margin-top:9px; }
.sense-actions button { min-height:43px; }
.sense-actions.is-completed { grid-template-columns:1fr; margin-top:12px; }
.sense-actions.is-completed #senseShare { width:100%; }
.sense-selection-count { color:#aab5cf; font-size:.75rem; font-weight:800; text-align:center; }
.sense-selection-count strong { color:#fff; font-family:var(--font-display); font-size:1rem; }
.sense-selection-count span { display:block; margin-top:1px; color:#75819e; font-size:.56rem; letter-spacing:.05em; text-transform:uppercase; }
.sense-help-row { display:flex; justify-content:center; align-items:center; gap:11px; margin:0 0 10px; padding:7px 11px; border:1px solid #ffd16655; border-radius:12px; background:linear-gradient(90deg,#302919aa,#171c31); color:#c4cce0; font-size:.68rem; }
.sense-help-row > span { max-width:520px; line-height:1.3; }
.sense-hint-button { min-height:36px; padding:7px 13px; border:1px solid #ffd16699; border-radius:999px; background:#ffd16618; color:#ffe59a; font-size:.72rem; font-weight:1000; box-shadow:0 5px 15px #0004; }
.sense-hint-button:hover { border-color:#ffd166; background:#ffd1662b; color:#fff2bd; box-shadow:0 7px 20px #0005; transform:translateY(-1px); }
.sense-hint-button:focus-visible { outline:3px solid #fff; outline-offset:2px; }
.sense-ad-slot { max-width:900px; }

.sense-completion-summary { margin:10px 0 0; padding:11px 12px; border:1px solid #50d9c566; border-radius:14px; background:linear-gradient(135deg,#143427,#111b2c 70%); box-shadow:inset 4px 0 0 #50d9c5; }
.sense-completion-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.sense-completion-stats div { min-width:0; padding:8px 7px; border:1px solid #50d9c533; border-radius:10px; background:#0d1725aa; text-align:center; }
.sense-completion-stats strong,.sense-completion-stats span { display:block; }
.sense-completion-stats strong { color:#ffd166; font-family:var(--font-display); font-size:1.05rem; line-height:1.05; }
.sense-completion-stats span { margin-top:2px; color:#aab7cd; font-size:.54rem; font-weight:900; letter-spacing:.04em; text-transform:uppercase; }
.sense-completion-summary p { margin:8px 0 0; color:#dbe8e2; font-size:.7rem; font-weight:900; text-align:center; }
.sense-completion-summary #senseHintSummary { margin-top:2px; color:#92a69d; font-size:.62rem; }

@media (max-width:900px) {
  .sense-products { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
  .sense-product img { height:112px; }
}

@media (max-width:720px) {
  .sense-shell { width:min(100% - 14px,1080px); padding-top:14px; }
  .sense-heading { align-items:start; }
  .sense-heading p { font-size:.78rem; }
  .sense-board { padding:10px; border-radius:17px; }
  .sense-status { grid-template-columns:auto 1fr auto; gap:8px; }
  .sense-status .sense-stat-right:last-child { display:none; }
  .sense-stat strong { font-size:1.15rem; }
  .sense-question { padding:12px 2px 9px; }
  .sense-product { padding:6px; border-radius:11px; }
  .sense-product img { height:102px; padding:4px; border-radius:8px; }
  .sense-product b { min-height:4.28em; font-size:.69rem; }
  .sense-solved-group { grid-template-columns:1fr; gap:7px; padding:9px 10px; }
  .sense-solved-products { gap:4px; }
  .sense-solved-product { display:block; text-align:center; }
  .sense-solved-product img { display:block; width:36px; height:36px; margin:0 auto 2px; }
  .sense-solved-product span { display:block; font-size:.6rem; line-height:1.18; }
  .sense-actions { grid-template-columns:72px 1fr auto; gap:7px; }
  .sense-actions button { min-height:42px; padding:8px; font-size:.74rem; }
  .sense-actions.is-completed { grid-template-columns:1fr; }
}

@media (max-width:480px) {
  .sense-heading { display:block; }
  .sense-status { grid-template-columns:auto 1fr auto; }
  .sense-stat span { font-size:.52rem; }
  .sense-selection-count { font-size:.66rem; }
  .sense-products { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sense-product img { height:110px; }
  .sense-help-row { display:grid; gap:4px; padding:8px; text-align:center; }
  .sense-hint-button { width:100%; }
  .sense-completion-stats { grid-template-columns:repeat(2,1fr); }
}

@media (prefers-reduced-motion:reduce) {
  .sense-product,.sense-progress-track span { transition:none; }
  .sense-product,.sense-feedback,.sense-solved-group { animation-duration:1ms !important; }
}
