/* Per-object puzzle layer for the ZUNGK found-object archive. */
.zungk-editorial-board .wf-tile[data-object-puzzle]:not([data-care-state="saved"]):hover .wf-tile-label,
.zungk-editorial-board .wf-tile[data-object-puzzle]:not([data-care-state="saved"]):focus-visible .wf-tile-label,
.zungk-editorial-board .wf-tile[data-object-puzzle]:not([data-care-state="saved"]).is-hovered .wf-tile-label {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.zungk-editorial-board .wf-tile[data-object-puzzle] {
  cursor: pointer;
}

.zungk-editorial-board .wf-tile[data-object-puzzle] .zk-care-mark {
  position: absolute;
  top: -7px;
  right: -9px;
  z-index: 8;
  display: grid;
  min-width: 48px;
  height: 22px;
  padding: 0 7px;
  place-items: center;
  border: 1px solid #11110f;
  border-radius: 0;
  background: #fef019;
  color: #11110f;
  font-family: "Pretendard Variable", Pretendard, Arial, sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) rotate(4deg);
  transition: opacity 140ms ease, transform 140ms ease;
}

.zungk-editorial-board .wf-tile[data-object-puzzle]:hover .zk-care-mark,
.zungk-editorial-board .wf-tile[data-object-puzzle]:focus-visible .zk-care-mark,
.zungk-editorial-board .wf-tile[data-care-state="saved"] .zk-care-mark {
  opacity: 1;
  transform: translateY(0) rotate(4deg);
}

.zungk-editorial-board .wf-tile[data-care-state="saved"] .zk-care-mark {
  background: #11110f;
  color: #fef019;
  transform: rotate(-3deg);
}

.zungk-editorial-board.is-care-open .wf-editorial-cursor,
.zungk-editorial-board.is-care-open .wf-tile-label {
  display: none !important;
}

body.zungk-care-open {
  overflow: hidden;
}

/* Keep the site-wide alien pointer above the puzzle modal. The modal is
   appended after the cursor and otherwise wins when both use z-index 50000. */
html.has-space-cursor body.zungk-care-open .space-cursor {
  z-index: 60001;
}

html.has-space-cursor body.zungk-care-open .space-cursor-trails {
  z-index: 60000;
}

.zk-care-layer {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: grid;
  padding: clamp(32px, 5vh, 72px) clamp(32px, 5vw, 80px);
  place-items: center;
  background: rgba(17, 17, 15, 0.58);
  -webkit-backdrop-filter: blur(7px) saturate(0.78);
  backdrop-filter: blur(7px) saturate(0.78);
}

.zk-care-layer[hidden] {
  display: none;
}

.zk-care-backdrop {
  position: absolute;
  inset: 0;
}

.zk-care-workshop {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1120px, 90vw);
  height: min(760px, 86dvh);
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 74px minmax(0, 1fr);
  overflow: hidden;
  border: 2px solid #11110f;
  background: #fff;
  box-shadow: 16px 18px 0 rgba(17, 17, 15, 0.3);
  color: #11110f;
  font-family: "Pretendard Variable", Pretendard, Arial, sans-serif;
  cursor: default;
  animation: zk-care-modal-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.zk-care-workshop[hidden] {
  display: none;
}

.zk-care-workshop button {
  font: inherit;
  letter-spacing: 0;
}

.zk-care-workshop:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: 0;
  box-shadow: none;
}

@keyframes zk-care-modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.zk-care-toolbar {
  position: relative;
  z-index: 20;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid #11110f;
  background: #fef019;
}

.zk-care-toolbar-actions {
  display: flex;
  height: 73px;
  align-items: stretch;
  justify-self: end;
  border-left: 1px solid #11110f;
}

.zk-care-overall-progress {
  display: grid;
  min-width: 78px;
  height: 73px;
  padding: 0 14px;
  place-items: center;
  color: #11110f;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.zk-care-tool-button {
  display: grid;
  width: 54px;
  height: 73px;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid #11110f;
  border-radius: 0;
  background: transparent;
  color: #11110f;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.zk-care-tool-button:hover,
.zk-care-tool-button:focus-visible {
  background: #11110f;
  color: #fef019;
  outline: 0;
}

.zk-care-tool-button:disabled {
  color: rgba(17, 17, 15, 0.28);
  cursor: default;
}

.zk-care-tool-button:disabled:hover {
  background: transparent;
  color: rgba(17, 17, 15, 0.28);
}

.zk-care-body {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.zk-care-live {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.zk-object-game {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  background: #fff;
}

.zk-object-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.zk-object-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #fff;
  outline: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.zk-object-canvas:active {
  cursor: grabbing;
}

.zk-object-canvas:focus-visible {
  box-shadow: inset 0 0 0 3px #ed4938;
}

.zk-object-complete {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.95fr);
  background: #edf0ea;
}

.zk-object-complete-visual {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border-right: 1px solid #11110f;
  background: #fff;
}

.zk-object-complete-visual img {
  display: block;
  width: min(66%, 560px);
  height: min(66%, 520px);
  object-fit: contain;
  filter: drop-shadow(8px 10px 0 rgba(17, 17, 15, 0.14));
}

.zk-object-complete-visual > span {
  position: absolute;
  right: 11%;
  bottom: 12%;
  display: grid;
  min-width: 132px;
  height: 48px;
  padding: 0 16px;
  place-items: center;
  border: 3px solid #e94335;
  color: #e94335;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-7deg);
}

.zk-object-complete-copy {
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: clamp(34px, 5vw, 72px);
  flex-direction: column;
  justify-content: center;
  background: #f7f7f2;
}

.zk-object-complete-copy p,
.zk-object-complete-copy h3,
.zk-object-complete-copy strong {
  margin: 0;
}

.zk-object-complete-copy p {
  color: #e94335;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.zk-object-complete-copy h3 {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 76px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: visible;
}

.zk-object-complete-copy strong {
  max-width: 340px;
  margin-top: 30px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.zk-object-complete-actions {
  display: flex;
  margin-top: 38px;
  gap: 8px;
}

.zk-object-complete-actions button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #11110f;
  border-radius: 0;
  background: transparent;
  color: #11110f;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.zk-object-complete-actions button:last-child {
  background: #11110f;
  color: #fef019;
}

.zk-object-complete-actions button:hover,
.zk-object-complete-actions button:focus-visible {
  background: #e94335;
  color: #fff;
  outline: 0;
}

@media (max-width: 960px) {
  .zk-object-game {
    grid-template-columns: minmax(0, 1fr);
  }

  .zk-object-complete-copy {
    padding: 36px;
  }
}

@media (max-width: 680px) {
  .zungk-editorial-board .wf-tile[data-object-puzzle] .zk-care-mark {
    top: -5px;
    right: -6px;
    min-width: 42px;
    height: 19px;
    padding: 0 5px;
    font-size: 7px;
  }

  .zk-care-layer {
    padding: 0;
    place-items: end stretch;
    background: rgba(17, 17, 15, 0.5);
  }

  .zk-care-workshop {
    width: 100dvw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    grid-template-rows: calc(56px + env(safe-area-inset-top)) minmax(0, 1fr);
    border: 0;
    box-shadow: none;
    animation-name: zk-care-sheet-in;
  }

  .zk-care-toolbar {
    padding-top: env(safe-area-inset-top);
  }

  .zk-care-toolbar-actions,
  .zk-care-overall-progress,
  .zk-care-tool-button {
    height: 55px;
  }

  .zk-care-overall-progress {
    min-width: 48px;
    padding: 0 7px;
    font-size: 7px;
  }

  .zk-care-tool-button {
    width: 42px;
    min-width: 44px;
    font-size: 18px;
  }

  .zk-care-tool-button[data-care-fullscreen] {
    display: none;
  }

  .zk-object-game {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .zk-object-complete {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1.08fr) minmax(240px, 0.92fr);
    overflow-y: auto;
  }

  .zk-object-complete-visual {
    min-height: 270px;
    border-right: 0;
    border-bottom: 1px solid #11110f;
    background-size: 22px 22px;
  }

  .zk-object-complete-visual img {
    width: 62%;
    height: 62%;
  }

  .zk-object-complete-visual > span {
    right: 9%;
    bottom: 10%;
    min-width: 96px;
    height: 36px;
    padding: 0 10px;
    border-width: 2px;
    font-size: 14px;
  }

  .zk-object-complete-copy {
    min-height: 250px;
    padding: 26px 20px calc(30px + env(safe-area-inset-bottom));
  }

  .zk-object-complete-copy h3 {
    margin-top: 8px;
    font-size: clamp(22px, 8vw, 34px);
    letter-spacing: -0.04em;
  }

  .zk-object-complete-copy strong {
    margin-top: 16px;
    font-size: 12px;
  }

  .zk-object-complete-actions {
    margin-top: 22px;
  }

  .zk-object-complete-actions button {
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    flex: 1;
    font-size: 8px;
  }
}

@keyframes zk-care-sheet-in {
  from {
    opacity: 0.92;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zk-care-workshop {
    animation: none;
  }

  .zungk-editorial-board .wf-tile[data-object-puzzle] .zk-care-mark {
    transition: none;
  }
}
