/* Shadow Match: a little picture book; silhouettes become a persistent collection. */
.shadows-scene {
  --shadow-size: clamp(92px, 15vw, 136px);
  --picture-size: clamp(104px, 17vw, 144px);
  display: grid; grid-template-rows: minmax(104px, 1fr) auto 28px 30px;
  justify-items: center; align-items: center; gap: 12px;
  width: min(700px,100%); max-height: 600px; align-self: center;
}
.shadows-source { position: relative; width: 100%; min-height: 0; height: 100%; display: grid; place-items: center; z-index: 3; }
.shadows-piece { display: block; width: var(--picture-size); height: var(--picture-size); padding: 0; border: 0; border-radius: 18px; background: transparent; touch-action: none; cursor: grab; filter: drop-shadow(0 5px 0 rgb(25 42 49 / 12%)); }
.shadows-piece:disabled { cursor: default; }
.shadows-piece.shadows-away { visibility: hidden; }
.shadows-piece.shadows-dragging { cursor: grabbing; filter: drop-shadow(0 9px 6px rgb(25 42 49 / 25%)); }
.shadows-piece svg, .shadows-slot svg, .shadows-keepsake svg, .shadows-flight svg { display: block; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.shadows-direction { position: absolute; bottom: -11px; color: var(--tf-muted); font-size: 23px; line-height: 1; pointer-events: none; }
.shadows-garden { display: grid; grid-template-columns: repeat(2,var(--shadow-size)); gap: 20px; padding: 20px 24px 25px; position: relative; border-radius: 48% 48% 26px 26px / 9% 9% 26px 26px; background: #e7e5d6; box-shadow: 0 6px 0 rgb(16 33 45 / 12%); }
.shadows-garden::before { content: ''; position: absolute; inset: 10px 10px auto; height: 26px; border-radius: 50%; border-top: 2px solid rgb(113 139 136 / 17%); pointer-events: none; }
.shadows-scene[data-family="sea"] .shadows-garden { background: #dce9e6; }
.shadows-scene[data-family="sky"] .shadows-garden { background: #e1e8ed; }
.shadows-scene[data-family="forest"] .shadows-garden { background: #e1e6d7; }
.shadows-world-decor { position: absolute; inset: auto 18px 1px; width: calc(100% - 36px); height: 8px; color: #6f8d83; opacity: .48; pointer-events: none; }
.shadows-scene[data-family="sky"] .shadows-world-decor { color: #728ba1; }
.shadows-scene[data-family="forest"] .shadows-world-decor { color: #908172; }
.shadows-scene[data-level="2"] .shadows-garden { grid-template-columns: repeat(3,var(--shadow-size)); }
.shadows-slot { position: relative; display: block; width: var(--shadow-size); height: var(--shadow-size); padding: 0; border: 0; border-radius: 16px; background: transparent; touch-action: manipulation; }
.shadows-slot-art { display: block; width: 100%; height: 100%; pointer-events: none; }
.shadows-slot.shadows-pending { cursor: default; }
.shadows-slot.shadows-filled { cursor: pointer; }
.shadows-slot:focus-visible { outline: 3px solid #285875; outline-offset: 4px; }
.shadows-pending .shadows-slot-art { visibility: hidden; }
.shadows-filled .shadows-slot-art { filter: drop-shadow(0 4px 0 rgb(32 62 64 / 13%)); }
.shadows-greeting .shadows-slot-art { filter: drop-shadow(0 4px 0 rgb(32 62 64 / 13%)) drop-shadow(0 0 3px rgb(255 247 211 / 85%)); }
.shadows-key { position: absolute; bottom: -10px; left: 0; right: 0; font: 600 11px/1 var(--tf-font); color: #51606b; }
.shadows-filled .shadows-key { visibility: hidden; }
.shadows-hint .shadows-contour { stroke: #8d591c; stroke-width: 6px; stroke-dasharray: 7 7; stroke-linejoin: round; }
.shadows-piece.shadows-hint .shadows-contour { stroke: #ffe6ad; }
.shadows-look .shadows-contour { stroke: #ffe6ad; stroke-width: 4px; }
.shadows-different .shadows-contour { fill: #677d85; }
.shadows-over { outline: 3px solid #526e74; outline-offset: 4px; }
.shadows-flight { position: fixed; display: block; z-index: 6; pointer-events: none; transform-origin: 0 0; filter: drop-shadow(0 5px 3px rgb(23 43 58 / 16%)); }
.shadows-keepsakes { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 28px; }
.shadows-keepsake { width: 28px; height: 28px; display: block; }
.shadows-status { margin: 0; padding: 0 4px; min-height: 2.4em; color: var(--tf-muted); text-align: center; font-size: 13px; line-height: 1.25; }
@media (hover:hover) { .shadows-slot:not([aria-disabled="true"]):hover .shadows-contour { stroke: #708994; stroke-width: 3px; } }
@media (max-width:600px) and (min-height:521px) {
  .shadows-scene { --shadow-size: clamp(68px,20vw,104px); --picture-size: 106px; gap: 10px; grid-template-rows: minmax(96px,1fr) auto 28px 30px; max-height: 470px; }
  .shadows-garden { padding: 15px 16px 21px; gap: 18px; }
  .shadows-scene[data-level="2"] .shadows-garden { grid-template-columns: repeat(3,var(--shadow-size)); gap: 10px; padding-inline: 10px; }
}
@media (max-width:600px) and (max-height:670px) and (orientation:portrait) {
  .shadows-scene { --shadow-size: 68px; --picture-size: 78px; gap: 7px; grid-template-rows: 78px auto 24px 25px; }
  .shadows-garden { padding: 12px 16px 17px; gap: 15px; }
  .shadows-keepsakes { min-height: 24px; }
  .shadows-keepsake { width: 24px; height: 24px; }
  .shadows-status { font-size: 11px; }
  .shadows-direction { bottom: -7px; font-size: 18px; }
  .shadows-world-decor { height: 5px; }
}
@media (max-height:520px) and (orientation:landscape) {
  .shadows-scene { --shadow-size: clamp(60px,17vh,78px); --picture-size: 94px; width: max-content; max-width: 100%; grid-template-columns: 125px auto; grid-template-rows: auto 22px; gap: 8px 25px; }
  .shadows-source { grid-row: 1; grid-column: 1; }
  .shadows-garden { grid-row: 1; grid-column: 2; padding: 9px 15px 18px; gap: 14px; }
  .shadows-scene[data-level="2"] .shadows-garden { grid-template-columns: repeat(3,var(--shadow-size)); }
  .shadows-keepsakes { grid-column: 1; grid-row: 2; gap: 4px; min-height: 22px; }
  .shadows-keepsake { width: 22px; height: 22px; }
  .shadows-status { grid-column: 2; grid-row: 2; font-size: 11px; min-height: 1.2em; }
  .shadows-direction { right: 1px; bottom: auto; transform: rotate(-90deg); }
  .shadows-world-decor { height: 6px; }
}
@media (max-height:360px) and (orientation:landscape) {
  body[data-game="shadows"] .play-view { --play-bottom-space: calc(66px + env(safe-area-inset-bottom,0px)); }
  body[data-game="shadows"] .play-topline { flex-basis: 64px; }
  body[data-game="shadows"] .game-content { margin-top: 4px; }
  .shadows-scene { --shadow-size: 56px; --picture-size: 82px; grid-template-columns: 100px auto; grid-template-rows: minmax(0,1fr); gap: 4px 22px; }
  .shadows-garden { gap: 9px 16px; padding: 7px 13px 15px; }
  .shadows-key { bottom: -8px; font-size: 9px; }
  .shadows-world-decor { height: 4px; }
  .shadows-keepsakes { grid-row: 1; align-self: end; }
  .shadows-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (forced-colors:active) {
  .shadows-contour, .shadows-details { forced-color-adjust: none; }
  .shadows-garden { forced-color-adjust: none; }
  .shadows-slot:focus-visible, .shadows-over { outline-color: Highlight; }
}
