.activity-page { width: min(1180px, calc(100% - 32px)); margin: auto; padding: 2rem 0 4rem; }
.header-action, .small-button, .start-button, .roll-button { border: 2px solid var(--ink); background: white; color: var(--ink); font-weight: 800; cursor: pointer; }
.header-action { justify-self: end; padding: .55rem .85rem; border-radius: 12px; }
.tool-setup { width: min(900px, 100%); margin: 2rem auto; }
.tool-setup h1 { margin-bottom: 1rem; font-size: clamp(3rem, 7vw, 5rem); }
.tool-setup > p:not(.eyebrow) { color: var(--muted); }
.tool-setup select, .setup-options select, .dice-controls select { min-height: 52px; padding: 0 .9rem; border: 2px solid var(--ink); border-radius: 13px; background: white; }
.small-button { min-height: 40px; padding: .5rem .8rem; border-radius: 11px; }
.small-button.primary, .start-button, .roll-button { background: var(--dark-orange); box-shadow: 3px 3px 0 var(--ink); }
.start-button { min-height: 52px; padding: .7rem 1.4rem; border-radius: 14px; }
.image-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.image-choice { padding: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 18px; background: white; cursor: pointer; }
.image-choice img { width: 100%; aspect-ratio: 3 / 2; display: block; object-fit: cover; }
.image-choice span { display: block; padding: .65rem; font-weight: 800; }
.labeler-page { max-width: none; }
.labeler-toolbar { margin-bottom: .8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.labeler-toolbar > span { font-weight: 700; }
.labeler-toolbar > div { display: flex; flex-wrap: wrap; gap: .45rem; }
.label-stage { position: relative; width: 100%; min-height: 720px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: white; border: 2px solid var(--ink); border-radius: 24px; }
.label-stage > img { position: relative; z-index: 1; width: 62%; max-height: 680px; object-fit: contain; cursor: crosshair; }
.label-stage svg, #label-layer { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.label-stage svg line { stroke: var(--ink); stroke-width: 2; }
.label-stage svg circle { fill: var(--dark-orange); stroke: var(--ink); stroke-width: 1; }
.image-label { position: absolute; width: 170px; min-height: 35px; padding: .35rem .55rem; overflow: hidden; border: 2px solid var(--ink); border-radius: 10px; background: #fff8d8; color: var(--ink); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; pointer-events: auto; cursor: pointer; }
.label-entry { position: fixed; z-index: 20; left: 50%; bottom: 24px; width: min(560px, calc(100% - 30px)); padding: .8rem; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .6rem; background: white; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 0 14px 40px rgba(48,59,59,.2); transform: translateX(-50%); }
.label-entry[hidden] { display: none; }
.label-entry input { min-width: 0; min-height: 44px; padding: 0 .7rem; border: 2px solid var(--ink); border-radius: 10px; }
.label-entry button { min-height: 42px; border: 2px solid var(--ink); border-radius: 10px; background: var(--frozen-water); font-weight: 800; }
.category-checklist { max-height: 330px; padding: .7rem; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; background: white; border: 2px solid var(--ink); border-radius: 18px; }
.category-option input { position: absolute; opacity: 0; }
.category-option span { display: block; padding: .65rem .75rem; border: 2px solid var(--line); border-radius: 11px; cursor: pointer; font-weight: 700; }
.category-option input:checked + span { border-color: var(--ink); background: var(--frozen-water); box-shadow: 2px 2px 0 var(--ink); }
.setup-options { margin: 1rem 0; display: flex; gap: 1rem; }
.setup-options label { display: grid; gap: .35rem; font-weight: 800; }
.setup-error { min-height: 1.4rem; color: #a34719; font-weight: 800; }
.board-top { margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }
.board-top > span { font: 600 1.5rem var(--font-heading); }
.word-cloud { min-height: 150px; padding: 1rem; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: .65rem; background: var(--frozen-water); border: 2px solid var(--ink); border-radius: 22px; }
.sort-word { padding: .6rem .9rem; border: 2px solid var(--ink); border-radius: 999px; background: white; font-weight: 800; cursor: grab; }
.sort-word.selected { background: var(--golden-pollen); transform: translateY(-3px); }
.sort-word.correct { background: #ccf3df; }
.sort-word.incorrect { background: #ffd9d6; }
.sort-bins { margin-top: 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.sort-bin { min-height: 230px; padding: .8rem; border: 2px solid var(--ink); border-radius: 18px; background: #fff8e6; }
.sort-bin:nth-child(even) { background: #eaf4ff; }
.sort-bin h2 { margin: 0 0 .6rem; font-size: 1.25rem; text-align: center; }
.bin-words { display: flex; flex-wrap: wrap; gap: .45rem; }
.board-message { font-weight: 800; text-align: center; }
.shades-setup { display: flex; align-items: end; gap: 2rem; }
.shades-setup h1 { margin: 0; }
.shades-setup select { min-width: 280px; }
.shades-board { min-height: 560px; padding: 2rem; background: #fff; border: 2px solid var(--ink); border-radius: 24px; }
.shade-words { min-height: 100px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .7rem; }
.shade-chip, .placed-word { padding: .6rem .85rem; border: 2px solid var(--ink); border-radius: 999px; background: #fff0f7; font-weight: 800; cursor: pointer; }
.shade-chip:nth-child(even) { background: #e9fcf9; }
.shade-chip.selected { background: var(--golden-pollen); transform: translateY(-4px); }
.shade-chip.placed { opacity: .45; }
.continuum-wrap { margin: 8rem 2rem 3rem; }
.continuum { position: relative; height: 18px; background: linear-gradient(90deg, var(--cerulean), var(--golden-pollen), var(--dark-orange)); border: 2px solid var(--ink); border-radius: 999px; cursor: crosshair; }
.placed-word { position: absolute; top: -56px; transform: translateX(-50%); white-space: nowrap; }
.placed-word::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 36px; background: var(--ink); }
.continuum-labels { margin-top: .75rem; display: flex; justify-content: space-between; font-size: 1.1rem; }
.shades-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem; }
.possible-order-word:nth-child(even) { top: 12px; }
.possible-order-word:nth-child(even)::after { top: auto; bottom: 100%; height: 30px; }
.dice-controls { margin-bottom: 2rem; display: flex; justify-content: center; align-items: end; gap: 1rem; }
.dice-controls label { display: grid; gap: .35rem; font-weight: 800; }
.roll-button { min-height: 54px; padding: .7rem 2rem; border-radius: 15px; font-size: 1.2rem; }
.dice-grid { display: grid; grid-template-columns: repeat(3, minmax(170px, 260px)); justify-content: center; gap: 1rem; }
.story-die { aspect-ratio: 1; padding: .65rem; overflow: hidden; background: white; border: 3px solid var(--ink); border-radius: 25px; box-shadow: 5px 5px 0 var(--ocean-mist); }
.story-die img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 16px; }
.story-die.is-rolling { animation: dice-wobble .22s linear infinite; }
@keyframes dice-wobble { 0% { transform: rotate(-4deg) scale(.95); } 50% { transform: rotate(4deg) scale(1.02); } 100% { transform: rotate(-4deg) scale(.95); } }
.colour-picker { margin-bottom: .6rem; display: flex; justify-content: center; gap: .5rem; }
.colour-choice { min-height: 42px; padding: .5rem .9rem; border: 2px solid var(--ink); border-radius: 12px; font-weight: 800; cursor: pointer; opacity: .65; }
.colour-choice.active { opacity: 1; box-shadow: 3px 3px 0 var(--ink); transform: translateY(-2px); }
.colour-choice.neutral { background: white; }
.colour-choice.yellow { background: #ffdc58; }
.colour-choice.green { background: #87cf9b; }
.colour-choice.grey { background: #9da3a3; color: #202525; }
.codenames-note { min-height: 1.5rem; margin: .4rem 0 .7rem; text-align: center; color: var(--muted); font-weight: 700; }
.codenames-page { padding-top: 1rem; }
.codenames-grid { width: min(100%, calc((100vh - 190px) * 1.5)); margin: auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: .42rem; }
.codename-tile { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 13px; background: white; cursor: pointer; }
.codename-tile img { width: 100%; height: 100%; display: block; object-fit: contain; transition: opacity .18s ease, filter .18s ease; }
.codename-tile span { position: absolute; inset: 0; pointer-events: none; transition: background .18s ease; }
.codename-tile.yellow { background: #8a6700; }
.codename-tile.green { background: #1f6542; }
.codename-tile.grey { background: #3f4848; }
.codename-tile.yellow img, .codename-tile.green img, .codename-tile.grey img { opacity: .72; mix-blend-mode: luminosity; }
.codename-tile.yellow span { background: rgba(255,209,43,.34); }
.codename-tile.green span { background: rgba(71,185,112,.34); }
.codename-tile.grey span { background: rgba(69,78,78,.48); }
.codename-tile.neutral span { background: transparent; }
.codename-tile.awaiting-image { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #f5f5f1, #f5f5f1 10px, #ebebe6 10px, #ebebe6 20px); color: var(--muted); }
.codename-tile em { font-size: .75rem; }
.treasure-page { padding-top: 1rem; }
.treasure-count { min-height: 1.5rem; margin: 0 0 .8rem; text-align: center; font-weight: 800; }
.treasure-grid { width: min(100%, calc((100vh - 165px) * 1.5)); margin: auto; padding: .55rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: .38rem; background: #4b8d19 url('/static/images/treasure_hunt/grass_background.png') center / cover; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 #285915; perspective: 1200px; }
.treasure-tile { aspect-ratio: 1; padding: 0; border: 2px solid #254f18; border-radius: 10px; background: transparent; cursor: pointer; perspective: 800px; }
.treasure-card { position: relative; width: 100%; height: 100%; display: block; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.75,.2,1); }
.treasure-tile.is-open .treasure-card { transform: rotateY(180deg); }
.treasure-front, .treasure-back { position: absolute; inset: 0; overflow: hidden; border-radius: 8px; backface-visibility: hidden; }
.treasure-back { transform: rotateY(180deg); }
.treasure-front img, .treasure-back img { width: 100%; height: 100%; display: block; object-fit: cover; }
.treasure-tile:hover:not(.is-open) .treasure-card { transform: translateY(-3px) rotate(-1deg); }
.treasure-tile:focus-visible { outline: 4px solid var(--golden-pollen); outline-offset: 2px; }
.city-setup h1 { margin-bottom: 1.2rem; }
.city-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.city-choice { padding: 0; overflow: hidden; border: 3px solid transparent; border-radius: 22px; background: white; box-shadow: 0 8px 24px rgba(48,59,59,.12); cursor: pointer; }
.city-choice img { width: 100%; aspect-ratio: 3 / 2; display: block; object-fit: cover; }
.city-choice span { display: block; padding: .75rem; color: var(--ink); font: 600 1.2rem var(--font-heading); }
.city-choice.is-selected { border-color: var(--dark-orange); box-shadow: 5px 5px 0 var(--ink); transform: translateY(-3px); }
.city-options { margin-top: 1.2rem; display: flex; align-items: end; gap: 1rem; }
.city-options label { display: grid; gap: .35rem; font-weight: 800; }
.city-options select { min-height: 52px; padding: 0 .9rem; border: 2px solid var(--ink); border-radius: 13px; background: white; }
.city-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.city-toolbar h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); }
.city-actions { display: flex; align-items: center; gap: .65rem; }
.city-progress { margin: .5rem 0 1rem; font-weight: 800; text-align: center; }
.city-play-area { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(480px, 2fr); gap: 1.25rem; align-items: start; }
.city-play-area h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.piece-tray { min-height: 360px; padding: .8rem; display: grid; grid-template-columns: repeat(2, minmax(70px, 1fr)); align-content: start; gap: .55rem; background: var(--frozen-water); border: 2px dashed var(--cerulean); border-radius: 18px; }
.piece-tray > p { grid-column: 1 / -1; margin: auto; padding: 1rem; color: var(--muted); font-weight: 700; text-align: center; }
.city-board { display: grid; grid-template-columns: repeat(var(--city-columns), 1fr); grid-template-rows: repeat(var(--city-rows), 1fr); gap: 4px; overflow: hidden; background: #727b7b; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 7px 7px 0 var(--dusty-mauve); }
.city-cell { min-width: 0; min-height: 0; background: linear-gradient(145deg, #c7cccc, #aeb5b5); outline: 1px solid rgba(255,255,255,.55); }
.city-piece { width: 100%; height: 100%; min-height: 78px; display: block; padding: 0; border: 2px solid white; border-radius: 7px; background-repeat: no-repeat; cursor: grab; box-shadow: 2px 2px 0 rgba(48,59,59,.55); }
.city-piece.is-selected { outline: 5px solid var(--golden-pollen); outline-offset: -5px; transform: scale(.94); }
.city-cell .city-piece { min-height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.city-board.is-complete { gap: 0; box-shadow: 8px 8px 0 var(--ocean-mist); }
.city-board.is-complete .city-piece { outline: 0; }
@media (max-width: 760px) { .image-picker { grid-template-columns: repeat(2, 1fr); } .labeler-toolbar { align-items: flex-start; flex-direction: column; } .label-stage { min-height: 520px; } .label-stage > img { width: 72%; } .image-label { width: 105px; font-size: .75rem; } .category-checklist { grid-template-columns: repeat(2, 1fr); } .shades-setup { align-items: stretch; flex-direction: column; gap: 1rem; } .continuum-wrap { margin: 8rem 0 3rem; } .dice-grid { grid-template-columns: repeat(2, 1fr); } .codenames-grid { gap: .25rem; } .codename-tile { border-radius: 7px; } .label-entry { grid-template-columns: 1fr auto; } .label-entry label { grid-column: 1 / -1; } .label-entry button:last-child { grid-column: 1 / -1; } }
@media (max-width: 820px) { .city-picker { grid-template-columns: 1fr; } .city-options, .city-toolbar { align-items: stretch; flex-direction: column; } .city-play-area { grid-template-columns: 1fr; } .piece-tray { min-height: 150px; grid-template-columns: repeat(4, 1fr); } .board-label { margin-top: .5rem !important; } }
