.activitoo-three-clues * { box-sizing: border-box; }
.activitoo-three-clues {
  color-scheme: light;
  --font: var(--ag-font);
  --ink: var(--ag-ink);
  --muted: #514963;
  --accent: var(--ag-primary);
  --accent-dark: var(--ag-primary-dark);
  --border: var(--ag-border);
  --wash: #f3eefc;
  --surface: var(--ag-surface);
}
.activitoo-three-clues { color: var(--ink); font: 1rem/1.55 var(--font); }
.activitoo-three-clues.is-standalone { width: min(100% - 1.25rem, 42rem); margin: clamp(1rem, 6vw, 4rem) auto; }
.activitoo-three-clues header { display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.activitoo-three-clues.is-embedded h1, .activitoo-three-clues.is-embedded header strong { display: none; }
.activitoo-three-clues.is-embedded { margin: 0 auto; padding: .8rem 0 1.25rem; display: flow-root; }
.activitoo-three-clues.is-embedded > header { justify-content: flex-end; }
.activitoo-three-clues header strong { font-size: 1.25rem; letter-spacing: -.055em; }
.activitoo-three-clues h1 { font: 750 clamp(2rem, 7vw, 3.6rem)/1.06 var(--font); letter-spacing: -.045em; }
.activitoo-three-clues h2 { margin: 0; font-size: clamp(1.25rem, 4.5vw, 1.6rem); line-height: 1.2; }
.activitoo-three-clues h3 { font-size: 1rem; }
.activitoo-three-clues p { margin: .65rem 0 1rem; }
.activitoo-three-clues #screen { box-shadow: 0 12px 28px #34235b12; }
.activitoo-three-clues button, .activitoo-three-clues input { min-height: var(--ag-control-height); font: inherit; border-radius: var(--ag-control-radius); }
.activitoo-three-clues button {
  padding: .55rem .85rem; border: 1px solid var(--border); background: var(--surface);
  color: var(--accent-dark); font-weight: 650; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.activitoo-three-clues button:hover { background-color: var(--wash); border-color: #b9a8eb; }
.activitoo-three-clues button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.activitoo-three-clues button.primary:hover { background: var(--accent-dark); box-shadow: 0 5px 12px #5638ba30; }
.activitoo-three-clues :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.activitoo-three-clues input { display: block; width: 100%; padding: .6rem .8rem; border: 1px solid #9589aa; margin: .35rem 0 .75rem; color: var(--ink); }
.activitoo-three-clues label { font-weight: 650; }
.activitoo-three-clues details { margin: .8rem 0; border: 1px solid var(--border); border-radius: .9rem; background: var(--surface); }
.activitoo-three-clues details > :not(summary) { margin-inline: .95rem; overflow-wrap: anywhere; }
.activitoo-three-clues summary {
  display: flex; justify-content: space-between; align-items: center; min-height: 44px;
  gap: .75rem; padding: .55rem .95rem; cursor: pointer; font-weight: 650; color: var(--accent-dark);
  list-style: none; border-radius: .9rem;
}
.activitoo-three-clues summary::-webkit-details-marker { display: none; }
.activitoo-three-clues summary::after {
  content: ''; width: .5rem; height: .5rem; flex: none; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease;
}
.activitoo-three-clues details[open] > summary::after { transform: rotate(225deg); }
@supports (interpolate-size: allow-keywords) and selector(details::details-content) {
  .activitoo-three-clues details { interpolate-size: allow-keywords; }
  .activitoo-three-clues details::details-content {
    block-size: 0; overflow: clip;
    transition: block-size .24s ease, content-visibility .24s allow-discrete;
  }
  .activitoo-three-clues details[open]::details-content { block-size: auto; }
}
.activitoo-three-clues .level-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .55rem; }
.activitoo-three-clues .level-list li { margin: 0; }
.activitoo-three-clues .level-list button { width: 100%; text-align: start; padding: .75rem .95rem; background: var(--wash); }
.activitoo-three-clues .level-list button[data-level="2"] { background: #eef0ff; }
.activitoo-three-clues .level-list button[data-level="3"] { background: #e8dff9; }
.activitoo-three-clues .level-list button:hover { border-color: var(--accent); }
.activitoo-three-clues .results-panel { margin: .8rem 0 0; padding: 0; border: 0; background: transparent; }
.activitoo-three-clues .results-panel > details { margin: 0; }
.activitoo-three-clues .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.activitoo-three-clues .clue {
  font: 600 clamp(1.35rem, 5vw, 1.8rem)/1.3 var(--font); padding: 1rem;
  border-radius: .9rem; background: linear-gradient(130deg,#f8f4fe,#ede4fb); margin-block: .8rem;
}
.activitoo-three-clues .game-meta { color: var(--muted); font-size: .88rem; }
.activitoo-three-clues .help { background: #f3eefc; padding: .7rem .85rem; border-radius: .65rem; border-inline-start: 3px solid #8b6fe0; }
.activitoo-three-clues .answer-card { margin-block: .9rem; padding: .9rem 1rem; border-radius: .9rem; background: #f1ebfc; }
.activitoo-three-clues .answer-card[data-result="correct"] { background: #e5f5ee; color: #184b38; }
.activitoo-three-clues .answer-card[data-result="incorrect"] { background: #fff0e4; color: #673515; }
.activitoo-three-clues .answer-word { display: block; font: 750 clamp(1.8rem, 7vw, 2.75rem)/1.1 var(--font); overflow-wrap: anywhere; }
.activitoo-three-clues .answer-card p { margin-bottom: 0; }
.activitoo-three-clues .example { border-inline-start: 3px solid #a892dc; padding-inline-start: .75rem; }
.activitoo-three-clues progress { display: block; width: 100%; height: .5rem; margin-top: .8rem; accent-color: var(--accent); }
.activitoo-three-clues li + li { margin-top: .65rem; }
.activitoo-three-clues .view-enter, .activitoo-three-clues .hint-enter { animation: activitoo-three-clues-enter .23s ease-out both; }
@keyframes activitoo-three-clues-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .activitoo-three-clues *, .activitoo-three-clues *::after, .activitoo-three-clues details::details-content { animation: none !important; transition: none !important; }
}
.activitoo-three-clues .game-help-bar {display:flex;justify-content:flex-end;margin:0 0 .75rem}
.activitoo-three-clues.is-embedded .game-help-bar {display:none}
.activitoo-three-clues #help-open {background:#6843c5;color:#fff;border-color:#6843c5}

.activitoo-three-clues:not(.is-standalone) > :is(h1, .game-help-bar),
.activitoo-three-clues:not(.is-standalone) > header > strong { display: none; }
.activitoo-three-clues:not(.is-standalone) > header { justify-content: flex-end; }

/* Three Clues desktop/tablet typography; tune tokens independently. */
.activitoo-three-clues {
  --tc-body: 20px;
  --tc-controls: 21px;
  --tc-clue: 30px;
  --tc-heading: 30px;
  --tc-meta: 17px;
  --tc-width: 1080px;
}
@media (min-width: 768px) {
  .activitoo-three-clues { font-size: var(--tc-body); line-height: 1.5; }
  .activitoo-three-clues.is-standalone { width: min(calc(100% - 2 * var(--ag-gutter-wide, 24px)), var(--tc-width)); max-width: var(--tc-width); }
  .activitoo-three-clues button, .activitoo-three-clues input, .activitoo-three-clues select, .activitoo-three-clues summary { font-size: var(--tc-controls); min-height: 54px; }
  .activitoo-three-clues h2 { font-size: var(--tc-heading); }
  .activitoo-three-clues h3 { font-size: 23px; }
  .activitoo-three-clues .clue { font-size: var(--tc-clue); line-height: 1.35; }
  .activitoo-three-clues .game-meta { font-size: var(--tc-meta); }
  .activitoo-three-clues .answer-word { font-size: 38px; }
  .activitoo-three-clues .level-list button { padding: 16px 20px; }

}
@media (min-width: 1500px) {
  .activitoo-three-clues {
    --tc-body: 24px;
    --tc-controls: 26px;
    --tc-clue: 38px;
    --tc-heading: 38px;
    --tc-meta: 21px;
    --tc-width: 1250px;
  }
  .activitoo-three-clues .answer-word { font-size: 46px; }
}
