/* Scoped, warm-paper play spaces. All picture assets come from the shared art layer. */
body:has(.everyday-screen) .scenic {
  background: radial-gradient(ellipse at 5% 0%, #e4efdf, transparent 60%),
    radial-gradient(ellipse at 100% 90%, #f9e5bd, transparent 55%),
    linear-gradient(150deg, #f5f8ed, #fffaf0);
}
body:has(.everyday-screen) .scenic-art {
  display: none;
}
.play-screen.everyday-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1180px;
}
.everyday-screen .instruction-card .eyebrow,
.everyday-screen .instruction-skill {
  display: none;
}
.everyday-screen .instruction-card {
  padding: 8px 12px;
}
.everyday-screen .instruction-card h2 {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.2;
}
.everyday-screen > .top-bar {
  position: relative;
  border-radius: 20px;
  background: #fffdf7f5;
}
.everyday-screen :is(.icon-btn, .repeat-btn) {
  min-width: 52px;
  min-height: 52px;
}
.everyday-grid {
  --everyday-ink: #243f48;
  --everyday-soft: #526b6a;
  --everyday-line: #c7d8c8;
  --everyday-green: #35755d;
  position: relative;
  display: block !important;
  width: 100%;
  max-width: 1080px;
  min-width: 0;
  margin: 0 auto;
  color: var(--everyday-ink);
}
.everyday-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr);
  gap: 20px;
  align-items: start;
}
.everyday-scene-panel,
.everyday-controls {
  min-width: 0;
}
.everyday-levels {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.everyday-button {
  min-width: 48px;
  min-height: 52px;
  padding: 10px 14px;
  border: 2px solid var(--everyday-line);
  border-radius: 18px;
  background: #fffdf7;
  box-shadow: 0 3px 0 #d2ddcd;
  color: var(--everyday-ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.everyday-button.is-selected {
  border-color: var(--everyday-green);
  background: #e5f2dc;
  box-shadow: 0 3px 0 #91b395, inset 0 0 0 1px var(--everyday-green);
}
.everyday-button:focus-visible,
.everyday-button-options summary:focus-visible {
  outline: 3px solid #256e88;
  outline-offset: 4px;
}
.everyday-button:not(:disabled):active {
  box-shadow: 0 1px 0 #b4c5ad;
}
.everyday-button:disabled {
  cursor: default;
  box-shadow: none;
  color: #69796e;
  background: #eff2e8;
}
.everyday-button span {
  overflow-wrap: anywhere;
}
.everyday-levels .everyday-button {
  flex: 1;
  padding: 9px 6px;
  font-size: 15px;
}
.everyday-story {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.everyday-story:empty {
  display: none;
}
.everyday-story-step {
  flex: 0 1 52px;
  min-width: 0;
  padding: 3px;
  border: 2px solid #d5dfcf;
  border-radius: 16px;
  background: #f7f7ed;
}
.everyday-story-step > span {
  display: block;
  aspect-ratio: 1;
}
.everyday-story-step svg {
  display: block;
  width: 100%;
  height: 100%;
}
.everyday-story-step.is-current {
  border-color: #5d8e68;
  background: #fff1c9;
  box-shadow: 0 3px 0 #c6d4b4;
}
.everyday-story-step.is-done {
  border-color: #8baa8c;
  background: #e8f2e0;
}
.everyday-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.25;
  overflow: hidden;
  border-radius: 28px;
  background: radial-gradient(ellipse at 50% 10%, #fffdf4, #e6efdc);
  box-shadow: 0 5px 0 #d4dfcd, inset 0 0 0 2px var(--everyday-line);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  isolation: isolate;
}
.everyday-stage[data-contact='true'] {
  box-shadow: 0 5px 0 #afc8a8, inset 0 0 0 3px #629574;
  cursor: grabbing;
}
@media (min-width: 761px) {
  .everyday-stage {
    max-width: min(100%, max(300px, calc((100svh - 320px) * 1.25)));
    margin-inline: auto;
  }
}
.everyday-scene-art,
.everyday-target-art,
.everyday-effect,
.everyday-contact {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.everyday-stage
  :is(
    .everyday-scene-art,
    .everyday-target-art,
    .everyday-effect,
    .everyday-contact
  )
  > svg {
  display: block;
  width: 100%;
  height: 100%;
}
.everyday-target-ring {
  fill: #fff9dd0a;
  stroke: #6a8772;
  stroke-width: 4px;
  stroke-dasharray: 10 12;
}
.everyday-target-progress {
  fill: none;
  stroke: #36795b;
  stroke-width: 7px;
}
.everyday-road-checkpoint {
  fill: #fff7db;
  stroke: #3d765e;
  stroke-width: 5px;
}
.everyday-road-arrow {
  fill: none;
  stroke: #36604c;
  stroke-width: 6px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.everyday-finger-contact {
  fill: #fff8dc55;
  stroke: #477e68;
  stroke-width: 4px;
}
.everyday-car {
  position: absolute;
  left: -10%;
  top: -10.75%;
  width: 20%;
  height: 17.25%;
  transform-origin: 50% 62.32%;
  pointer-events: none;
  transition: transform 100ms linear;
  will-change: transform;
}
.everyday-car[data-travel='tap'] {
  transition-duration: 450ms;
  transition-timing-function: ease-in-out;
}
.everyday-car[data-travel='reset'] {
  transition: none;
}
.everyday-car > svg {
  display: block;
  width: 100%;
  height: 100%;
}
.everyday-car[hidden],
.everyday-ghost[hidden],
.everyday-assist[hidden] {
  display: none;
}
.everyday-ghost {
  position: absolute;
  z-index: 12;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 5px 3px #344e3b30);
}
.everyday-ghost > svg {
  display: block;
  width: 100%;
  height: 100%;
}
.everyday-grid[data-dragging='true']
  .everyday-tray
  .everyday-button.is-selected {
  background: #fff0c6;
}
.everyday-touch-hint {
  margin: 12px 2px 6px;
  color: var(--everyday-soft);
  font-size: 14px;
  line-height: 1.5;
}
.everyday-status {
  min-height: 28px;
  margin: 6px 2px 0;
  color: #426552;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.everyday-status[data-ready='true'] {
  color: #276246;
}
.everyday-request {
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 2px solid #d7dfcf;
  border-radius: 24px;
  background: #fffdf5;
}
.everyday-phase {
  margin: 0 0 7px;
  color: #60746a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.everyday-instruction {
  margin: 0;
  font-family: var(--kid-display, 'Trebuchet MS', sans-serif);
  font-size: clamp(21px, 2.5vw, 29px);
  line-height: 1.25;
  text-wrap: balance;
}
.everyday-tray {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.everyday-tray .everyday-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 14px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.everyday-tool-picture {
  display: block;
  width: 76px;
  height: 76px;
  max-width: 100%;
}
.everyday-tool-picture > svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.everyday-tray .everyday-button.is-needed:not(.is-selected) {
  border-color: #8ca986;
}
.everyday-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: #526859;
  font-size: 14px;
  line-height: 1.5;
}
.everyday-hint:empty {
  display: none;
}
.everyday-hint-picture {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
}
.everyday-hint-picture > svg {
  width: 100%;
  height: 100%;
}
.everyday-alternatives {
  margin-top: 16px;
}
.everyday-alternatives:empty {
  display: none;
}
.everyday-alternatives > .everyday-button {
  width: 100%;
}
.everyday-button-options summary {
  min-height: 48px;
  padding: 12px 4px;
  color: #4c685a;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}
.everyday-target-buttons {
  display: grid;
  gap: 8px;
}
.everyday-target-buttons .everyday-button {
  width: 100%;
  min-height: 52px;
  font-size: 14px;
}
.everyday-assist {
  margin-top: 12px;
}
.everyday-assist > p {
  color: var(--everyday-soft);
  font-size: 14px;
  line-height: 1.5;
}
.everyday-undo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.everyday-undo .everyday-button {
  font-size: 13px;
}
.everyday-continue {
  margin-top: 16px;
}
.everyday-continue .everyday-button {
  width: 100%;
  background: #37785d;
  border-color: #2c664e;
  box-shadow: 0 4px 0 #244f3d;
  color: #fffdf3;
  font-family: var(--kid-display, 'Trebuchet MS', sans-serif);
  font-size: 23px;
  min-height: 60px;
}
.everyday-continue .everyday-button:disabled {
  background: #e3e9dc;
  border-color: #c9d6c2;
  color: #687765;
  box-shadow: none;
}
.everyday-reset {
  margin-top: 10px;
  text-align: center;
}
.everyday-reset .everyday-button {
  min-height: 48px;
  padding: 8px 18px;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
}
.everyday-note {
  margin: 14px 2px 0;
  color: var(--everyday-soft);
  font-size: 13px;
  line-height: 1.5;
}
.everyday-grid[data-motion='playful'] .everyday-action-marks {
  animation: everyday-contact 750ms ease-out both;
}
.everyday-grid[data-motion='quiet'] *,
.everyday-grid[data-motion='quiet'] *::before,
.everyday-grid[data-motion='quiet'] *::after,
.everyday-grid[data-paused='true'] *,
.everyday-grid[data-paused='true'] *::before,
.everyday-grid[data-paused='true'] *::after {
  animation: none !important;
  transition: none !important;
}
@keyframes everyday-contact {
  0% {
    opacity: 0;
  }
  18%,
  65% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 760px) {
  .everyday-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .everyday-request {
    padding: 13px 16px;
    margin-bottom: 10px;
  }
  .everyday-tray {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .everyday-grid[data-kind='match'] .everyday-tray {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .everyday-grid[data-kind='routine'] .everyday-tray {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .everyday-grid[data-kind='rally'] .everyday-tray {
    display: none;
  }
  .everyday-tool-picture {
    width: 62px;
    height: 62px;
  }
  .everyday-tray .everyday-button {
    padding: 7px 3px;
    font-size: 12px;
  }
  .everyday-stage {
    border-radius: 22px;
  }
  .everyday-levels {
    margin-bottom: 10px;
  }
  .everyday-story {
    gap: 8px;
    margin-bottom: 10px;
  }
  .everyday-story-step {
    flex-basis: 42px;
    border-radius: 13px;
  }
  .everyday-touch-hint {
    margin-top: 10px;
  }
  .everyday-alternatives,
  .everyday-continue {
    margin-top: 12px;
  }
}
@media (max-width: 760px) {
  .everyday-layout {
    gap: 10px;
  }
  .everyday-scene-panel,
  .everyday-controls {
    display: contents;
  }
  .everyday-levels {
    grid-row: 1;
    margin: 0;
  }
  .everyday-request {
    grid-row: 2;
    margin: 0;
    padding: 10px 14px;
  }
  .everyday-request .everyday-phase {
    margin-bottom: 3px;
    font-size: 11px;
  }
  .everyday-request .everyday-instruction {
    font-size: 21px;
  }
  .everyday-story {
    grid-row: 3;
    margin: 0;
    gap: 8px;
  }
  .everyday-story-step {
    flex-basis: 36px;
    border-radius: 12px;
  }
  .everyday-stage {
    grid-row: 4;
  }
  .everyday-tray {
    grid-row: 5;
  }
  .everyday-status {
    grid-row: 6;
    margin: 0;
    min-height: 0;
    font-size: 14px;
  }
  .everyday-hint {
    grid-row: 7;
    margin: 0;
  }
  .everyday-continue {
    grid-row: 8;
    margin-top: 0;
  }
  .everyday-alternatives {
    grid-row: 9;
    margin-top: 0;
  }
  .everyday-reset {
    grid-row: 10;
    margin-top: 0;
  }
  .everyday-note {
    grid-row: 11;
    margin-top: 0;
  }
  .everyday-touch-hint {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
@media (max-width: 360px) {
  .everyday-tool-picture {
    width: 50px;
    height: 50px;
  }
  .everyday-tray {
    gap: 6px;
  }
  .everyday-tray .everyday-button {
    font-size: 11px;
  }
  .everyday-levels .everyday-button {
    font-size: 13px;
  }
}
@media (min-width: 620px) and (max-height: 560px) and (orientation: landscape) {
  .everyday-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr);
    gap: 14px;
  }
  .everyday-tray {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .everyday-tool-picture {
    width: 50px;
    height: 50px;
  }
  .everyday-request {
    padding: 10px 12px;
  }
  .everyday-instruction {
    font-size: 20px;
  }
  .everyday-note {
    margin-top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .everyday-grid *,
  .everyday-grid *::before,
  .everyday-grid *::after {
    animation: none !important;
    transition: none !important;
  }
}
