/* Crate Digger Challenge — loaded only on /crate-digger/ */
.cd-wrap { max-width: 50rem; margin: 0 auto; padding: 1.2rem 1.25rem 3rem; }
#cd-app { scroll-margin-top: 1rem; min-height: 22rem; }
#cd-app[aria-busy="true"]::before { content: "Loading the crates…"; display: block; padding: 2rem 0; color: var(--ink-soft); font-family: var(--display); }
.cd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cd-small { font-size: .95rem; color: var(--ink-soft); }
.cd-flash { background: #FBF3E3; border: 1px solid #EBD3A3; padding: .6rem .9rem; font-family: var(--display); font-weight: 600; }
.cd-screen h2 { margin-top: 1.4em; }

/* buttons */
.cd-btn { font: 700 1.02rem/1.2 var(--display); padding: .8rem 1.2rem; border-radius: 4px; cursor: pointer; border: 2px solid transparent; min-height: 44px; }
.cd-btn--gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.cd-btn--gold:hover { background: #EDB65A; }
.cd-btn--ghost { background: transparent; color: var(--petrol); border-color: var(--petrol); }
.cd-btn--ghost:hover { background: #E9F0EF; }

/* CSS-drawn record: original artwork, no album covers */
.cd-rec { display: inline-block; width: 3rem; height: 3rem; flex: none; }
.cd-rec__disc { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #1d1418 0 2px, #2b2027 2px 3px); box-shadow: inset 0 0 0 2px #1d1418; }
.cd-rec__label { display: flex; align-items: center; justify-content: center; width: 42%; height: 42%; border-radius: 50%; background: #CFC7C9; color: var(--ink); font: 800 .7rem/1 var(--display); }
.cd-rec--current .cd-rec__label { background: var(--gold); }
.cd-rec--right .cd-rec__label { background: var(--gold); }
.cd-rec--wrong .cd-rec__disc { opacity: .45; }
.cd-rec--idle .cd-rec__label { background: #E6E1DC; }

/* start */
.cd-daily { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; background: var(--petrol); color: #EAF1F0; padding: 1.1rem 1.3rem 1.3rem; }
.cd-daily h2 { color: #fff; margin: 0 0 .3rem; }
.cd-daily p { margin: 0; max-width: 30rem; }
.cd-crates { list-style: none; margin: .8rem 0 1.5rem; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.cd-crates li { margin: 0; }
.cd-crate { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .15rem .9rem; align-items: center; width: 100%; height: 100%; text-align: left;
  background: var(--paper); border: 1px solid var(--groove); border-top: 5px solid var(--petrol); padding: 1rem 1.1rem; cursor: pointer; color: var(--ink); font: inherit; }
.cd-crate .cd-rec { grid-row: 1 / span 2; }
.cd-crate__name { font: 700 1.2rem/1.2 var(--display); }
.cd-crate__desc { font-size: .98rem; line-height: 1.45; color: var(--ink-soft); }
.cd-crate:hover { border-color: var(--petrol); }
.cd-crate:hover .cd-crate__name { text-decoration: underline; }
.cd-stats { margin-top: 1rem; border-top: 1px solid var(--groove); padding-top: .8rem; }
.cd-stats summary { cursor: pointer; font: 600 1.02rem/1.4 var(--display); padding: .3rem 0; }
.cd-badges { list-style: none; padding: 0; margin: .6rem 0; }
.cd-badges li { padding: .35rem 0; border-bottom: 1px solid var(--groove); color: var(--ink-soft); font-size: 1rem; }
.cd-badges li.is-earned strong { color: var(--gold-deep); }
.cd-badges li.is-earned strong::before { content: "\2605 "; }

/* play */
.cd-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-family: var(--display); margin-top: 1rem; }
.cd-bar p { margin: 0; }
.cd-bar__crate { font-weight: 700; }
.cd-bar__score strong { font-size: 1.3rem; }
.cd-progress { list-style: none; display: flex; gap: .5rem; padding: 0; margin: .7rem 0 1rem; }
.cd-progress li { margin: 0; }
.cd-progress .cd-rec { width: 2.2rem; height: 2.2rem; }
.cd-pip--current .cd-rec__disc { box-shadow: 0 0 0 3px var(--gold); }
.cd-card { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; background: var(--paper); border: 1px solid var(--groove); padding: 1.2rem 1.3rem 1.4rem; }
.cd-sleeve { width: 5.5rem; height: 5.5rem; background: var(--petrol); display: flex; align-items: center; justify-content: center; }
.cd-sleeve .cd-rec { width: 4.4rem; height: 4.4rem; }
.cd-anim .cd-sleeve .cd-rec { animation: cd-pull .45s ease-out; }
@keyframes cd-pull { from { transform: translateY(35%) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cd-count { margin: 0; font: 600 .95rem/1.3 var(--display); color: var(--gold-deep); }
.cd-q { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: .3rem 0 .6rem; line-height: 1.2; }
.cd-choices { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .55rem; }
.cd-choices li { margin: 0; }
.cd-choice { display: flex; gap: .75rem; align-items: center; width: 100%; text-align: left; min-height: 48px; padding: .65rem .9rem; background: var(--sleeve);
  border: 2px solid var(--groove); border-radius: 4px; font: 400 1.05rem/1.35 var(--text); color: var(--ink); cursor: pointer; }
.cd-choice:hover:not(:disabled) { border-color: var(--petrol); }
.cd-choice__key { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #E6E1DC; font: 800 .9rem/1 var(--display); }
.cd-choice:disabled { cursor: default; opacity: 1; }
.cd-choice.is-correct { border-color: #2F7D4F; background: #EAF5EE; }
.cd-choice.is-correct .cd-choice__key { background: #2F7D4F; color: #fff; }
.cd-choice.is-correct::after { content: "Correct"; margin-left: auto; font: 700 .85rem/1 var(--display); color: #22613C; }
.cd-choice.is-wrong { border-color: #A33A2F; background: #FBECEA; }
.cd-choice.is-wrong .cd-choice__key { background: #A33A2F; color: #fff; }
.cd-choice.is-wrong::after { content: "Your pick"; margin-left: auto; font: 700 .85rem/1 var(--display); color: #8A2E25; }
.cd-feedback:empty { display: none; }
.cd-feedback { margin-top: 1rem; border-top: 1px solid var(--groove); padding-top: .9rem; }
.cd-verdict { font: 700 1.1rem/1.35 var(--display); margin-bottom: .4rem; }
.cd-verdict.is-right { color: #22613C; }
.cd-verdict.is-wrong { color: #8A2E25; }
.cd-expl { margin-bottom: .6rem; }
.cd-note { background: #F3F7F6; border-left: 4px solid var(--petrol); padding: .7rem .9rem; margin: .6rem 0; font-size: 1rem; }
.cd-note p { margin: 0 0 .3rem; }
.cd-note__label { font: 600 .85rem/1.3 var(--display); color: var(--ink-soft); }
.cd-explore { font-family: var(--display); font-weight: 600; }

/* results */
.cd-results h2 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: .2rem; }
.cd-scoreline { font-size: 1.15rem; }
.cd-scoreline strong { font-family: var(--display); font-size: 1.4rem; }
.cd-crate-art { list-style: none; display: flex; align-items: flex-end; gap: .4rem; padding: 1.2rem 1rem 0; margin: 1.2rem 0; background: linear-gradient(#FAF9F7 0 70%, #8C5A2B 70%); border-bottom: 10px solid #6E4420; max-width: 30rem; min-height: 8rem; }
.cd-crate-art li { margin: 0; flex: 1; display: flex; justify-content: center; }
.cd-crate-art .cd-rec { width: 100%; max-width: 5rem; height: auto; aspect-ratio: 1; }
.cd-crate-art li.is-pulled { transform: translateY(-1.2rem); }
.cd-crate-art li.is-left { transform: translateY(1.4rem); }
.cd-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0; }
.cd-next-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border-top: 1px solid var(--groove); padding-top: .5rem; }
.cd-next-steps h3 { margin-top: 1rem; }
.cd-links { padding-left: 1.2rem; }
.cd-product { background: var(--paper); border: 1px solid var(--groove); border-top: 4px solid var(--gold); padding: .9rem 1rem 1rem; margin-top: .8rem; }
.cd-product p { margin: 0 0 .5rem; }
.cd-product__label { font: 600 .85rem/1.3 var(--display); color: var(--gold-deep); }
.cd-disclosure { margin-top: .6rem !important; }

@media (max-width: 560px) {
  .cd-card { grid-template-columns: 1fr; padding: 1rem; }
  .cd-sleeve { display: none; }
  .cd-next-steps { grid-template-columns: 1fr; gap: 0; }
  .cd-progress .cd-rec { width: 2rem; height: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cd-anim .cd-sleeve .cd-rec { animation: none; }
}
