.case3-mission-screen,
.case3-creator-screen,
.case3-chat-screen {
  --case3-ink: #17191f;
  --case3-panel: #f6f5f2;
  --case3-blue: #6657ff;
  --case3-mint: #c9f45b;
  background: #ececea;
}

.case3-chat-screen {
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgb(102 87 255 / 16%), transparent 34%),
    radial-gradient(circle at 88% 82%, rgb(201 244 91 / 18%), transparent 32%),
    #ececea;
}

.case3-chat-container {
  width: min(1040px, calc(100% - 48px));
}

.case3-chat-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: min(650px, calc(100svh - 180px));
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgb(23 25 31 / 12%);
  border-radius: 28px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 28px 75px rgb(28 30 40 / 18%);
  backdrop-filter: blur(18px);
}

.case3-chat-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgb(23 25 31 / 9%);
  padding: 11px 20px;
  background: rgb(248 248 246 / 90%);
}

.case3-chat-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.case3-chat-contact img,
.case3-chat-message > img,
.case3-chat-typing > img {
  border-radius: 50%;
  object-fit: cover;
}

.case3-chat-contact img {
  width: 46px;
  height: 46px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--case3-mint);
}

.case3-chat-contact div {
  display: grid;
  gap: 3px;
}

.case3-chat-contact strong { font-size: 17px; }
.case3-chat-contact span { color: #74767b; font-size: 12px; }

.case3-chat-order {
  border-radius: 999px;
  background: var(--case3-blue);
  padding: 9px 13px 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.case3-chat-feed {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 14px clamp(20px, 5vw, 62px);
  scroll-behavior: smooth;
}

.case3-chat-date {
  align-self: center;
  margin-bottom: 4px;
  border-radius: 999px;
  background: #eceeed;
  padding: 6px 10px;
  color: #777a7d;
  font-size: 10px;
  font-weight: 700;
}

.case3-chat-message,
.case3-chat-typing {
  display: flex;
  max-width: 74%;
  align-items: flex-end;
  gap: 9px;
}

.case3-chat-message[hidden],
.case3-chat-typing[hidden] { display: none; }

.case3-chat-message > img,
.case3-chat-typing > img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.case3-chat-message > div {
  border-radius: 18px 18px 18px 5px;
  background: #edf0ef;
  padding: 11px 14px 12px;
  color: #202227;
}

.case3-chat-message small {
  display: block;
  margin-bottom: 3px;
  color: #6657ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.case3-chat-message p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.case3-chat-message.is-me {
  align-self: flex-end;
  justify-content: flex-end;
}

.case3-chat-message.is-me > div {
  border-radius: 18px 18px 5px;
  background: var(--case3-blue);
  color: #fff;
}

.case3-chat-message.is-me small { color: var(--case3-mint); }

.case3-chat-message.is-visible {
  animation: case3-chat-message-in .24s ease-out both;
}

.case3-chat-typing > div {
  display: flex;
  gap: 5px;
  border-radius: 18px 18px 18px 5px;
  background: #edf0ef;
  padding: 15px 17px;
}

.case3-chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #777b80;
  animation: case3-chat-typing 1s ease-in-out infinite;
}

.case3-chat-typing i:nth-child(2) { animation-delay: .14s; }
.case3-chat-typing i:nth-child(3) { animation-delay: .28s; }

.case3-chat-actions {
  min-height: 84px;
  border-top: 1px solid rgb(23 25 31 / 9%);
  padding: 11px clamp(20px, 5vw, 62px) 13px;
  background: #f8f8f6;
}

.case3-chat-actions:empty { min-height: 26px; padding-block: 12px; }

.case3-chat-actions > span {
  display: block;
  margin-bottom: 9px;
  color: #65686c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.case3-chat-actions > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.case3-chat-actions.is-single-choice > div {
  grid-template-columns: 1fr;
}

.case3-chat-actions > div > button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgb(102 87 255 / 25%);
  border-radius: 14px;
  background: #fff;
  padding: 11px 14px;
  color: #24252a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.case3-chat-actions > div > button:hover,
.case3-chat-actions > div > button:focus-visible {
  border-color: var(--case3-blue);
  background: #f1efff;
  transform: translateY(-1px);
}

.case3-chat-actions > div > button b { color: var(--case3-blue); font-size: 18px; }
.case3-chat-actions > .btn { min-width: 230px; }

@keyframes case3-chat-message-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes case3-chat-typing {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.case3-mission-screen {
  display: grid;
  align-items: center;
  overflow: visible;
}

.case3-mission-layout {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  align-items: center;
  gap: clamp(30px, 5vw, 78px);
}

.case3-mission-copy {
  position: relative;
  z-index: 2;
}

.case3-label {
  display: inline-flex;
  border-radius: 999px;
  background: var(--case3-blue);
  padding: 8px 14px 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
}

.case3-mission-copy h1 {
  max-width: 9.4ch;
  margin-top: 22px;
  font-size: clamp(54px, 6vw, 82px);
  line-height: .91;
}

.case3-mission-copy p {
  max-width: 510px;
  margin-top: 22px;
  color: #55575c;
  font-size: 18px;
  line-height: 1.45;
}

.case3-client-brief {
  max-width: 540px;
  margin-top: 18px;
}

.case3-client-brief p {
  margin-top: 4px;
  color: #26282d;
  font-size: 13px;
  line-height: 1.36;
}

.case3-mission-copy .btn {
  margin-top: 30px;
}

.case3-mission-visual {
  position: relative;
  min-width: 0;
}

.case3-mission-character {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: visible;
  border-radius: 34px;
  background:
    radial-gradient(circle at 52% 43%, rgb(255 255 255 / 92%) 0 24%, transparent 58%),
    linear-gradient(145deg, #b9d6ff, #c8f4dc 56%, #f1eeff);
  box-shadow: 0 30px 70px rgb(30 35 45 / 16%);
}

.case3-mission-character::before,
.case3-mission-character::after {
  position: absolute;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  content: "";
}

.case3-mission-character::before { inset: 9% 8% 8%; }
.case3-mission-character::after { inset: 19% 18% 18%; }

.case3-mission-character__canvas {
  position: absolute;
  z-index: 2;
  inset: 2%;
  aspect-ratio: 1 / 1;
  max-width: none;
}

.case3-mission-character__canvas > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.case3-mission-character__cat {
  filter: drop-shadow(0 28px 25px rgb(32 38 45 / 22%));
}

.case3-mission-character__prototype {
  pointer-events: none;
}

.case3-mission-character__tag {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 24px;
  border: 1px solid rgb(23 25 31 / 15%);
  border-radius: 999px;
  background: rgb(255 255 255 / 67%);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  backdrop-filter: blur(10px);
}

.case3-mission-character__badge {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 22px;
  display: grid;
  gap: 4px;
  min-width: 230px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 16px;
  background: rgb(23 25 31 / 86%);
  padding: 15px 18px;
  color: #fff;
  backdrop-filter: blur(12px);
}

.case3-mission-character__badge small {
  color: var(--case3-mint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
}

.case3-mission-character__badge strong { font-size: 14px; }

.case3-creator-screen {
  padding-bottom: 22px;
  overflow: visible;
}

.case3-creator-container { width: min(1360px, calc(100% - 32px)); }

.cat-creator-shell {
  overflow: hidden;
  min-height: 0;
  border: 1px solid rgb(19 22 29 / 12%);
  border-radius: 26px;
  background: #dbe9f2;
  box-shadow: 0 24px 60px rgb(27 32 40 / 16%);
}

.cat-creator-shell__topbar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgb(255 255 255 / 30%);
  background: rgb(238 247 248 / 76%);
  padding: 0 16px;
  color: #33434b;
  font-size: 9px;
  letter-spacing: .1em;
  backdrop-filter: blur(14px);
}

.cat-creator-shell__topbar span { display: inline-flex; align-items: center; gap: 8px; }
.cat-creator-shell__topbar i { width: 7px; height: 7px; border-radius: 50%; background: #78d58f; box-shadow: 0 0 0 4px rgb(120 213 143 / 18%); }
.cat-creator-shell__topbar strong { font-size: 9px; }

.cat-creator-shell__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 354px;
  height: calc(100svh - 202px);
  min-height: 560px;
}

.cat-creator-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(130deg, rgb(66 147 227 / 21%), transparent 48%),
    radial-gradient(circle at 58% 33%, rgb(222 255 239 / 92%) 0 12%, rgb(192 233 235 / 68%) 36%, transparent 62%),
    linear-gradient(140deg, #9fc6e6, #b7e5db 62%, #87d5bc);
}

.cat-creator-stage::before {
  position: absolute;
  inset: 6% 10% 12%;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgb(255 255 255 / 5%), 0 0 0 140px rgb(255 255 255 / 3%);
  content: "";
}

.cat-creator-stage__tools {
  position: absolute;
  z-index: 5;
  left: 18px;
  top: 50%;
  display: grid;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 44%);
  border-radius: 999px;
  background: rgb(247 253 252 / 54%);
  color: #49606a;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.cat-creator-stage__tools span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  font-size: 17px;
}

.cat-creator-stage__tools i { width: 18px; height: 1px; margin: auto; background: rgb(73 96 106 / 25%); }

.cat-preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cat-preview__aura {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 54%) 0 18%, transparent 66%);
  transform: translate(-50%, -50%);
}

.cat-preview__model {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  width: min(88%, 760px);
  aspect-ratio: 1;
  transform: translateX(-50%) translate(var(--camera-x, 0%), var(--camera-y, 0%)) scale(var(--camera-scale, 1));
  transform-origin: 50% 50%;
  transition: transform 240ms ease;
}

.cat-preview__actor {
  position: absolute;
  inset: 0;
  transform-origin: 50% 64%;
  animation: cat-idle-breathe 5.8s ease-in-out infinite;
}

.cat-preview__character {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 30px rgb(44 58 65 / 22%));
}

.cat-preview__calibration-guides { display: none; }

body.is-helmet-fit-calibration.is-helmet-fit-guides .cat-preview__model {
  outline: 2px solid rgb(72 205 255 / 90%);
  outline-offset: -2px;
}

body.is-helmet-fit-calibration.is-helmet-fit-guides .cat-compositor {
  outline: 2px dashed rgb(255 92 103 / 95%);
  outline-offset: -2px;
}

body.is-helmet-fit-calibration.is-helmet-fit-guides .cat-preview__calibration-guides {
  position: absolute;
  z-index: 8;
  display: block;
  inset: 0;
  pointer-events: none;
}

body.is-helmet-fit-calibration .cat-preview__actor { animation: none; }

body.is-helmet-fit-calibration.is-helmet-fit-guides .cat-preview__calibration-guides i {
  position: absolute;
  display: block;
  background: rgb(72 205 255 / 92%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 50%);
}

body.is-helmet-fit-calibration.is-helmet-fit-guides .cat-preview__calibration-guides .is-center-axis {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

body.is-helmet-fit-calibration.is-helmet-fit-guides .cat-preview__calibration-guides .is-eye-line {
  top: 47%;
  right: 0;
  left: 0;
  height: 1px;
}

body.is-helmet-fit-calibration.is-helmet-fit-guides .cat-preview__calibration-guides .is-head-line {
  top: 34%;
  right: 0;
  left: 0;
  height: 1px;
  background: #cdff7a;
}

.cat-preview .cat-compositor__layer {
  filter: drop-shadow(0 18px 14px rgb(25 29 35 / 27%));
}

.cat-preview[data-material="pla"] { --material-sheen: .035; }
.cat-preview[data-material="petg"] { --material-sheen: .24; }
.cat-preview[data-material="tpu"] { --material-sheen: 0; }

.cat-preview__floor {
  position: absolute;
  z-index: 1;
  left: 19%;
  right: 15%;
  bottom: 3%;
  height: 8%;
  border-radius: 50%;
  background: rgb(48 69 77 / 24%);
  filter: blur(22px);
}

.cat-preview__status {
  position: absolute;
  z-index: 4;
  left: 20px;
  bottom: 18px;
  display: grid;
  gap: 3px;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 12px;
  background: rgb(244 251 250 / 58%);
  padding: 10px 12px;
  color: #31454e;
  backdrop-filter: blur(10px);
}

.cat-preview__status span { color: #5f777f; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.cat-preview__status strong { font-size: 11px; }

.cat-preview__auto-fit {
  position: absolute;
  z-index: 4;
  right: 20px;
  bottom: 18px;
  display: grid;
  gap: 3px;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 12px;
  background: rgb(244 251 250 / 74%);
  padding: 10px 12px;
  color: #31454e;
  text-align: right;
  backdrop-filter: blur(10px);
}

.cat-preview__auto-fit strong { color: #354b43; font-size: 10px; }
.cat-preview__auto-fit span { color: #647a72; font-size: 9px; }

.creator-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  border-left: 1px solid rgb(20 23 31 / 10%);
  background: rgb(248 248 245 / 94%);
  color: var(--case3-ink);
  box-shadow: -22px 0 50px rgb(44 58 64 / 12%);
  backdrop-filter: blur(16px);
}

@media (min-width: 721px) {
  .creator-panel {
    min-height: 0;
    overflow: hidden;
  }
}

.creator-panel__head {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #deded9;
  padding: 13px 16px;
}

.creator-panel__head > div { display: grid; gap: 3px; }
.creator-panel__head span { color: #8a8b89; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.creator-panel__head strong { font-size: 16px; }
.creator-panel__head > i { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--case3-blue); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; }

.creator-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #deded9;
}

.creator-tab {
  position: relative;
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  border: 0;
  border-right: 1px solid #e5e5e0;
  background: transparent;
  padding: 11px 4px 10px;
  color: #7c7e7d;
  cursor: pointer;
}

.creator-tab:last-child { border-right: 0; }
.creator-tab::after { position: absolute; inset: auto 7px -1px; height: 3px; border-radius: 999px 999px 0 0; background: var(--case3-blue); content: ""; opacity: 0; }
.creator-tab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.creator-tab:nth-child(3) svg { fill: currentColor; stroke: none; }
.creator-tab span { overflow: hidden; max-width: 100%; font-size: 9px; font-weight: 600; text-overflow: ellipsis; }
.creator-tab.is-selected { background: #fff; color: var(--case3-blue); }
.creator-tab.is-selected::after { opacity: 1; }

.creator-panel__body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 16px;
}

.creator-helmet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.creator-helmet {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 7px;
  border: 1px solid #deded9;
  border-radius: 14px;
  background: #fff;
  padding: 7px;
  color: var(--case3-ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.creator-helmet:hover { transform: translateY(-1px); }
.creator-helmet.is-selected { border-color: var(--case3-blue); background: #f8f7ff; box-shadow: 0 0 0 2px rgb(102 87 255 / 18%); transform: translateY(-1px); }

.creator-helmet__visual {
  position: relative;
  display: grid;
  min-height: 122px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(45deg, rgb(80 89 96 / 4%) 25%, transparent 25% 75%, rgb(80 89 96 / 4%) 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, rgb(80 89 96 / 4%) 25%, #e8f2f3 25% 75%, rgb(80 89 96 / 4%) 75%) 8px 8px / 16px 16px;
}

.creator-helmet__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: var(--helmet-filter, none) drop-shadow(0 8px 8px rgb(35 42 47 / 18%));
}

.creator-helmet strong {
  overflow: hidden;
  padding: 0 3px 2px;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-library-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #898b89;
  font-size: 9px;
}

.creator-library-status strong {
  border-radius: 999px;
  background: #e6e2ff;
  padding: 5px 8px;
  color: var(--case3-blue);
  font-size: 8px;
  letter-spacing: .04em;
}

.creator-colors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.creator-color {
  position: relative;
  display: grid;
  aspect-ratio: 1.25;
  place-items: center;
  border: 1px solid #deded9;
  border-radius: 14px;
  background: #fff;
  padding: 7px;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.creator-color i { display: block; width: 100%; height: 100%; border: 1px solid rgb(28 31 39 / 13%); border-radius: 9px; background: var(--swatch); box-shadow: inset 0 8px 12px rgb(255 255 255 / 20%); }
.creator-color.is-default i {
  background:
    linear-gradient(45deg, #e8e8e8 25%, transparent 25% 75%, #e8e8e8 75%) 0 0 / 14px 14px,
    linear-gradient(45deg, #e8e8e8 25%, #fff 25% 75%, #e8e8e8 75%) 7px 7px / 14px 14px;
  box-shadow: none;
}
.creator-color__label {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  border-radius: 6px;
  background: rgb(255 255 255 / 90%);
  padding: 3px 2px;
  color: #3f4147;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}
.creator-color.is-selected { border-color: var(--case3-blue); box-shadow: 0 0 0 2px rgb(102 87 255 / 18%); transform: scale(1.025); }
.creator-color.is-selected i::after { display: grid; width: 22px; height: 22px; place-items: center; margin: 50% auto 0; border-radius: 50%; background: rgb(255 255 255 / 88%); color: #242730; content: "✓"; font-size: 12px; font-style: normal; transform: translateY(-50%); }
.creator-panel__hint { margin-top: 16px; color: #787a79; font-size: 11px; line-height: 1.4; }

.creator-upcoming {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #cbcfc9;
  border-radius: 16px;
  background: #fff;
  padding: 28px;
  text-align: center;
}

.creator-upcoming > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #e4e0ff; color: var(--case3-blue); font-size: 22px; }
.creator-upcoming strong { font-size: 16px; }
.creator-upcoming p { color: #7a7c7a; font-size: 12px; line-height: 1.45; }

.creator-panel__footer {
  display: grid;
  gap: 10px;
  border-top: 1px solid #deded9;
  padding: 13px 16px 15px;
}

.creator-panel__footer > span { display: flex; align-items: center; gap: 7px; color: #858684; font-size: 9px; }
.creator-panel__footer > span i { width: 7px; height: 7px; border-radius: 50%; background: #7fce8c; }
.creator-finish { display: flex; min-height: 44px; align-items: center; justify-content: space-between; border: 0; border-radius: 12px; background: var(--case3-blue); padding: 0 15px; color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.creator-finish b { font-size: 18px; font-weight: 400; }
.creator-finish:disabled { opacity: .42; cursor: default; }

.cat-preview--fit .cat-compositor {
  pointer-events: none;
}
.cat-preview--fit .cat-preview__status,
.cat-preview--material .cat-preview__status { bottom: 20px; }

.creator-fit-panel,
.creator-material-panel { grid-template-rows: auto 1fr auto; }

.creator-fit-panel__body,
.creator-material-panel__body {
  display: grid;
  min-height: 0;
  align-content: center;
  gap: 18px;
  padding: 22px 18px;
}

.creator-fit-status {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  border: 1px solid #deded9;
  border-radius: 15px;
  background: #fff;
  padding: 10px 13px;
}

.creator-fit-status i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: #e6e2ff;
  color: var(--case3-blue);
  font-style: normal;
}

.creator-fit-status strong { font-size: 14px; }
.creator-fit-status.is-ready { border-color: #9bd7a4; background: #f5fff6; }
.creator-fit-status.is-ready i { background: #7fce8c; color: #fff; }

.creator-fit-drag-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #676a69;
  font-size: 12px;
}

.creator-fit-drag-note span { color: var(--case3-blue); font-size: 20px; }

.creator-fit-scale {
  display: grid;
  gap: 11px;
  border-radius: 15px;
  background: #e9e9e5;
  padding: 15px;
}

.creator-fit-scale > span { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.creator-fit-scale strong { font-size: 12px; }
.creator-fit-scale small { color: #777a78; font-size: 13px; }
.creator-fit-scale input { width: 100%; height: 38px; margin-block: -8px; accent-color: var(--case3-blue); cursor: ew-resize; touch-action: pan-x; }

.creator-fit-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.creator-fit-checks span {
  border: 1px solid #dfe0dc;
  border-radius: 999px;
  background: #fff;
  padding: 8px 9px;
  color: #777a78;
  font-size: 9px;
  text-align: center;
}

.creator-fit-panel__footer { grid-template-columns: auto 1fr; align-items: center; }
.creator-back { min-height: 42px; border: 0; background: transparent; color: #656866; font: inherit; font-size: 11px; cursor: pointer; }

.creator-materials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.creator-material { display: grid; min-height: 104px; place-items: center; gap: 6px; border: 1px solid #deded9; border-radius: 14px; background: #fff; padding: 10px 7px; color: #272a2f; cursor: pointer; transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease; }
.creator-material i { display: block; width: 34px; height: 18px; border-radius: 999px; background: linear-gradient(135deg, #ececec, #fff 45%, #bbb); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 8%); }
.creator-material:nth-child(2) i { background: linear-gradient(135deg, #d8e8ec, #fff 42%, #91b0b9); }
.creator-material:nth-child(3) i { background: linear-gradient(135deg, #d9d5e0, #f8f6fb 42%, #9a91a5); }
.creator-material strong { font-size: 11px; }
.creator-material small { max-width: 13ch; color: #747876; font-size: 8px; line-height: 1.25; text-align: center; }
.creator-material.is-selected { border-color: var(--case3-blue); background: #f8f7ff; box-shadow: 0 0 0 2px rgb(102 87 255 / 18%); transform: translateY(-1px); }

.creator-fit-summary { margin: 0; color: #626866; font-size: 11px; line-height: 1.45; text-align: center; }

.creator-material-summary {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  background: #e9eeee;
  padding: 12px;
}

.creator-material-summary img { width: 112px; height: 96px; object-fit: contain; filter: var(--helmet-filter, none) drop-shadow(0 7px 7px rgb(35 42 47 / 18%)); }
.creator-material-summary div { display: grid; gap: 4px; }
.creator-material-summary span { color: #7d817f; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.creator-material-summary strong { font-size: 14px; }
.creator-material-summary small { color: #676a69; font-size: 11px; }

@keyframes helmet-change {
  from { opacity: .25; transform: translateX(-50%) translateY(-9px) scale(var(--helmet-scale, 1)) rotate(var(--helmet-rotation, 0deg)); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(var(--helmet-scale, 1)) rotate(var(--helmet-rotation, 0deg)); }
}

@media (max-width: 1100px) {
  .case3-mission-layout {
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    gap: clamp(20px, 3vw, 34px);
  }

  .case3-mission-copy h1 {
    font-size: clamp(44px, 5vw, 64px);
  }
}

@media (max-width: 900px) {
  .cat-creator-shell__workspace { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 767px) {
  .case3-chat-screen {
    align-items: start;
    overflow: visible;
  }

  .case3-chat-container {
    width: auto;
    margin-inline: 16px;
  }

  .case3-chat-window {
    grid-template-rows: auto minmax(300px, 1fr) auto;
    height: auto;
    min-height: calc(100svh - 122px);
    border-radius: 20px;
    backdrop-filter: none;
  }

  .case3-chat-header {
    min-height: 68px;
    padding: 12px 14px;
  }

  .case3-chat-contact { gap: 10px; }
  .case3-chat-contact img { width: 42px; height: 42px; }
  .case3-chat-contact strong { font-size: 15px; }
  .case3-chat-order { max-width: 118px; padding: 7px 9px 6px; font-size: 8px; line-height: 1.25; text-align: center; }
  .case3-chat-feed { padding: 16px 12px; }
  .case3-chat-message,
  .case3-chat-typing { max-width: 92%; }
  .case3-chat-message > img,
  .case3-chat-typing > img { width: 32px; height: 32px; }
  .case3-chat-message > div { padding: 10px 12px; }
  .case3-chat-message p { font-size: 13px; }
  .case3-chat-actions { min-height: 0; padding: 12px; }
  .case3-chat-actions > div { grid-template-columns: 1fr; gap: 8px; }
  .case3-chat-actions > div > button { min-height: 48px; font-size: 12px; }
  .case3-chat-actions > .btn { width: 100%; min-width: 0; }

  .case3-mission-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 24px;
  }

  .case3-mission-copy h1 {
    max-width: 10ch;
    margin-top: 16px;
    font-size: clamp(40px, 12vw, 52px);
  }

  .case3-mission-copy p {
    margin-top: 14px;
    font-size: 16px;
  }

  .case3-client-brief {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    margin-top: 14px;
    padding: 10px 11px;
  }

  .case3-client-brief > img {
    width: 38px;
    height: 38px;
  }

  .case3-client-brief p {
    margin-top: 4px;
    font-size: 12px;
  }

  .case3-mission-copy .btn {
    width: 100%;
    margin-top: 20px;
  }

  .case3-mission-character {
    border-radius: clamp(22px, 7vw, 30px);
  }

  .case3-mission-character__tag {
    top: 16px;
    right: 16px;
    left: auto;
  }

  .case3-mission-character__badge {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    padding: 12px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case3-chat-message.is-visible,
  .case3-chat-typing i { animation: none; }
}

@media (max-width: 720px) {
  .case3-creator-screen { padding: 78px 0 calc(12px + env(safe-area-inset-bottom)); overflow: visible; }
  .case3-creator-container { width: calc(100% - 32px); }
  .cat-creator-shell { height: calc(100svh - 128px); min-height: 0; border-radius: 20px; }
  .cat-creator-shell__topbar { min-height: 36px; padding-inline: 12px; }
  .cat-creator-shell__workspace { display: flex; height: calc(100% - 36px); min-height: 0; flex-direction: column; }
  .cat-creator-stage { min-height: 220px; flex: 1 1 45%; }
  .cat-creator-stage__tools { display: none; }
  .cat-preview__model {
    top: -10px;
    width: min(100%, 500px);
    transform: translateX(-50%) translate(var(--mobile-camera-x, 0%), var(--mobile-camera-y, 0%)) scale(var(--mobile-camera-scale, 1));
  }
  .cat-preview__status { display: none; }
  .cat-preview__auto-fit { right: 10px; bottom: 10px; left: 10px; padding: 8px 10px; text-align: left; }
  .creator-panel { min-height: 0; overflow: hidden; flex: 1 1 55%; border-top: 1px solid rgb(20 23 31 / 10%); border-left: 0; box-shadow: 0 -18px 40px rgb(44 58 64 / 10%); }
  .creator-panel__head { display: none; }
  .creator-tabs { position: relative; z-index: 2; background: rgb(248 248 245 / 97%); }
  .creator-tab { padding-block: 9px 8px; }
  .creator-tab svg { width: 18px; height: 18px; }
  .creator-panel__body {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .creator-helmet-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .creator-helmet { padding: 5px; }
  .creator-helmet__visual { min-height: 84px; }
  .creator-helmet__visual img { max-height: 80px; }
  .creator-library-status { margin-top: 8px; }
  .creator-colors { grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 2px; }
  .creator-color { min-width: 44px; min-height: 44px; aspect-ratio: 1; border-radius: 10px; padding: 4px; }
  .creator-color i { border-radius: 7px; }
  .creator-color.is-selected i::after { width: 18px; height: 18px; margin-top: 50%; font-size: 10px; }
  .creator-panel__hint { margin-top: 10px; }
  .creator-upcoming { min-height: 120px; padding: 14px; }
  .creator-upcoming > span { width: 34px; height: 34px; font-size: 16px; }
  .creator-panel__footer {
    position: relative;
    z-index: 3;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    border: 0;
    border-top: 1px solid rgb(20 23 31 / 10%);
    border-radius: 0;
    background: rgb(248 248 245 / 96%);
    padding: 9px;
  }
  .creator-panel__footer > span { display: none; }
  .creator-finish { width: 100%; min-width: 0; min-height: 48px; }

  .cat-creator-shell.is-shape-category .cat-creator-stage {
    min-height: 0;
    flex: 1 1 66%;
  }

  .cat-creator-shell.is-shape-category .creator-panel {
    flex: 0 0 34%;
  }

  .cat-creator-shell.is-shape-category .cat-preview__auto-fit {
    right: auto;
    bottom: 8px;
    left: 8px;
    width: min(156px, calc(100% - 16px));
    gap: 1px;
    border-radius: 10px;
    padding: 5px 7px;
  }

  .cat-creator-shell.is-shape-category .cat-preview__auto-fit strong {
    font-size: 8px;
    line-height: 1.15;
  }

  .cat-creator-shell.is-shape-category .cat-preview__auto-fit span {
    font-size: 7px;
    line-height: 1.2;
  }

  .cat-creator-shell.is-shape-category .creator-panel__body {
    padding: 7px 8px;
  }

  .cat-creator-shell.is-shape-category .creator-helmet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .cat-creator-shell.is-shape-category .creator-helmet {
    gap: 2px;
    border-radius: 9px;
    padding: 3px;
  }

  .cat-creator-shell.is-shape-category .creator-helmet__visual {
    min-height: 48px;
    border-radius: 7px;
  }

  .cat-creator-shell.is-shape-category .creator-helmet__visual img {
    max-height: 47px;
  }

  .cat-creator-shell.is-shape-category .creator-helmet strong {
    padding: 0 1px 1px;
    font-size: 7px;
    line-height: 1.05;
  }

  .cat-creator-shell.is-shape-category .creator-library-status {
    display: none;
  }

  .cat-creator-shell.is-shape-category .creator-panel__footer {
    padding: 6px 8px;
  }

  .cat-creator-shell.is-shape-category .creator-finish {
    min-height: 42px;
  }
  .creator-back { min-height: 44px; }
  .case3-fit-screen .cat-creator-stage,
  .case3-material-screen .cat-creator-stage { flex-basis: 45%; }
  .case3-fit-screen .cat-preview__status { display: none; }
  .creator-fit-panel__body,
  .creator-material-panel__body { gap: 10px; padding: 12px; }
  .creator-fit-status { min-height: 48px; }
  .creator-fit-drag-note { position: absolute; z-index: 5; top: -42px; left: 50%; border-radius: 999px; background: rgb(255 255 255 / 82%); padding: 7px 11px; transform: translateX(-50%); backdrop-filter: blur(8px); }
  .creator-fit-scale { padding: 11px 13px; }
  .creator-fit-scale input { height: 44px; margin-block: -11px; }
  .creator-fit-checks { display: none; }
  .creator-fit-panel__footer { grid-template-columns: auto minmax(0, 1fr); }
  .creator-materials { gap: 7px; }
  .creator-material { min-height: 88px; padding: 8px 5px; }
  .creator-material small { font-size: 7px; }
  .creator-material-summary { grid-template-columns: 80px 1fr; padding: 8px; }
  .creator-material-summary img { width: 80px; height: 66px; }
}

@media (max-width: 420px) and (max-height: 760px) {
  .cat-creator-stage { min-height: 200px; }
  .case3-fit-screen .cat-creator-stage,
  .case3-material-screen .cat-creator-stage { flex-basis: 45%; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-preview__actor,
  .cat-compositor { animation: none; }
}

@keyframes cat-idle-breathe {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  48% { transform: translateY(-1.5px) rotate(-.12deg) scale(1.002); }
  54% { transform: translateY(-1px) rotate(.1deg) scale(1.001); }
}
