@font-face {
  font-family: Fraunces;
  src: url("../../assets/fraunces.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("../../assets/source-sans.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("../../assets/source-sans-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #192342;
  --cobalt: #2a42cc;
  --paper: #fff7e8;
  --white: #fffdf7;
  --coral: #f25d49;
  --yellow: #fae575;
  --lavender: #e4d7fd;
  --mint: #d7ead7;
  --rule: #d2ccd0;
  --display: Fraunces, Georgia, serif;
  --body: "Source Sans", system-ui, sans-serif;
}
*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.42 var(--body); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; font-weight: 800; letter-spacing: -.04em; }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
.mystery-app { width: min(100% - 34px, 1080px); margin: 0 auto; padding: clamp(15px, 4vw, 43px) 0 36px; }
.mystery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--cobalt);
  color: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}
.mystery-hero__copy { align-self: center; padding: clamp(1rem, 4.3vw, 3rem); }
.eyebrow { font-size: .93rem; font-weight: 700; }
.mystery-hero .eyebrow { color: #fff1ae; }
.mystery-hero h1 { margin: .14em 0 .22em; font-size: clamp(2.4rem, 6.1vw, 4.45rem); line-height: .97; letter-spacing: -.062em; }
.mystery-hero__copy > p:last-child { max-width: 40ch; }
.mystery-hero img { display: block; width: 100%; height: 100%; min-height: 210px; max-height: 330px; object-fit: cover; background: var(--cobalt); }
.mystery-setup {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: start;
  gap: clamp(1.3rem, 3.9vw, 3rem);
  margin-top: clamp(1.8rem, 4.6vw, 3.3rem);
}
.setting-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.setting-picker legend, .roster h2 { font: 800 clamp(1.62rem, 3.5vw, 2.4rem)/1.1 var(--display); letter-spacing: -.04em; }
.setting-picker legend { padding: 0 0 .68rem; }
.setting-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .52rem; }
.setting {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-height: 49px;
  padding: .4rem .6rem;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.15;
}
.setting span { min-width: 0; overflow-wrap: anywhere; }
.setting input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--cobalt); }
.setting:has(:checked) { background: var(--yellow); box-shadow: inset 0 0 0 1px var(--ink); }
.setting:hover:not(:has(:checked)) { background: var(--lavender); }
.setting-details { margin-top: .9rem; border-left: 3px solid var(--cobalt); padding: .48rem .65rem; }
.setting-details h2 { font-size: clamp(1.25rem, 2.1vw, 1.62rem); }
.setting-details p { margin-top: .36rem; font-size: 1rem; }
.roster { min-width: 0; padding: clamp(.85rem, 2vw, 1.4rem); border: 1.5px solid var(--ink); border-radius: 8px; background: var(--white); }
.roster-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .23rem .55rem; }
#roster-count { font-size: .91rem; font-weight: 700; }
#roster-help { margin: .48rem 0 .85rem; font-size: 1rem; }
#player-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .63rem; padding: 0; margin: 0 0 .78rem; list-style: none; }
.player { display: grid; gap: .23rem; min-width: 0; }
.player label { font-size: .94rem; font-weight: 700; }
.player-controls { display: flex; gap: .3rem; min-width: 0; }
.player input, .bulk-entry textarea {
  display: block;
  min-height: 43px;
  width: 100%;
  min-width: 0;
  border: 1px solid #737b94;
  border-radius: 5px;
  background: white;
  padding: .36rem .53rem;
  font-size: 1rem;
}
.player input[aria-invalid="true"] { border: 2px solid #a32d20; }
.remove-player { padding: .2em .4em; border: 1px solid #737b94; border-radius: 5px; background: var(--paper); font-size: .83rem; font-weight: 700; }
.remove-player:hover { background: var(--lavender); }
.bulk-entry { margin: .78rem 0 .8rem; padding-block: .5rem; border-block: 1px solid var(--rule); font-size: 1rem; }
.bulk-entry summary { padding-block: .25rem; cursor: pointer; font-weight: 700; }
.bulk-entry label { display: block; margin: .4rem 0 .3rem; }
.bulk-entry textarea { resize: vertical; }
.bulk-entry .button { margin: .52rem 0 .1rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .56em;
  min-height: 45px;
  padding: .48em .72em;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font: 700 1rem/1.2 var(--body);
}
.button-primary { background: var(--coral); box-shadow: 2px 2px var(--ink); }
.button-primary:hover:not(:disabled) { background: #ff7561; }
.button-primary:disabled { box-shadow: none; }
.button-outline { background: var(--white); }
.button-outline:hover:not(:disabled) { background: var(--lavender); }
.mystery-error { color: #8b2d20; margin: .48rem 0 .65rem; font-weight: 700; font-size: .96rem; }
.mystery-stage {
  width: min(100%, 820px);
  margin: clamp(1.55rem, 4.6vw, 3rem) auto 0;
  padding: clamp(.9rem, 3.8vw, 2.21rem);
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--white);
}
.stage-heading h2 { margin: .1em 0 .21em; font-size: clamp(2rem, 5.4vw, 3.5rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.stage-heading p { overflow-wrap: anywhere; }
.stage-heading .eyebrow { color: var(--cobalt); }
.stage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .63rem; margin-top: 1rem; }
.stage-actions button { text-align: center; }
.text-button {
  min-height: 40px;
  margin-top: .45rem;
  border: 0;
  background: none;
  padding: 0;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .21em;
  font-size: 1rem;
}
.print-steps { margin: .8rem 0 1.02rem; padding-left: 1.28rem; }
.print-steps li + li { margin-top: .32rem; }
.case-file {
  margin-top: 1rem;
  padding: clamp(.62rem, 2.3vw, 1.22rem);
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
}
.case-file p { white-space: pre-line; overflow-wrap: anywhere; }
.round-premise { border-bottom: 1px solid var(--rule); margin-bottom: .72rem; padding-bottom: .72rem; font-weight: 700; }
.round-task {
  margin-top: .9rem;
  padding: .57rem .75rem;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--mint);
}
.round-task h3 { margin-bottom: .32rem; font-size: 1.16rem; }
.finale-stage { background: var(--yellow); }
.solution-stage .culprit { font-weight: 700; font-size: 1.28rem; }
@media (max-width: 690px) {
  .mystery-hero { grid-template-columns: minmax(0, 1fr); }
  .mystery-hero img { min-height: 0; max-height: 180px; aspect-ratio: 1.65; object-position: center; }
  .mystery-setup { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .mystery-app { width: calc(100% - 26px); }
  .mystery-hero__copy { padding: .82rem; }
  .mystery-hero h1 { font-size: clamp(1.8rem, 10.85vw, 2.4rem); }
  .setting-options { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .setting { padding: .32rem .37rem; font-size: .95rem; }
  #player-list { grid-template-columns: 1fr; }
}
.mystery-embedded .mystery-hero { display: none; }
.mystery-embedded .mystery-app { padding-block: 6px 24px; }
.mystery-embedded :is(.mystery-setup, .mystery-stage) { margin-top: 0; }
@media screen {
  #print-deck { display: none; }
}
