.bead-world-page {
  --world-pink: #f43f82;
  --world-pink-soft: #fff0f6;
  --world-ink: #2b2428;
  --world-muted: #7a6570;
  --world-line: rgba(119, 85, 99, .18);
  min-height: 100dvh;
  padding: 0;
  color: var(--world-ink);
  background: #fffaf7;
}

.bead-world-shell {
  position: relative;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  border-radius: 0;
  background: #fffaf7;
}

html[data-route-group="bead-world"],
html[data-route-group="bead-world"] body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fffaf7;
}

html[data-route-group="bead-world"] body::before,
html[data-route-group="bead-world"] body::after {
  display: none;
}

html[data-route-group="bead-world"] #app,
.bead-world-route-content {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

html[data-route-group="bead-world"] #app {
  display: block !important;
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  grid-template-columns: none !important;
}

html[data-route-group="bead-world"] #page-content,
html[data-route-group="bead-world"] .bead-world-page,
html[data-route-group="bead-world"] .bead-world-shell {
  width: 100vw !important;
  max-width: none !important;
}

.bead-world-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #fdf5f0;
}

.bead-world-topbar,
.bead-world-panel,
.bead-world-plan,
.bead-world-timeline,
.bead-world-status,
.bead-world-toast {
  position: absolute;
  z-index: 2;
}

.bead-world-topbar {
  top: 12px;
  left: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr auto;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.world-brand,
.world-tabs,
.world-actions,
.bead-world-panel,
.bead-world-plan,
.bead-world-timeline,
.bead-world-status,
.bead-world-toast {
  border: 1px solid rgba(255, 202, 220, .9);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 14px 36px rgba(232, 82, 132, .16);
  backdrop-filter: blur(16px);
}

.world-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  pointer-events: auto;
  font-weight: 950;
  color: var(--world-pink);
}

.world-brand img {
  width: 24px;
  height: 24px;
}

.world-tabs {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 16px;
  pointer-events: auto;
}

.world-tabs button,
.world-actions button,
.world-tool,
.world-export,
.world-layer,
.world-chip,
.world-step,
.world-status button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.world-tabs button {
  min-width: 92px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  color: #5f4d55;
  background: transparent;
  font-weight: 900;
}

.world-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #f43f82, #ff7aa6);
  box-shadow: 0 10px 22px rgba(244, 63, 130, .22);
}

.world-actions {
  justify-self: end;
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border-radius: 16px;
  pointer-events: auto;
}

.world-actions button,
.world-status button {
  height: 36px;
  min-width: 42px;
  padding: 0 12px;
  border-radius: 11px;
  color: #5b4a51;
  background: rgba(255, 247, 250, .95);
  font-weight: 900;
}

.world-actions button:hover,
.world-status button:hover,
.world-tool:hover,
.world-export:hover,
.world-layer:hover,
.world-chip:hover {
  transform: translateY(-1px);
}

.bead-world-panel {
  top: 86px;
  left: 14px;
  width: 210px;
  max-height: calc(100dvh - 220px);
  padding: 14px;
  border-radius: 18px;
  overflow: auto;
}

.world-panel-section + .world-panel-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--world-line);
}

.world-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #3b3035;
  font-size: 14px;
  font-weight: 950;
}

.world-block-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.world-chip {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(122, 91, 102, .12);
  background: rgba(255, 250, 247, .92);
}

.world-chip span {
  display: block;
  width: 26px;
  height: 20px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.world-color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 8px;
}

.world-color {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #5d4a52;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.world-color i {
  display: block;
  width: 27px;
  height: 27px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(116, 91, 99, .2), inset 0 2px 5px rgba(255, 255, 255, .35);
}

.world-color.active i {
  box-shadow: 0 0 0 3px #ff4f8d, inset 0 2px 5px rgba(255, 255, 255, .35);
}

.world-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.world-tool {
  min-height: 48px;
  border-radius: 13px;
  color: #55464d;
  background: rgba(255, 247, 250, .95);
  font-size: 12px;
  font-weight: 950;
}

.world-tool.active {
  color: #fff;
  background: linear-gradient(135deg, #f43f82, #ff7aa6);
}

.bead-world-plan {
  top: 86px;
  right: 14px;
  width: 282px;
  max-height: calc(100dvh - 210px);
  padding: 16px;
  border-radius: 20px;
  overflow: auto;
}

.world-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.world-plan-head h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.world-plan-head span {
  color: var(--world-pink);
  font-size: 12px;
  font-weight: 950;
}

.world-warning {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #ffd4a4;
  border-radius: 14px;
  color: #9a4f00;
  background: #fff8ed;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.world-stat-list {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.world-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--world-line);
}

.world-stat span {
  color: var(--world-muted);
  font-size: 13px;
  font-weight: 800;
}

.world-stat strong {
  font-size: 20px;
  font-weight: 950;
}

.world-layer-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 14px;
}

.world-layer {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 9px;
  border-radius: 12px;
  color: #57474f;
  background: rgba(255, 250, 247, .86);
  font-weight: 900;
  text-align: left;
}

.world-layer.active {
  color: var(--world-pink);
  outline: 2px solid rgba(244, 63, 130, .34);
  background: #fff0f6;
}

.world-color-usage {
  display: grid;
  gap: 8px;
  margin: 10px 0 16px;
}

.world-usage-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  color: #594a51;
  font-size: 13px;
  font-weight: 850;
}

.world-usage-row i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
}

.world-export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.world-export {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #ffc4d8;
  color: var(--world-pink);
  background: rgba(255, 247, 250, .9);
  font-size: 13px;
  font-weight: 950;
}

.world-export:nth-child(3) {
  grid-column: 1 / -1;
}

.bead-world-timeline {
  left: 238px;
  right: 318px;
  bottom: 18px;
  min-height: 130px;
  padding: 14px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(6, minmax(104px, 1fr));
  gap: 10px;
}

.world-step {
  position: relative;
  min-height: 96px;
  padding: 11px 10px;
  border-radius: 16px;
  border: 1px solid rgba(244, 63, 130, .12);
  color: #5d4a52;
  background: rgba(255, 250, 247, .78);
  text-align: left;
}

.world-step.active {
  outline: 2px solid rgba(244, 63, 130, .45);
  background: #fff0f6;
}

.world-step b {
  display: block;
  margin-bottom: 8px;
  color: var(--world-pink);
  font-size: 13px;
}

.world-step span {
  display: block;
  color: #6d5a62;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.bead-world-status {
  left: 14px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 16px;
  color: #574950;
  font-size: 13px;
  font-weight: 900;
}

.world-status-value {
  min-width: 190px;
}

.bead-world-toast {
  left: 50%;
  bottom: 168px;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  min-width: 240px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(244, 63, 130, .94);
  text-align: center;
  font-weight: 950;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.bead-world-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.world-plan-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(40, 24, 31, .42);
  backdrop-filter: blur(4px);
}

.world-plan-card {
  width: min(680px, 100%);
  max-height: 82dvh;
  overflow: auto;
  border: 1px solid #ffd0df;
  border-radius: 20px;
  background: #fffdf9;
  padding: 20px;
  box-shadow: 0 28px 80px rgba(244, 63, 130, .28);
}

.world-plan-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.world-plan-card pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  color: #3f3339;
  background: #fff3f7;
  font: 800 13px/1.65 "Microsoft YaHei", Arial, sans-serif;
}

.world-plan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.world-plan-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.world-plan-actions button:first-child {
  color: #fff;
  background: var(--world-pink);
}

.world-plan-actions button:last-child {
  color: #644f58;
  background: #f6edf0;
}

html[data-device="mobile"] .bead-world-page,
html[data-device="mobile"] .bead-world-shell,
html[data-device="mobile"] .bead-world-route-content {
  min-height: 100dvh;
  height: 100dvh;
}

@media (max-width: 980px) {
  .bead-world-topbar {
    grid-template-columns: 1fr;
    right: 10px;
    left: 10px;
  }

  .world-tabs,
  .world-actions,
  .world-brand {
    justify-self: start;
  }

  .bead-world-panel {
    top: 176px;
    left: 10px;
    width: 178px;
    max-height: 42dvh;
  }

  .bead-world-plan {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 82px;
    width: auto;
    max-height: 32dvh;
  }

  .bead-world-timeline {
    display: none;
  }

  .bead-world-status {
    right: 10px;
    left: 10px;
    bottom: 16px;
  }
}
