/* Narcissistic personality disorder lesson. All rules scoped under .npd-* */

.npd-sc { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.npd-note { font-size: 12px; color: var(--faint); text-align: center; }

/* the board */
.npd-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; touch-action: manipulation; }
.npd-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px 6px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line-strong); color: var(--dim); font: 700 12px/1.15 var(--sans); text-align: center; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.npd-tile svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.npd-tile .npd-crack { stroke: var(--surface); }
.npd-tile .npd-pupil { fill: var(--surface); }
.npd-tile i { position: absolute; top: 3px; display: none; width: 18px; height: 18px; border-radius: 50%; font: 800 12px/18px var(--sans); font-style: normal; color: #1A1206; }
.npd-ma { left: 5px; background: #F2A07F; }
.npd-mb { right: 5px; background: #7CC0EE; }
.npd-tile.npd-a { border-color: #E8835E; color: #F7C1A9; background: rgba(232, 131, 94, .14); }
.npd-tile.npd-a .npd-ma { display: block; }
.npd-tile.npd-b { border-color: #5DA9E0; color: #C3E2F7; background: rgba(93, 169, 224, .16); }
.npd-tile.npd-b .npd-mb { display: block; }
.npd-tile.npd-a.npd-b { border-color: var(--gold); background: linear-gradient(135deg, rgba(232, 131, 94, .22), rgba(93, 169, 224, .22)); color: var(--text); }
.npd-done .npd-tile { cursor: default; }
.npd-read { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 700; }
.npd-rb b { color: #7CC0EE; }
.npd-rs b { color: var(--gold); }
.npd-read.npd-over { background: rgba(255, 107, 107, .15); }
.npd-read.npd-over .npd-rs b { color: var(--red); }

/* two people */
.npd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.npd-who { padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line-strong); transition: border-color .3s, background .3s; }
.npd-who small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.npd-who p { margin: 4px 0 0; font: 600 16px/1.3 var(--serif); }
.npd-wa small { color: #F2A07F; }
.npd-wb small { color: #7CC0EE; }

/* the four rules */
.npd-rules { display: flex; flex-direction: column; gap: 8px; }
.npd-rules div { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line-strong); }
.npd-rules b { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--violet-bright); color: #fff; font-size: 15px; }
.npd-rules p { margin: 0; font: 600 16px/1.3 var(--serif); }

/* the life grid */
.npd-life { position: relative; }
.npd-grid { display: grid; grid-template-columns: 66px repeat(4, 1fr); gap: 5px; align-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.npd-corner, .npd-col { font-size: 12px; font-weight: 800; color: var(--faint); text-align: center; }
.npd-corner { text-align: left; }
.npd-row { font-size: 13px; font-weight: 700; color: var(--dim); }
.npd-cell { position: relative; height: 44px; border-radius: 10px; background: #3A3552; overflow: hidden; }
.npd-cell i { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #4B4566 0 6px, #423D5C 6px 12px); transition: opacity .35s; }
.npd-cell.npd-seen i { opacity: 0; }
.npd-cell.npd-seen { background: #5B5F72; }
.npd-cell.npd-hit.npd-seen { background: var(--red); box-shadow: 0 0 12px rgba(255, 107, 107, .5); }
.npd-cell.npd-sam { outline: 3px solid var(--gold); outline-offset: -3px; }
.npd-lens { position: absolute; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; border: 2px solid rgba(252, 192, 80, .8); box-shadow: 0 0 18px rgba(252, 192, 80, .35); pointer-events: none; opacity: 0; transition: opacity .2s; left: 0; top: 0; }
.npd-lens.on { opacity: 1; }

/* hands off */
.npd-rule73 { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border-radius: 20px; background: var(--surface); border: 2px solid var(--line-strong); text-align: center; }
.npd-rule73 b { font: 700 44px var(--serif); color: var(--gold); }
.npd-rule73 p { margin: 0; font: 600 19px var(--serif); }
.npd-rule73 small { font-size: 14px; color: var(--dim); }

/* the door */
.npd-door { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.npd-door svg { width: 130px; height: auto; }
.npd-door rect { fill: #5B3F8C; stroke: var(--violet-bright); stroke-width: 3; }
.npd-door circle { fill: var(--gold); }
.npd-door path { stroke: var(--line-strong); stroke-width: 3; }
.npd-door span { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }

/* the last case */
.npd-cases { display: flex; flex-direction: column; gap: 8px; }
.npd-case { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line-strong); transition: border-color .3s, opacity .3s; }
.npd-case > div { font-size: 14px; color: var(--dim); }
.npd-case b { font-size: 16px; color: var(--text); }
.npd-case p { margin: 2px 0 0; font-size: 14px; line-height: 1.3; color: var(--dim); }
.npd-case em { grid-column: 2; font-style: normal; font-size: 12px; font-weight: 800; color: var(--dim); }
.npd-case.npd-hot { border-color: var(--gold); }
.npd-case.npd-hot em { color: var(--gold); }
.npd-case.npd-cool { opacity: .7; }
.npd-mini { display: grid; grid-template-columns: repeat(4, 11px); gap: 2px; }
.npd-mini i { width: 11px; height: 11px; border-radius: 3px; background: #5B5F72; }
.npd-mini i.h { background: var(--red); }

@media (max-height: 700px) {
  .npd-tile { min-height: 54px; padding: 5px 3px; }
  .npd-tile svg { width: 18px; height: 18px; }
  .npd-cell { height: 40px; }
  .npd-rules p, .npd-who p { font-size: 15px; }
  .npd-cases { gap: 6px; }
  .npd-case { padding: 5px 10px; }
}
