#diy-assets > [hidden] { display: none; }
.private-palette-filter { display: flex; gap: 5px; margin-bottom: 8px; }
.private-palette-filter button {
  flex: 1;
  min-height: 29px;
  padding: 3px;
  white-space: nowrap;
  font-size: 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.private-palette-filter [aria-pressed="true"] { color: var(--ink); border-color: var(--primary); }
#diy-assets { max-height: calc(100dvh - 240px); overflow: auto; }
@media (max-width: 900px) and (orientation: portrait) {
  .private-palette-filter button { flex: none; padding: 4px 10px; }
  #diy-frame { bottom: 191px; }
  .diy-editbar { bottom: 181px; }
  #diy-status { bottom: 270px; }
  #diy-assets { max-height: none; }
}
@media (max-height: 540px) and (orientation: landscape) {
  #diy-assets { max-height: calc(100dvh - 142px); }
}

.private-blind-box { position: relative; touch-action: manipulation; }
.private-blind-box img {
  display: block;
  width: 100%;
  height: 56px;
  object-fit: contain;
  grid-area: 1 / 1;
  transform-origin: 50% 94%;
  pointer-events: none;
}
.private-blind-box { display: grid; grid-template-columns: minmax(0, 1fr); }
.private-blind-box > span { grid-row: 2; }
.private-blind-box[data-open="false"] img:nth-child(2),
.private-blind-box[data-open="true"] img:first-child { visibility: hidden; }
.private-box-status {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

@media (min-width: 901px) and (min-height: 541px) {
  #diy-materials.private-box-mode {
    width: clamp(228px, calc((100vw - (100dvh - 138px) * .758) / 2 - 44px), 300px);
  }
}
.private-box-mode #diy-assets {
  --prize-size: 112px;
  --package-size: 116px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 204px;
  overflow: hidden;
  max-height: none;
  isolation: isolate;
  border-radius: 4px;
  background: oklch(.22 .012 65 / .5);
}
.private-box-mode #diy-assets > :is(.private-blind-box, [data-asset]) {
  grid-area: 1 / 1;
  margin: 0;
  background: transparent;
}
.private-box-mode .private-blind-box {
  place-content: center;
  justify-items: center;
  color: var(--ink);
}
.private-box-mode .private-blind-box img {
  width: var(--package-size);
  height: var(--package-size);
}
.private-box-mode .private-blind-box span { font-size: 12px; }
.private-box-mode #diy-assets:not([data-revealed="true"]) .private-blind-box:not(:disabled):hover {
  background: oklch(.30 .015 65 / .55);
}
.private-box-mode #diy-assets[data-revealed="true"] .private-blind-box {
  align-self: end;
  padding: 0;
  min-height: 0;
  pointer-events: none;
}
.private-box-mode #diy-assets[data-revealed="true"] .private-blind-box span { display: none; }
.private-box-mode #diy-assets [data-asset]:not([hidden]) {
  z-index: 1;
  justify-self: center;
  align-self: start;
  min-width: min(100%, 158px);
  padding: 5px 6px 4px;
  gap: 3px;
  color: var(--ink);
  cursor: grab;
}
.private-box-mode #diy-assets [data-asset] canvas {
  width: var(--prize-size);
  height: var(--prize-size);
}
.private-box-mode #diy-assets [data-asset] span { display: none; }
@media (max-width: 900px) and (orientation: portrait) {
  .private-box-mode #diy-assets {
    --prize-size: 96px;
    --package-size: 100px;
    grid-template-rows: 164px;
  }
  #diy:has(.private-box-mode) .diy-editbar { bottom: 264px; }
  #diy:has(.private-box-mode) #diy-status { bottom: 318px; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .private-box-mode #diy-assets {
    --prize-size: 72px;
    --package-size: 76px;
    grid-template-rows: 134px;
  }
}

.private-secret-effect {
  grid-area: 1 / 1;
  position: relative;
  pointer-events: none;
}
#diy-assets > .private-secret-effect[hidden] { display: none; }
.private-secret-glow {
  position: absolute;
  inset: 14% 13% 8%;
  background: radial-gradient(ellipse at 50% 66%, #ffcc64a8, #eea42d32 43%, transparent 70%);
  animation: secret-glow 2.1s ease-out both;
}
.private-secret-copy {
  position: absolute;
  z-index: 2;
  inset: auto 0 5px;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: max-content;
  margin: auto;
  padding: 4px 12px;
  border-radius: 4px;
  background: #21160df0;
  color: #ffe3a7;
  font-size: 13px;
}
.private-secret-copy small { font-size: 9px; letter-spacing: .13em; }
.private-secret-stars i {
  position: absolute;
  left: 50%;
  bottom: 37%;
  color: #ffdf92;
  font: normal 15px system-ui;
  text-shadow: 0 0 7px #ffbe43;
  animation: secret-star 1.5s .12s ease-out both;
}
.private-secret-stars i:nth-child(1) { --x: -68px; --y: -67px; }
.private-secret-stars i:nth-child(2) { --x: 62px; --y: -71px; animation-delay: .28s; }
.private-secret-stars i:nth-child(3) { --x: -49px; --y: -108px; animation-delay: .35s; }
.private-secret-stars i:nth-child(4) { --x: 74px; --y: -34px; animation-delay: .48s; }
.private-secret-stars i:nth-child(5) { --x: 35px; --y: -105px; animation-delay: .6s; }
@keyframes secret-glow {
  0% { opacity: 0; transform: scale(.55); }
  40% { opacity: 1; }
  100% { opacity: .65; transform: scale(1); }
}
@keyframes secret-star {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.4); }
  32% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.7); }
}
@media (prefers-reduced-motion: reduce) {
  .private-secret-glow { animation: none; }
  .private-secret-stars { display: none; }
}
body:has(#motion[aria-pressed="true"]) .private-secret-glow { animation: none; }
body:has(#motion[aria-pressed="true"]) .private-secret-stars { display: none; }

.private-blind-redraw {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.private-blind-redraw:hover { background: oklch(.30 .015 65 / .75); }

.diy-material-heading:has(.private-blind-redraw:not([hidden])) { flex-wrap: wrap; }
.diy-material-heading:has(.private-blind-redraw:not([hidden])) #diy-hint { order: 1; flex-basis: 100%; text-align: left; }
