/* Cue-dependent forgetting. Everything scoped under .cdf-*. */

.cdf-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cdf-note { font-size: 13px; color: var(--dim); text-align: center; max-width: 300px; }
.cdf-hero img { display: block; width: 260px; max-width: 100%; max-height: 34vh; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(123, 92, 253, .3)); }

/* the definition card */
.cdf-def { width: 100%; max-width: 340px; padding: 16px 18px; border-radius: 18px; background: #F4EEE2; color: #1B1A22; box-shadow: 0 6px 16px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 8px; }
.cdf-def small { font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #6B6558; }
.cdf-def p { margin: 0; font: 500 19px/1.35 var(--serif); }
.cdf-ans { font: 700 24px var(--serif); color: #1B1A22; min-height: 0; max-height: 0; opacity: 0; overflow: hidden; transition: opacity .3s, max-height .3s; }
.cdf-def.shown .cdf-ans { max-height: 40px; opacity: 1; }
.choices.cdf-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices.cdf-opts .choice { justify-content: center; text-align: center; padding-left: 6px; padding-right: 6px; }

/* first-letter keypad */
.cdf-pad { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 380px; margin: 0 auto; }
.cdf-key { height: 44px; min-width: 0; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--raised); color: var(--text); font: 700 18px var(--sans); padding: 0; }
.cdf-key.cdf-skip { grid-column: span 2; font-size: 14px; color: var(--dim); }
.cdf-key.hit { background: var(--violet); border-color: var(--violet-bright); color: #fff; }

/* your tally */
.cdf-tally { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 6px; }
.cdf-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.cdf-sum div { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line); }
.cdf-sum b { font: 700 30px var(--mono); color: var(--text); }
.cdf-sum div:last-child b { color: var(--gold); }
.cdf-sum span { font-size: 13px; color: var(--dim); text-align: center; }
.cdf-tr { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--line); }
.cdf-tr span { font: 600 16px var(--serif); color: var(--text); }
.cdf-tr em { font: 700 13px var(--sans); font-style: normal; }
.cdf-tr.came em { color: var(--mint); }
.cdf-tr.shown em { color: var(--gold); }
.cdf-tr.miss em { color: var(--faint); }
.cdf-tr.miss span { color: var(--dim); }

/* a word half there */
.cdf-tip { display: flex; align-items: flex-end; gap: 5px; padding: 18px 16px; border-radius: 16px; background: var(--raised); border: 1.5px solid var(--line); }
.cdf-l { font: 700 34px var(--serif); color: var(--gold); line-height: 1; }
.cdf-tip i { width: 14px; height: 3px; border-radius: 2px; background: var(--faint); margin-bottom: 4px; }

/* stored, not found */
.cdf-map { width: 100%; max-width: 330px; overflow: visible; }
.cdf-mem { fill: rgba(123, 92, 253, .1); stroke: var(--violet-bright); stroke-width: 2; }
.cdf-ml { font: 700 12px var(--sans); fill: var(--dim); text-anchor: middle; letter-spacing: .06em; text-transform: uppercase; }
.cdf-nb { fill: #F4EEE2; }
.cdf-nt { font: 700 18px var(--serif); fill: #1B1A22; text-anchor: middle; }
.cdf-cue { fill: var(--raised); stroke: var(--line-strong); stroke-width: 1.5; }
.cdf-cue.gold { stroke: var(--gold); stroke-width: 2.5; }
.cdf-ct { font: 700 14px var(--sans); fill: var(--text); text-anchor: middle; }
.cdf-no { fill: none; stroke: var(--faint); stroke-width: 2.5; stroke-dasharray: 5 6; }
.cdf-x { font: 700 16px var(--sans); fill: var(--red); text-anchor: middle; }
.cdf-yes { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }

/* divers */
.cdf-places { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 340px; }
.cdf-places figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cdf-places img { width: 100%; max-height: 26vh; object-fit: contain; }
.cdf-places figcaption { font: 700 13px var(--sans); color: var(--dim); }
.cdf-grid { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.cdf-gh, .cdf-gr { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; align-items: end; }
.cdf-gh span { font: 700 12px var(--sans); color: var(--dim); text-align: center; }
.cdf-gr b { font: 700 14px var(--sans); color: var(--text); align-self: center; }
.cdf-gr i { height: 84px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1.5px solid var(--line-strong); }
.cdf-gr s { display: block; width: 36px; height: 0; border-radius: 6px 6px 0 0; background: var(--dim); transition: height .7s cubic-bezier(.2,.8,.2,1); }
.cdf-gr i.hi s { background: var(--gold); }
.cdf-grid.on .cdf-gr i.hi s { height: 76px; }
.cdf-grid.on .cdf-gr i.lo s { height: 44px; }
.cdf-gn { font-size: 13px; color: var(--dim); text-align: center; }

.cdf-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 340px; }
.cdf-k { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--raised); border: 1.5px solid var(--line); }
.cdf-k small { font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--violet-bright); }
.cdf-k b { font: 700 20px var(--sans); color: var(--text); }
.cdf-k span { font-size: 14px; color: var(--dim); }

.cdf-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 320px; }
.cdf-list span { padding: 6px 12px; border-radius: 999px; font: 600 15px var(--serif); color: var(--dim); border: 1.5px dashed var(--line-strong); }
.cdf-list span.y { color: var(--text); border: 1.5px solid var(--gold); }

@media (max-height: 700px) {
  .cdf-hero img { max-height: 28vh; }
  .cdf-def p { font-size: 17px; }
  .cdf-places img { max-height: 20vh; }
  .cdf-gr i { height: 64px; }
  .cdf-grid.on .cdf-gr i.hi s { height: 58px; }
  .cdf-grid.on .cdf-gr i.lo s { height: 34px; }
}
