/* Shared mission components: authoring, phone preview and mobile runtime. */
.ma-author {
  --ma-accent: #20665d;
  color: #223e37
}

.ma-author h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 27px 0 14px
}

.ma-author h4 {
  margin: 22px 0 10px
}

.ma-number {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 25px;
  height: 25px;
  border-radius: 9px;
  background: #e3f0e8;
  color: #20665d;
  font-size: 12px;
  font-weight: 800
}

.ma-note {
  font-size: 13px;
  line-height: 1.7;
  color: #64716b
}

.ma-author label {
  font-size: 12px;
  line-height: 1.6;
  font-weight: 600;
  min-width: 0;
  display: block;
  margin: 10px 0
}

.ma-author input:not([type=radio]):not([type=file]),
.ma-author textarea,
.ma-author select {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  background: #fff;
  border: 1px solid #cdd8d0;
  border-radius: 10px;
  padding: 10px;
  color: #233b32;
  font: inherit;
  font-size: 14px;
  margin-top: 5px
}

.ma-author textarea {
  min-height: 90px;
  resize: vertical
}

.ma-author button {
  min-height: 40px;
  border: 1px solid #d2ddd5;
  background: #fff;
  color: #284b3c;
  border-radius: 9px;
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer
}

.ma-author button.dark {
  background: #17483d;
  color: white;
  font-size: 14px;
  margin-top: 16px
}

.ma-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dfe7e0;
  background: #f8faf7;
  border-radius: 12px;
  padding: 4px 9px;
  margin: 8px 0
}

.ma-row>label {
  flex: 1
}

.ma-row>input[type=radio] {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: #21695b
}

.ma-row-actions {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 3px
}

.ma-row-actions button {
  padding: 5px;
  width: 28px;
  min-height: 35px
}

.ma-author button:disabled {
  opacity: .35;
  cursor: default
}

.ma-pair-row,
.ma-sort-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr) 30px;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid #e4e9e4
}

.ma-sort-row {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) 30px
}

.ma-pair-row>button,
.ma-sort-row>button,
.ma-hotspot-row>button {
  padding: 4px
}

.ma-upload-block {
  border: 1px dashed #becdc4;
  background: #f6f9f6;
  border-radius: 12px;
  padding: 12px;
  margin: 15px 0
}

.ma-upload-block>b {
  font-size: 13px
}

.ma-image {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  display: block;
  margin: 12px 0;
  border-radius: 8px;
  background: #e6ece7
}

.ma-upload {
  background: #fff;
  border: 1px solid #cbd8cf;
  padding: 12px!important;
  border-radius: 8px;
  text-align: center;
  cursor: pointer
}

.ma-upload input {
  display: block;
  max-width: 100%;
  font-size: 11px;
  margin-top: 8px
}

.ma-option-image {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain
}

.ma-hotspot {
  position: relative;
  cursor: crosshair;
  line-height: 0
}

.ma-hotspot img {
  display: block;
  width: 100%;
  height: auto
}

.ma-hotspot span {
  position: absolute;
  transform: translate(-50%,-50%);
  border: 2px solid #ffdf52;
  background: #f8ce3a33;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 1;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none
}

.ma-hotspot-row {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr)) 25px;
  gap: 6px
}

.ma-validation {
  background: #eef5ef;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 20px
}

.ma-validation p {
  margin: 5px 0
}

.mission-player-root {
  width: 100%;
  min-width: 0
}

.mission-play {
  --mp-ink: #19372f;
  --mp-gold: #c6a254;
  --mp-paper: #f6f5ee;
  color: var(--mp-ink);
  font-family: inherit;
  position: relative;
  background: linear-gradient(155deg,#f8faf6,#eeeede);
  border: 1px solid #e2e5db;
  border-radius: 20px;
  padding: 18px;
  overflow: hidden;
  box-sizing: border-box;
  text-align: left;
  isolation: isolate
}

.mission-play * {
  box-sizing: border-box
}

.mission-play button {
  font: inherit;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation
}

.mission-play button:focus-visible,
.mission-play input:focus-visible,
.mp-hit-surface:focus-visible {
  outline: 3px solid #447eaa;
  outline-offset: 3px
}

.mp-play-guide>span {
  display: inline-block;
  letter-spacing: .08em;
  color: #68785d;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid #cbd7c0;
  border-radius: 20px;
  padding: 4px 9px
}

.mp-play-guide h3 {
  font-size: 18px;
  line-height: 1.55;
  margin: 12px 0 6px;
  color: #19372f
}

.mp-play-guide p {
  font-size: 12px;
  line-height: 1.65;
  color: #5b6e60;
  margin: 6px 0 22px
}

.mp-content {
  min-width: 0
}

.mp-content button {
  background: #fff;
  border: 1px solid #cdd6c8;
  border-radius: 11px;
  color: #243e32;
  transition: transform .15s,box-shadow .15s,border-color .15s;
  box-shadow: 0 3px 0 #dce0d5;
  padding: 12px;
  text-align: left;
  font-size: 14px
}

.mp-content button:hover {
  border-color: #708d69
}

.mp-content button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #dce0d5
}

.mp-content button.selected {
  background: #e8f1df;
  border: 2px solid #3f7454;
  box-shadow: 0 0 0 2px #83ac7320
}

.mp-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  margin: 16px 0 10px;
  gap: 8px
}

.mp-section-label small {
  font-size: 10px;
  color: #6c7a6a;
  font-weight: 400
}

.mp-section-label b {
  font-variant-numeric: tabular-nums;
  color: #6a7d53
}

.mp-feedback {
  font-size: 12px;
  line-height: 1.6;
  min-height: 38px;
  color: #66725f;
  background: #ffffff80;
  padding: 10px;
  border-radius: 9px;
  margin: 18px 0 10px
}

.mp-feedback.good {
  color: #1c6d4b;
  background: #e0efdf
}

.mp-feedback.bad {
  color: #9a4c24;
  background: #fff0df
}

.mp-actions {
  display: flex;
  gap: 8px
}

.mp-actions button {
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  font-weight: 750;
  font-size: 13px
}

.mp-reset,
.mp-hint {
  background: #e3e9dc;
  color: #46593e;
  white-space: nowrap
}

.mp-check {
  flex: 1;
  background: #224b3a;
  color: #fff;
  box-shadow: 0 4px 0 #153829
}

.mp-empty {
  text-align: center;
  padding: 30px 20px;
  background: #f1f5ed;
  border: 1px dashed #bdcbb9;
  border-radius: 18px;
  color: #4d6246
}

.mp-empty>span {
  font-size: 30px
}

.mp-empty h3 {
  font-size: 16px
}

.mp-empty p,
.mp-empty small {
  font-size: 12px;
  line-height: 1.7
}

.mp-answer-label {
  display: block;
  color: #566749;
  font-size: 12px;
  font-weight: 700
}

.mp-answer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px
}

.mp-answer {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 54px;
  border: 1px solid #b7c5ad;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  font-size: 17px;
  color: #243f2e;
  background: #fff;
  box-shadow: inset 0 2px 5px #223d2510
}

.mp-count {
  flex: none;
  font-size: 20px!important;
  min-width: 42px;
  text-align: center!important
}

.mp-symbol {
  margin: 10px auto 23px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid #c6c6a3;
  border-radius: 18px;
  background: linear-gradient(145deg,#fdfbf1,#e1ddc0);
  font-size: 26px;
  box-shadow: 5px 7px 0 #d0cbb4;
  transform: rotate(-5deg)
}

.mp-observe img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 15px
}

.mp-choices {
  display: grid;
  gap: 10px
}

.mp-choices button {
  display: flex;
  align-items: center;
  gap: 10px
}

.mp-option-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #edf0e7;
  flex: none;
  font-size: 12px
}

.mp-choices b {
  flex: 1;
  font-size: 14px
}

.mp-choice-tick {
  width: 20px;
  color: #346647
}

.mp-choice-images {
  grid-template-columns: 1fr 1fr
}

.mp-choice-images button {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px
}

.mp-choice-images button img {
  width: 100%;
  height: 105px;
  object-fit: contain;
  background: #edf0e9;
  border-radius: 6px
}

.mp-choice-images b {
  font-size: 12px
}

.mp-choice-images .mp-choice-tick {
  display: none
}

.mp-truth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0
}

.mp-truth button {
  text-align: center;
  padding: 22px 10px
}

.mp-truth strong {
  display: block;
  font-size: 58px;
  line-height: 1.1;
  color: #487c59
}

.mp-truth span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 15px
}

.mp-order-slots {
  display: grid;
  gap: 8px
}

.mp-order-slot {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 57px;
  background: #fff;
  border: 1px solid #c8d1bd;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 3px 0 #dedfce
}

.mp-order-slot.empty {
  border: 1px dashed #bdc7ac;
  box-shadow: none;
  background: #e7ecde66
}

.mp-slot-number {
  width: 24px;
  height: 27px;
  flex: none;
  background: #e0e8d3;
  color: #627447;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800
}

.mp-order-slot b {
  flex: 1;
  font-size: 13px
}

.mp-order-slot>div {
  display: flex;
  gap: 2px;
  margin-left: auto
}

.mp-slot-placeholder {
  font-size: 11px;
  color: #859077
}

.mp-content .mp-mini {
  font-size: 11px;
  min-width: 26px;
  min-height: 34px;
  padding: 3px;
  box-shadow: none;
  border-color: #e2e7d9
}

.mp-pool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.mp-pool button {
  background: linear-gradient(145deg,#f6f1df,#e7dfc5);
  border-color: #c8b98f;
  color: #5b512f;
  font-size: 12px;
  min-height: 52px;
  box-shadow: 0 4px 0 #c8bca1
}

.mp-pool button.used {
  visibility: hidden
}

.mp-pool span {
  color: #978147
}

.mp-wheels {
  display: grid;
  grid-template-columns: repeat(var(--wheels),minmax(0,1fr));
  gap: 9px;
  margin: 22px 3px 10px;
  perspective: 600px
}

.mp-wheel {
  min-width: 0;
  text-align: center
}

.mp-content .mp-wheel-control {
  display: block;
  min-height: 38px;
  width: 100%;
  font-size: 23px;
  padding: 1px;
  text-align: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #827043
}

.mp-cube-space {
  aspect-ratio: .85;
  perspective: 420px;
  margin: 9px 0 12px
}

.mp-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-9deg) rotateY(-6deg);
  --depth: 14px
}

.mp-face {
  position: absolute;
  backface-visibility: hidden;
  border: 1px solid #b0a383;
  border-radius: 5px;
  background: linear-gradient(125deg,#e7e1ce,#c3bba5 65%,#e2dbc7);
  box-shadow: inset 1px 2px 2px #fff9;
  display: grid;
  place-items: center;
  font-size: clamp(18px,5vw,34px);
  font-weight: 800;
  color: #514b38;
  text-shadow: 0 1px #f9f5e6,0 -1px #72694f
}

.mp-face.front {
  inset: 0;
  transform: translateZ(7px);
  box-shadow: inset 0 0 15px #7c725230,5px 8px 8px #3b322b30
}

.mp-face.top {
  height: 14px;
  width: 100%;
  top: -7px;
  transform: rotateX(90deg);
  font-size: 0;
  background: #eee8d8
}

.mp-face.right {
  width: 14px;
  height: 100%;
  right: -7px;
  transform: rotateY(90deg);
  background: #a89f87
}

.mp-wheel>small {
  font-size: 10px;
  color: #9a957e
}

.mp-caption {
  font-size: 11px;
  color: #7c806b;
  line-height: 1.7;
  text-align: center;
  margin: 16px 0
}

.mp-compass {
  padding: 30px 22px 22px;
  background: radial-gradient(circle,#f9f5df 55%,#d9dcc8);
  border: 1px solid #c2c8b1;
  border-radius: 50%;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  margin: 15px 10px
}

.mp-north {
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: .1em
}

.mp-rotate-image {
  width: 100%;
  height: 100%;
  transition: transform .35s
}

.mp-rotate-image img {
  width: 100%;
  height: 100%;
  object-fit: contain
}

.mp-rotation-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center
}

.mp-rotation-controls button {
  font-size: 11px;
  padding: 8px
}

.mp-rotation-controls>span {
  font-size: 11px
}

.mp-pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.mp-pairs>div {
  display: grid;
  gap: 9px;
  align-content: start
}

.mp-pairs button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-height: 70px;
  flex-wrap: wrap;
  padding: 10px
}

.mp-pairs button>span {
  width: 22px;
  height: 22px;
  background: #e7ebdc;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: none;
  font-size: 10px
}

.mp-pairs small {
  font-size: 9px;
  color: #769063
}

.mp-pairs .linked {
  background: #eef3e4;
  border-color: #a9bc8a
}

.mp-image-board {
  position: relative;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #e1e4d7
}

.mp-image-board>img {
  width: 100%;
  height: auto;
  display: block
}

.mp-hit-surface {
  position: absolute;
  inset: 0;
  cursor: crosshair
}

.mp-hit-marker {
  position: absolute;
  transform: translate(-50%,-50%);
  border: 2px solid #fcde65;
  color: #fff;
  background: #3b664a99;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  line-height: 1;
  pointer-events: none
}

.mp-difference {
  display: grid;
  gap: 13px
}

.mp-difference small {
  display: block;
  font-size: 11px;
  color: #6b7a60;
  margin-bottom: 7px
}

.mp-compare {
  position: relative;
  aspect-ratio: 1.3;
  border-radius: 12px;
  overflow: hidden
}

.mp-compare-base,
.mp-compare-before {
  position: absolute;
  inset: 0
}

.mp-compare img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.mp-before-label,
.mp-after-label {
  position: absolute;
  top: 10px;
  font-size: 10px;
  color: white;
  background: #253d2fbb;
  padding: 5px 8px;
  border-radius: 5px
}

.mp-before-label {
  left: 10px
}

.mp-after-label {
  right: 10px
}

.mp-range-label {
  display: block;
  font-size: 12px;
  margin: 16px 0;
  color: #4d6847
}

.mp-range-label input {
  display: block;
  width: 100%;
  margin: 15px 0;
  accent-color: #537445;
  min-height: 25px
}

.mp-ar-stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg,#223c35,#425547);
  display: grid;
  place-items: center
}

.mp-ar-stage>img:not(.mp-ar-guide),
.mp-ar-stage>video {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%
}

.mp-ar-stage .mp-ar-guide {
  position: absolute;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none
}

.mp-ar-stage>span {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #10291bc9;
  color: #fff;
  border-radius: 5px;
  font-size: 10px;
  padding: 6px;
  z-index: 2
}

.mp-camera-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0
}

.mp-camera-actions button {
  flex: 1;
  font-size: 12px
}

.mp-adjust {
  font-size: 12px;
  background: #e7ecdf;
  border-radius: 10px;
  padding: 12px
}

.mp-adjust summary {
  cursor: pointer
}

.mp-adjust label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  font-size: 11px
}

.mp-adjust input {
  flex: 1;
  min-width: 0;
  accent-color: #537445
}

.mp-align-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6
}

.mp-align-confirm input {
  width: 20px;
  height: 20px;
  accent-color: #43704d
}

.mp-success {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(ellipse,#fff9dbef,#dbe4d3f2);
  backdrop-filter: blur(3px);
  animation: mpReveal .4s ease-out;
  text-align: center
}

.mp-success[hidden] {
  display: none
}

.mp-success>span {
  font-size: 72px;
  color: #b58e34;
  text-shadow: 0 0 30px #ffe87c;
  animation: mpGlow 1s ease-in-out infinite alternate
}

.mp-success>b {
  font-size: 21px;
  margin: 20px 0 10px;
  color: #455b35
}

.mp-success>small {
  font-size: 13px;
  color: #76815e
}

.mission-play[data-state=success] .mp-face.front {
  color: #ffdf62;
  text-shadow: 0 0 12px #ffd15b
}

.mission-mobile {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px 30px
}

.mp-key-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #375c47;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none
}

.mp-key-help {
  font-size: 10px;
  color: #6b7865
}

.mp-hit-surface:not(:focus-visible) .mp-key-cursor {
  display: none
}

@keyframes mpReveal {
  from {
    opacity: 0;
    transform: scale(.97)
  }
  to {
    opacity: 1;
    transform: scale(1)
  }
}

@keyframes mpGlow {
  to {
    filter: brightness(1.3);
    transform: scale(1.06)
  }
}

@media(prefers-reduced-motion:reduce) {
  .mission-play * {
    animation: none!important;
    transition: none!important
  }
}

@media(max-width:380px) {
  .mission-play {
    padding: 13px
  }
  .mp-wheels {
    gap: 5px
  }
  .mp-content .mp-mini {
    min-width: 24px
  }
  .mp-order-slot {
    gap: 6px
  }
  .mp-pairs {
    gap: 8px
  }
  .mp-actions button {
    padding: 10px 8px
  }
}

.ma-gallery-link {
  display: block;
  font-size: 11px;
  color: #527e5c;
  margin-top: 12px;
  text-decoration: underline
}

.phone-inner .mission-play .mp-play-guide h3 {
  font-size: 17px;
  line-height: 1.55;
  margin: 12px 0 6px
}

.mp-word[data-state=success] .mp-success {
  position: relative;
  inset: auto;
  background: #e8e8cc;
  border: 1px solid #d2bf75;
  border-radius: 12px;
  padding: 12px;
  margin-top: 14px;
  backdrop-filter: none
}

.mp-word[data-state=success] .mp-success>span {
  font-size: 30px
}

.mp-word[data-state=success] .mp-success>b {
  font-size: 16px;
  margin: 8px 0
}

.mp-word[data-state=success] .mp-face.front {
  background: linear-gradient(130deg,#6f644b,#3c3b2b);
  color: #ffe27a;
  box-shadow: 0 0 20px #e9cc5777,inset 0 0 10px #e9cc5744
}

/* Keep the confirm label visible when the editor's global button hover applies. */
.mission-play .mp-check:hover {
  background: #224b3a;
  color: #fff
}

/* Collection board: root and card grid deliberately use different class names. */
.mission-play.mp-collect {
  display: block;
  padding: 22px;
  background: radial-gradient(ellipse at 95% 0,#324c4c 0,transparent 48%),#14272c;
  color: #ecf3ef;
  border: 1px solid #ffffff15;
  border-radius: 26px;
  box-shadow: 0 12px 35px #081a2620
}

.mp-collect .mp-play-guide>span {
  color: #dcc68f;
  border-color: #dcc68f42;
  background: #dcc68f0b;
  font-size: 10px;
  letter-spacing: .08em
}

.mp-collect .mp-play-guide h3 {
  color: #f1f5ef;
  font-size: 21px;
  line-height: 1.5;
  margin: 14px 0 8px
}

.mp-collect .mp-play-guide p {
  color: #b7c8c8;
  font-size: 12px;
  margin: 0 0 22px
}

.mp-discovery-progress {
  margin: 0 0 20px
}

.mp-discovery-progress>div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px
}

.mp-discovery-progress span {
  font-size: 12px;
  color: #cad8d6
}

.mp-discovery-progress strong {
  font-size: 23px;
  color: #e9d3a1;
  font-variant-numeric: tabular-nums
}

.mp-discovery-progress strong small {
  font-size: 13px;
  color: #a9bfbc;
  font-weight: 400
}

.mp-discovery-track {
  height: 5px;
  background: #ffffff12;
  border-radius: 10px;
  overflow: hidden
}

.mp-discovery-track i {
  height: 100%;
  display: block;
  background: #e4c58b;
  border-radius: 10px;
  transition: width .3s
}

.mp-discovery-progress>small {
  font-size: 11px;
  color: #b6c9c5;
  display: block;
  margin-top: 10px;
  line-height: 1.6
}

.mp-clue-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px
}

.mp-content .mp-clue-card {
  position: relative;
  padding: 14px;
  min-height: 165px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border: 1px solid #758d8a55;
  background: linear-gradient(145deg,#ffffff0c,#ffffff03);
  border-radius: 18px;
  box-shadow: none;
  color: #dfeae4;
  overflow-wrap: anywhere;
  transition: background .2s,border-color .2s,transform .2s
}

.mp-content .mp-clue-card:hover {
  background: #ffffff10;
  border-color: #d9c59388
}

.mp-content .mp-clue-card:active {
  transform: scale(.97);
  box-shadow: none
}

.mp-clue-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9db4b2;
  font-size: 13px
}

.mp-clue-top small {
  font-size: 10px;
  letter-spacing: .08em
}

.mp-clue-symbol {
  height: 64px;
  display: grid;
  place-items: center;
  color: #8fa9a7
}

.mp-clue-symbol svg {
  width: 45px;
  height: 45px
}

.mp-clue-card>b {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 650;
  margin-bottom: 7px
}

.mp-clue-status {
  font-size: 10px;
  color: #a4bcb9;
  margin-top: auto
}

.mp-content .mp-clue-card.collected {
  background: linear-gradient(145deg,#e9d3a121,#c2a2660d);
  border-color: #cdb57c70;
  color: #f5e3b9
}

.mp-clue-card.collected .mp-clue-symbol,
.mp-clue-card.collected .mp-clue-top {
  color: #dfc58d
}

.mp-clue-card.collected .mp-clue-status {
  color: #d6c493
}

.mp-content .mp-clue-card.active {
  border-color: #ecd199;
  box-shadow: 0 0 0 2px #ecd19916
}

.mp-collect .mp-clue-detail {
  margin-top: 18px;
  background: #07171d66;
  border: 1px solid #ffffff0d;
  border-radius: 16px;
  padding: 16px;
  min-height: 112px
}

.mp-detail-label {
  display: block;
  color: #a9c0b9;
  font-size: 10px;
  letter-spacing: .04em
}

.mp-clue-detail strong {
  display: block;
  font-size: 18px;
  color: #ebd7a9;
  line-height: 1.5;
  margin-top: 8px
}

.mp-clue-detail p {
  font-size: 13px;
  color: #cad8d3;
  line-height: 1.8;
  margin: 8px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere
}

.mp-clue-detail.revealed {
  animation: mpReveal .3s ease-out
}

.mp-collect .mp-feedback {
  background: transparent;
  padding: 0;
  min-height: 0;
  margin: 15px 0;
  color: #b5c8c1;
  font-size: 11px
}

.mp-collect .mp-feedback.bad {
  color: #ffceaa
}

.mp-collect .mp-feedback.good {
  color: #cfe9b5
}

.mp-collect .mp-actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px
}

.mp-collect .mp-actions button {
  min-height: 48px;
  border-radius: 13px;
  font-size: 12px;
  white-space: normal
}

.mp-collect .mp-reset,
.mp-collect .mp-hint {
  background: #ffffff0c;
  color: #c9d8d1;
  border: 1px solid #ffffff16
}

.mission-play.mp-collect .mp-check {
  background: #e6cb94;
  color: #20332e
}

.mission-play.mp-collect .mp-check:hover {
  background: #f3dcac;
  color: #20332e
}

@media(max-width:360px) {
  .mission-play.mp-collect {
    padding: 16px
  }
  .mp-clue-grid {
    gap: 9px
  }
  .mp-content .mp-clue-card {
    padding: 12px
  }
  .mp-collect .mp-actions button {
    padding: 10px 7px
  }
}

/* Keep the common three-clue mission compact at phone widths. */
.mp-collect .mp-play-guide p {
  margin-bottom: 14px
}

.mp-discovery-progress {
  margin-bottom: 16px
}

.mp-content .mp-clue-card {
  min-height: 140px
}

.mp-clue-symbol {
  height: 45px
}

.mp-clue-symbol svg {
  width: 36px;
  height: 36px
}

.mp-collect .mp-clue-detail {
  min-height: 98px;
  margin-top: 14px;
  padding: 14px
}

.mp-collect .mp-feedback {
  margin: 12px 0
}

.mission-mobile:has(.mp-collect) {
  padding: 8px 12px 18px
}

.mission-mobile .mission-play.mp-collect {
  padding: 18px
}

.runtime .mp-collect p {
  white-space: normal;
  line-height: 1.7
}

.runtime .mp-clue-detail p {
  white-space: pre-line
}

/* Drag-to-sort board, shared by author preview and mobile runtime. */
.mission-play.mp-sort {
  background: radial-gradient(ellipse at 100% 0,#344b51,transparent 50%),#14272c;
  color: #eef4f1;
  border-color: #ffffff1a;
  border-radius: 26px;
  padding: 20px
}

.mp-sort .mp-play-guide>span {
  color: #dec897;
  border-color: #dec89750;
  background: #dec8970a
}

.mp-sort .mp-play-guide h3 {
  color: #f4f6ef;
  font-size: 21px;
  margin: 14px 0 8px;
  line-height: 1.45
}

.mp-sort .mp-play-guide p {
  color: #b5c7c5;
  font-size: 12px;
  margin: 0 0 20px
}

.mp-sort-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px
}

.mp-sort-progress>span {
  font-size: 12px;
  color: #b7ccc7
}

.mp-sort-progress>strong {
  margin-left: auto;
  font-size: 23px;
  color: #ebd5a6;
  font-variant-numeric: tabular-nums
}

.mp-sort-progress small {
  font-size: 12px;
  font-weight: 400;
  color: #a2b9b5
}

.mp-sort-progress>div {
  width: 100%;
  height: 5px;
  border-radius: 20px;
  background: #ffffff15;
  overflow: hidden
}

.mp-sort-progress i {
  display: block;
  height: 100%;
  border-radius: 20px;
  background: #e6c98f;
  transition: width .25s
}

.mp-sort-pool {
  border: 1px solid #ffffff18;
  background: #091c244d;
  border-radius: 18px;
  padding: 13px;
  min-height: 104px;
  transition: background .18s,border-color .18s
}

.mp-sort-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #d0dfd9
}

.mp-sort-label>span {
  font-size: 10px;
  color: #91a9a3
}

.mp-sort-card-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0
}

.mp-content .mp-sort-card {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 calc(50% - 8px);
  max-width: 100%;
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid #637775;
  background: #eaf0e9;
  color: #263c36;
  border-radius: 12px;
  box-shadow: 0 3px 0 #0002;
  cursor: grab;
  transition: opacity .15s,background .15s,border-color .15s;
  overflow-wrap: anywhere;
  text-align: left
}

.mp-sort-card b {
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
  min-width: 0
}

.mp-drag-handle {
  font-size: 22px;
  color: #688179;
  flex: none;
  line-height: 1
}

.mp-sort-card-mark {
  font-size: 13px;
  color: #688179
}

.mp-content .mp-sort-card:hover {
  background: #fff;
  border-color: #c9ba90
}

.mp-content .mp-sort-card.selected {
  border: 2px solid #f0ce82;
  background: #fff4d5;
  color: #263c36;
  box-shadow: 0 0 0 2px #f0ce821f;
  padding: 10px 9px
}

.mp-content .mp-sort-card:active {
  cursor: grabbing;
  transform: none
}

.mp-sort-card.dragging {
  opacity: .25
}

.mp-sort-empty {
  font-size: 13px;
  color: #e7d09b;
  padding: 4px 0;
  line-height: 1.7
}

.mp-sort-empty span {
  display: block;
  color: #a4bbb3;
  font-size: 11px
}

.mp-sort-prompt {
  font-size: 11px;
  line-height: 1.7;
  color: #bed0c9;
  padding: 14px 0;
  overflow-wrap: anywhere;
  min-height: 48px
}

.mp-sort-prompt b {
  color: #f2d496
}

.mp-sort-prompt>span {
  color: #e8d4a1;
  font-size: 18px;
  margin-right: 7px
}

.mp-sort-bins {
  display: grid;
  gap: 12px
}

.mp-sort-bin {
  --bin: #91d4c1;
  border: 1px solid #91d4c135;
  background: #91d4c109;
  border-radius: 18px;
  padding: 10px 12px 12px;
  min-width: 0;
  transition: background .18s,border-color .18s,box-shadow .18s
}

.mp-sort-bin[data-tone="1"] {
  --bin: #bdafe6;
  background: #bdafe609;
  border-color: #bdafe635
}

.mp-sort-bin[data-tone="2"] {
  --bin: #e5ba8c;
  background: #e5ba8c09;
  border-color: #e5ba8c35
}

.mp-sort-bin[data-tone="3"] {
  --bin: #91bfdf;
  background: #91bfdf09;
  border-color: #91bfdf35
}

.mp-content .mp-bin-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 0 9px;
  background: transparent;
  color: var(--bin);
  border: 0;
  box-shadow: none;
  min-height: 44px;
  border-radius: 0;
  text-align: left
}

.mp-content .mp-bin-heading:hover {
  background: transparent;
  color: #fff
}

.mp-bin-heading strong {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere
}

.mp-bin-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: #ffffff08;
  border-radius: 10px;
  flex: none
}

.mp-bin-icon svg {
  width: 22px;
  height: 22px
}

.mp-bin-count {
  border: 1px solid #ffffff20;
  border-radius: 99px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 11px
}

.mp-bin-placeholder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px dashed #ffffff26;
  border-radius: 11px;
  color: #9eb8af;
  padding: 12px;
  width: 100%;
  min-height: 50px;
  font-size: 11px
}

.mp-bin-placeholder b {
  font-size: 18px;
  font-weight: 400;
  color: var(--bin)
}

.mp-sort-bin.mp-drop-active {
  background: #e8d09520;
  border: 1px solid #f3d89f;
  box-shadow: 0 0 0 3px #f3d89f18
}

.mp-sort-pool.mp-drop-active {
  background: #e8d09518;
  border-color: #f3d89f
}

.mp-sort-help {
  display: block;
  color: #acc1b9;
  font-size: 10px;
  line-height: 1.8;
  margin-top: 15px
}

.mp-sort .mp-feedback {
  background: transparent;
  color: #b9cec4;
  font-size: 11px;
  line-height: 1.6;
  min-height: 18px;
  margin: 12px 0;
  padding: 0
}

.mp-sort .mp-feedback.bad {
  color: #ffd1ad
}

.mp-sort .mp-feedback.good {
  color: #d4ebbc
}

.mp-sort .mp-actions button {
  min-height: 48px;
  font-size: 12px;
  border-radius: 13px;
  box-shadow: none
}

.mp-sort .mp-reset,
.mp-sort .mp-hint {
  background: #ffffff0c;
  border: 1px solid #ffffff1b;
  color: #c6d8ce
}

.mission-play.mp-sort .mp-check {
  background: #e6cb94;
  color: #20332e
}

.mission-play.mp-sort .mp-check:hover {
  background: #f4ddae;
  color: #20332e
}

.mission-mobile:has(.mp-sort) {
  padding: 8px 12px 18px
}

.runtime .mp-sort p {
  white-space: normal
}

.mp-sort-drag-ghost {
  position: fixed;
  z-index: 2147483000;
  pointer-events: none;
  box-sizing: border-box;
  min-height: 48px;
  padding: 14px 16px;
  border: 2px solid #f1cf83;
  border-radius: 13px;
  background: #fff1ca;
  color: #203a31;
  font: 700 14px/1.5 system-ui,sans-serif;
  box-shadow: 0 12px 30px #0005;
  transform: rotate(-3deg) scale(1.04);
  overflow-wrap: anywhere
}

@media(max-width:360px) {
  .mission-play.mp-sort {
    padding: 15px
  }
  .mp-sort .mp-play-guide h3 {
    font-size: 19px
  }
  .mp-sort-pool {
    padding: 11px
  }
  .mp-content .mp-sort-card {
    padding: 9px 8px
  }
  .mp-content .mp-sort-card.selected {
    padding: 8px 7px
  }
  .mp-sort-card b {
    font-size: 12px
  }
  .mp-sort-bin {
    padding: 8px 10px 10px
  }
  .mp-drag-handle {
    font-size: 18px
  }
}

@media(prefers-reduced-motion:reduce) {
  .mp-sort-drag-ghost {
    transform: none
  }
}

.mp-sort .mp-play-guide p {
  display: none
}

.mp-sort .mp-play-guide h3 {
  margin: 10px 0 16px
}

.mp-sort-progress {
  margin-bottom: 14px;
  gap: 8px
}

.mp-sort-pool {
  padding: 10px
}

.mp-sort-label {
  margin-bottom: 8px
}

.mp-content .mp-sort-card {
  min-height: 44px;
  padding: 9px 10px
}

.mp-content .mp-sort-card.selected {
  padding: 8px 9px
}

.mp-sort-prompt {
  padding: 10px 0;
  min-height: 38px
}

.mp-sort-bin {
  padding: 8px 10px 10px
}

.mp-content .mp-bin-heading {
  min-height: 36px;
  padding-bottom: 6px
}

.mp-bin-placeholder {
  min-height: 44px;
  padding: 8px 10px
}

.mp-sort-bins {
  gap: 10px
}

.mp-sort-help {
  margin-top: 12px
}

.mp-sort .mp-feedback {
  margin: 10px 0
}

/* Image restoration v39: title above, artwork as the primary interaction. */
.mission-play.mp-jigsaw {
  --puzzle-ink: #f6f5ef;
  --puzzle-muted: #b2c3bf;
  --puzzle-accent: #e4c18a;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 620px;
  padding: 28px 20px 20px;
  margin: 0;
  border: 1px solid #ffffff12;
  border-radius: 24px;
  background: radial-gradient(ellipse at 100% 0,#23413b 0,transparent 54%),#102622;
  color: var(--puzzle-ink);
  box-shadow: 0 20px 50px #061b2426;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: auto;
  transform: none
}

.mp-jigsaw * {
  box-sizing: border-box
}

.mp-jigsaw .mp-jigsaw-heading {
  display: block;
  height: auto;
  padding: 0;
  margin: 0 4px 30px;
  background: none;
  color: inherit;
  border: 0;
  text-align: left
}

.mp-jigsaw-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c4d1c9;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0
}

.mp-jigsaw-eyebrow>span:first-child {
  color: var(--puzzle-accent);
  font-size: 10px;
  letter-spacing: .16em;
  font-weight: 700;
  padding-right: 12px;
  border-right: 1px solid #ffffff2b
}

.mission-play.mp-jigsaw .mp-play-guide h3 {
  font-weight: 700;
  font-family: inherit;
  font-size: clamp(24px,6.4vw,32px);
  line-height: 1.3;
  letter-spacing: -.055em;
  color: var(--puzzle-ink);
  margin: 16px 0 12px;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: left
}

.mp-jigsaw .mp-play-guide p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--puzzle-muted);
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: keep-all
}

.mp-jigsaw>.mp-content {
  margin-top: 0;
  width: 100%;
  min-width: 0
}

.mp-jigsaw-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #a9beb5;
  font-size: 11px;
  line-height: 1.6;
  margin: 0 3px 12px;
  font-variant-numeric: tabular-nums
}

.mp-jigsaw-meta>span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e2e9e0;
  font-weight: 600
}

.mp-jigsaw-meta b {
  font-size: 10px;
  font-weight: 500;
  border: 1px solid #ffffff20;
  border-radius: 5px;
  padding: 1px 6px;
  color: #b7c9be
}

.mp-jigsaw-meta strong {
  font-size: 15px;
  color: #f4e8cd;
  font-weight: 600;
  margin-right: 3px
}

.mp-jigsaw-board {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  grid-template-rows: repeat(2,minmax(0,1fr));
  gap: 5px;
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  background: #081b17;
  border: 1px solid #c6ddc526;
  border-radius: 14px;
  box-shadow: 0 14px 30px #0004;
  isolation: isolate;
  position: relative
}

.mp-jigsaw-board .mp-piece {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #284539;
  overflow: hidden;
  box-shadow: none;
  aspect-ratio: auto;
  touch-action: manipulation;
  isolation: isolate;
  transform: none;
  transition: filter .16s,box-shadow .16s;
  cursor: pointer
}

.mp-jigsaw-board .mp-piece-image {
  position: absolute;
  display: block;
  width: 200%;
  height: 200%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
  opacity: 1
}

.mp-jigsaw-board .mp-piece::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #ffffff18;
  border-radius: inherit;
  pointer-events: none
}

.mp-jigsaw-board .mp-piece:hover {
  border: 0;
  filter: brightness(1.06)
}

.mp-jigsaw-board .mp-piece:active {
  transform: scale(.985);
  box-shadow: none
}

.mp-jigsaw-board .mp-piece.selected {
  transform: none;
  border: 0;
  background: #284539;
  box-shadow: inset 0 0 0 3px var(--puzzle-accent);
  z-index: 3
}

.mp-jigsaw-board .mp-piece.selected::after {
  border: 3px solid var(--puzzle-accent)
}

.mp-jigsaw-board .mp-piece:focus-visible {
  outline: 3px solid #fff1be;
  outline-offset: 3px;
  z-index: 4
}

.mp-jigsaw-board .mp-piece-mark {
  position: absolute;
  right: 10px;
  top: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--puzzle-accent);
  color: #173126;
  border: 1px solid #fff3;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 2px 8px #0005
}

.mp-jigsaw-board .selected .mp-piece-mark {
  display: flex
}

.mp-piece-mark svg {
  width: 17px;
  height: 17px
}

.mp-jigsaw-instruction {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 2px 4px;
  min-height: 48px;
  color: #c2d2c8
}

.mp-jigsaw-instruction>span {
  display: flex;
  color: #dabe8e;
  flex: none
}

.mp-jigsaw .mp-jigsaw-instruction p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  word-break: keep-all;
  white-space: normal
}

.mp-jigsaw-footer {
  margin-top: 6px
}

.mp-jigsaw .mp-feedback {
  padding: 0 2px;
  margin: 0 0 10px;
  background: none;
  color: #c6d7cb;
  font-size: 12px;
  line-height: 1.6;
  min-height: 0;
  white-space: normal;
  overflow-wrap: anywhere
}

.mp-jigsaw .mp-feedback:empty {
  display: none
}

.mp-jigsaw .mp-feedback.bad {
  color: #ffb9a7
}

.mp-jigsaw .mp-feedback.good {
  color: #cce6af
}

.mp-jigsaw .mp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.mp-jigsaw .mp-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  transition: background .16s,transform .16s
}

.mp-jigsaw .mp-reset,
.mp-jigsaw .mp-hint {
  background: #ffffff06;
  color: #c8d7cd;
  border: 1px solid #ffffff15
}

.mp-jigsaw .mp-reset:hover,
.mp-jigsaw .mp-hint:hover {
  background: #ffffff12;
  color: #fff;
  border-color: #ffffff30
}

.mission-play.mp-jigsaw .mp-check {
  grid-column: 1/-1;
  justify-content: center;
  background: #e4c18a;
  border: 1px solid #f6d79d;
  color: #173227;
  min-height: 54px;
  padding: 15px 20px;
  font-size: 15px;
  margin-top: 2px;
  box-shadow: 0 5px 14px #0002
}

.mission-play.mp-jigsaw .mp-check:hover {
  background: #f0d3a3;
  color: #173227
}

.mp-jigsaw .mp-actions button:active {
  transform: translateY(1px)
}

.mp-jigsaw .mp-success {
  background: #102622eb;
  color: #fff5dc;
  backdrop-filter: blur(6px);
  padding: 28px
}

.mp-jigsaw .mp-success>span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid #e4c18a88;
  border-radius: 50%;
  color: #e4c18a;
  background: #e4c18a10;
  animation: none
}

.mp-jigsaw .mp-success>span svg {
  width: 34px;
  height: 34px
}

.mp-jigsaw .mp-success>b {
  color: #f8ebce;
  font-size: 21px;
  line-height: 1.5
}

.mp-jigsaw .mp-success>small {
  color: #b9cfc0
}

.mission-mobile:has(.mp-jigsaw) {
  max-width: 620px;
  padding: 0 0 16px
}

.mission-mobile .mission-play.mp-jigsaw {
  min-height: calc(100svh - 104px);
  padding: 24px 18px 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none
}

.runtime:has(.mp-jigsaw) {
  background: #102622
}

.runtime:has(.mp-jigsaw) .game-header {
  background: #102622;
  color: #edf3e8
}

@media(max-width:360px) {
  .mission-play.mp-jigsaw {
    padding: 22px 14px 16px;
    min-height: 570px
  }
  .mission-mobile .mission-play.mp-jigsaw {
    padding: 22px 12px 16px
  }
  .mp-jigsaw .mp-jigsaw-heading {
    margin-bottom: 24px
  }
  .mission-play.mp-jigsaw .mp-play-guide h3 {
    font-size: 25px
  }
  .mp-jigsaw .mp-play-guide p {
    font-size: 12px
  }
  .mp-jigsaw-board {
    gap: 4px
  }
  .mp-jigsaw .mp-jigsaw-instruction p {
    font-size: 11px
  }
}

@media(prefers-reduced-motion:reduce) {
  .mp-jigsaw * {
    animation: none!important;
    transition: none!important
  }
}

#app.runtime:has(.mp-jigsaw) {
  background: #102622
}

.runtime:has(.mp-jigsaw) .game-header {
  padding: 12px 18px;
  min-height: 64px
}

.runtime:has(.mp-jigsaw) .game-header .icon {
  width: 44px;
  height: 44px
}

/* v39 incremental jigsaw: uncropped aspect ratio, pointer swap and undo. */
.mp-jigsaw-board {
  gap: 0;
  border: 0
}

.mp-jigsaw-board .mp-piece {
  touch-action: none;
  user-select: none;
  border-radius: 0;
  cursor: grab
}

.mp-jigsaw-board .mp-piece::after {
  border: 2px solid #102622;
  border-radius: 0
}

.mp-jigsaw-board .mp-piece.mp-drag-source {
  opacity: .55;
  cursor: grabbing
}

.mp-jigsaw-board .mp-piece.mp-drop-target::after {
  border: 4px solid #e4c18a;
  background: #e4c18a22
}

.mp-jigsaw .mp-actions {
  grid-template-columns: repeat(3,minmax(0,1fr))
}

.mp-jigsaw .mp-undo {
  background: #ffffff06;
  color: #c8d7cd;
  border: 1px solid #ffffff15
}

.mp-jigsaw .mp-undo:disabled {
  opacity: .4;
  cursor: default
}

.mp-jigsaw .mp-actions button {
  padding-inline: 8px
}

/* Three independent zones: instructions top, aspect-fit image center, confirmation bottom. */
.mission-play.mp-jigsaw {
  display: grid;
  grid-template-rows: auto minmax(120px,1fr) auto;
  justify-content: normal;
  height: 620px;
  min-height: 420px;
  gap: 0;
  padding-bottom: max(18px,env(safe-area-inset-bottom))
}

.mp-jigsaw .mp-jigsaw-heading {
  align-self: start;
  margin-bottom: 12px
}

.mp-jigsaw>.mp-content {
  container-type: size;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  margin: 0;
  padding: 0
}

.mp-jigsaw .mp-jigsaw-meta {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0
}

.mp-jigsaw .mp-jigsaw-board {
  flex: none;
  width: min(100%,calc((100cqh - 64px) * var(--jigsaw-ratio,1)));
  max-width: 100%;
  margin: 0 auto
}

.mp-jigsaw .mp-jigsaw-footer {
  align-self: end;
  margin: 12px 0 0;
  width: 100%
}

.mission-play.mp-jigsaw .mp-check {
  justify-content: center;
  text-align: center
}

.mission-mobile .mission-play.mp-jigsaw {
  height: calc(100svh - 80px);
  min-height: 420px
}

/* Stone letter reels: shrink every column together, never wrap the word. */
.mp-word .mp-wheels {
  display: grid;
  grid-template-columns: repeat(var(--wheels),minmax(0,1fr));
  gap: clamp(3px,1.4vw,8px);
  width: 100%;
  max-width: 580px;
  margin: 20px auto 12px;
  perspective: 800px
}

.mp-word .mp-wheel {
  min-width: 0;
  container-type: inline-size
}

.mp-word .mp-cube-space {
  aspect-ratio: 170/200;
  margin: 7px 0 9px;
  perspective: 550px
}

.mp-word .mp-cube {
  transform: none;
  --depth: 0px
}

.mp-word .mp-face.front {
  inset: 0;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent url('/assets/word-stone.svg') center/100% 100% no-repeat;
  box-shadow: none;
  color: #ede6cb;
  text-shadow: 0 2px 1px #152c20,0 -1px #d0d8b955;
  overflow: hidden
}

.mp-word .mp-face.top,
.mp-word .mp-face.right {
  display: none
}

.mp-word .mp-stone-letter {
  position: relative;
  display: block;
  margin-top: -5%;
  font-family: 'Noto Serif KR','Batang',serif;
  font-size: clamp(15px,53cqi,48px);
  font-weight: 700;
  line-height: 1.2
}

.mp-word .mp-stone-runes {
  position: absolute;
  bottom: 15%;
  font-size: clamp(5px,12cqi,10px);
  letter-spacing: .12em;
  color: #a1ae8d;
  opacity: .65
}

.mp-word .mp-content .mp-wheel-control {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #b5bea580;
  border-radius: 8px;
  background: #e4e9da66;
  color: #63704f;
  font-size: 24px;
  line-height: 1;
  box-shadow: none
}

.mp-word .mp-content .mp-wheel-control:hover {
  background: #d4dec9;
  border-color: #829777
}

.mp-word .mp-wheel>small {
  display: block;
  margin-top: 7px;
  font-size: 9px;
  color: #8b967a;
  font-variant-numeric: tabular-nums
}

.mp-word[data-state=success] .mp-face.front {
  background: transparent url('/assets/word-stone.svg') center/100% 100% no-repeat;
  box-shadow: none;
  color: #ffe59c;
  text-shadow: 0 0 12px #ffd15b
}

@media(prefers-reduced-motion:reduce) {
  .mp-word .mp-cube {
    animation: none!important;
    transition: none!important
  }
}
