/* Site shell around the workshop editor: the full-screen kind picker for a new work (pages/new-work.js) and the contest flow as a panel under the editor's header (flow-panel.js). Dark like the editor (workshop.html). */

/* The picker covers the whole window, site header included. */
.kind-picker {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #0f1115;
  color: #e9ecf2;
}
/* Back link, the step label centred, and the close button. */
.kind-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-left, 0px)) 12px 20px;
  border-bottom: 1px solid #262b34;
}
.kind-back {
  justify-self: start;
  color: #a3acbb;
  font-size: 14px;
  text-decoration: none;
}
.kind-back:hover {
  color: #fff;
}
.kind-close {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #2c323d;
  border-radius: 10px;
  color: #c3cad6;
  text-decoration: none;
}
.kind-close:hover {
  background: #1c2028;
}
.kind-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 40px 24px 48px;
  box-sizing: border-box;
  text-align: center;
}
.kind-step {
  margin: 0;
  color: #8e98aa;
  font-size: 12px;
  letter-spacing: 0.16em;
}
.kind-body h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  text-wrap: balance;
}
.kind-lead {
  margin: 0 0 18px;
  color: #a3acbb;
  font-size: 15px;
}
.kind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  width: 100%;
}
.kind-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  border: 1px solid #2c323d;
  border-radius: 18px;
  background: #161920;
  color: #e9ecf2;
  text-align: left;
  text-decoration: none;
  transition:
    border-color 0.18s,
    transform 0.18s;
}
.kind-card:hover,
.kind-card:focus-visible {
  border-color: #6e89ff;
  transform: translateY(-2px);
}
.kind-card:focus-visible {
  outline: 2px solid #86a1ff;
  outline-offset: 3px;
}
.kind-card strong {
  margin-top: 6px;
  font-size: 18px;
}
.kind-note {
  color: #a3acbb;
  font-size: 13px;
  line-height: 1.6;
}
/* Each art box is a size container, so the samples are drawn in cqh and shrink with the box when the desktop grid squeezes it to fit the window. */
.kind-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 200px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #27304a, #12151d);
  container-type: size;
}
.kind-art img {
  height: auto;
  object-fit: cover;
  box-shadow:
    0 14px 30px #0009,
    inset 0 0 0 2px #fff3;
}
.kind-art svg {
  width: min(66cqh, 84cqw);
  height: auto;
}
.kind-art-badge img {
  width: min(74cqh, 84cqw);
  aspect-ratio: 1;
  border-radius: 50%;
}
.kind-art-acrylic img,
.kind-art-liquid img {
  width: min(58cqh, 84cqw);
  aspect-ratio: 116 / 164;
  border: 3px solid #ffffff55;
  border-radius: 16px;
}
.kind-art-magnet img {
  width: min(75cqh, 84cqw);
  aspect-ratio: 150 / 112;
  border-radius: 14px;
  box-shadow:
    0 14px 30px #0009,
    inset 0 0 0 2px #fff6,
    0 0 0 5px #111;
}
.kind-art-passcase {
  background: radial-gradient(circle at 50% 40%, #3a2a20, #12151d);
}
.kind-art-passcase img {
  width: min(54cqh, 84cqw);
  aspect-ratio: 108 / 160;
  border: 7px solid #6b4a32;
  border-radius: 14px;
  outline: 1px dashed #e9dfc9aa;
  outline-offset: -5px;
}
.kind-art-lightbox {
  background: radial-gradient(circle at 50% 45%, #2b3550, #0c0e14);
}
.kind-art-lightbox img {
  width: min(85cqh, 84cqw);
  aspect-ratio: 170 / 82;
  object-fit: cover;
  border: 8px solid #f1f0ec;
  border-radius: 6px;
  filter: brightness(1.15);
  box-shadow:
    0 0 26px #b9d4ff88,
    0 8px 18px #0008;
}
.kind-art-metal {
  background: radial-gradient(circle at 50% 40%, #3b3324, #12151d);
}
.kind-art-metal img {
  width: min(60cqh, 84cqw);
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid #e2b85c;
  border-radius: 38% 62% 45% 55% / 52% 40% 60% 48%;
  box-shadow:
    0 0 0 1px #8a6a2c,
    0 8px 18px #0008;
}
.kind-art-paper img {
  width: min(93cqh, 92cqw);
  aspect-ratio: 186 / 66;
  border-radius: 3px;
  object-position: 50% 30%;
  transform: rotate(-6deg);
}
/* The flakes sit in the lower part of the liquid sample, so they follow its width (--w) and where its bottom edge lands. */
.kind-art-liquid {
  --w: min(58cqh, 84cqw);
  background: radial-gradient(circle at 50% 40%, #2b2740, #12151d);
}
.kind-flakes {
  position: absolute;
  bottom: calc((100cqh - var(--w) * 164 / 116) / 2 + 3px);
  width: var(--w);
  height: calc(var(--w) * 0.45);
  border-radius: 0 0 16px 16px;
  background:
    radial-gradient(circle at 20% 60%, #ffd6f5 0 2px, transparent 3px),
    radial-gradient(circle at 55% 35%, #c9f1ff 0 2px, transparent 3px),
    radial-gradient(circle at 80% 70%, #fff3b5 0 2px, transparent 3px),
    radial-gradient(circle at 38% 80%, #fff 0 1.5px, transparent 2.5px),
    #ffaae655;
}
.kind-art-plush {
  background: radial-gradient(circle at 50% 40%, #2f2a2a, #12151d);
}
.kind-foot {
  margin: 18px 0 0;
  color: #a3acbb;
  font-size: 14px;
}
.kind-foot .kind-materials {
  color: #dfe4ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Desktop: all nine kinds fit in the window without scrolling. Two rows of five, and the cards share one grid (subgrid), so the art row takes whatever height the header and the card text leave (up to 200px) and every card in a row keeps the same art height. Below the body's min-height (a window shorter than about 590px) the picker scrolls instead of squeezing the art further. */
@media (min-width: 900px) {
  .kind-body {
    flex: 1 1 0;
    min-height: 520px;
    justify-content: safe center;
    gap: 10px;
    padding: 16px 24px 18px;
  }
  .kind-body h1 {
    font-size: 30px;
  }
  .kind-lead {
    margin-bottom: 6px;
    font-size: 14px;
  }
  .kind-grid {
    flex: 0 1 auto;
    min-height: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 200px) auto auto);
    gap: 14px;
  }
  .kind-card {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
  }
  .kind-art {
    height: auto;
  }
  .kind-card strong {
    margin-top: 4px;
    font-size: 15px;
    line-height: 1.35;
  }
  .kind-note {
    font-size: 12px;
    line-height: 1.5;
  }
  .kind-foot {
    margin-top: 4px;
    font-size: 13px;
  }
}
@media (max-width: 560px) {
  .kind-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .kind-body h1 {
    font-size: 26px;
  }
}

/* Contest flow: a panel under the editor header's 応募・公開 button, shown only when asked for. */
#workshop-container > .flow-bar {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 30;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  width: min(440px, calc(100vw - 32px));
  padding: 16px 18px;
  border: 1px solid #2c323d;
  border-radius: 14px;
  background: #161920;
  color: #e9ecf2;
  box-shadow: 0 20px 50px #000a;
}
#workshop-container > .flow-bar :is(.flow-where, .flow-note) {
  color: #a3acbb;
}
#workshop-container > .flow-bar .flow-warn {
  color: #f0b45a;
}
#workshop-container > .flow-bar :is(button, a.button):not(.primary, :disabled) {
  border-color: #353b48;
  background: #1f232c;
  color: #e9ecf2;
}
#workshop-container
  > .flow-bar
  :is(button, a.button):not(.primary, :disabled):hover {
  background: #2a2f3a;
}
#workshop-container > .flow-bar:not(.is-open) {
  display: none !important;
}
body:has(.mock-panel) #workshop-container > .flow-bar {
  padding-left: 18px;
}
#workshop-container > .flow-bar .flow-actions {
  justify-content: flex-end;
}
@media (max-width: 760px) {
  #workshop-container > .flow-bar {
    top: 104px;
  }
}
