:root {
  --sw-purple: #7B6CDB;
  --sw-purple-light: #A89AF0;
  --sw-pink: #E879A8;
  --sw-blue: #5B9FE8;
  --sw-orange: #F5B65A;
  --sw-green: #6FD89A;
  --sw-cream: #FFF8F0;
  --sw-text: #5A4AB0;
  --sw-text-sub: #7A6AA8;
}

.story-workshop-page {
  position: relative;
  width: 100%;
  min-height: 100%;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
}

.sw-bg {
  position: fixed;
  top: 0;
  left: 110px;
  right: 0;
  bottom: 0;
  background: #c8c6ff url('/assets/modules/4/bg/4-atmosphere.png') center / cover no-repeat;
  z-index: 0;
  pointer-events: none;
}

.sw-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 26px 32px 36px;
}

/* Hero */
.sw-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  min-height: 210px;
  position: relative;
}

.sw-hero-wizard {
  width: 250px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 20px 40px rgba(123, 108, 219, 0.35));
  animation: sw-float 4s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}

.sw-hero-castle {
  width: 320px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 16px 36px rgba(123, 108, 219, 0.25));
  user-select: none;
  pointer-events: none;
}

@keyframes sw-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.sw-hero-text {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 42px 20px 0;
}

.sw-title {
  font-size: 42px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-shadow:
    0 2px 14px rgba(55, 35, 139, 0.75),
    0 5px 28px rgba(74, 46, 170, 0.45);
  line-height: 1.2;
}

.sw-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,.94);
  line-height: 1.7;
  margin-bottom: 4px;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.8);
}

/* Section */
.sw-section {
  margin-bottom: 22px;
}

.sw-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.9);
}

.sw-star {
  color: var(--sw-orange);
  font-size: 18px;
}

/* Cards */
.sw-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.sw-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFBF7 0%, #F9F4FF 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 14px 34px rgba(90, 74, 176, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-decoration: none;
  color: inherit;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  min-height: 430px;
  transform: translateY(0);
}

.sw-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 24px 50px rgba(90, 74, 176, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.sw-card:focus-visible {
  outline: 3px solid var(--sw-purple-light);
  outline-offset: 3px;
}

.sw-card:active {
  transform: translateY(-4px) scale(0.98);
  transition-duration: 0.15s;
}

.sw-card.reveal {
  opacity: 1;
  transform: translateY(12px);
}

.sw-card.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.sw-card-art {
  width: 100%;
  height: 290px;
  object-fit: cover;
  object-position: center 32%;
  pointer-events: none;
  border-radius: 22px 22px 14px 14px;
}

.sw-card-copy {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  padding: 13px 15px 14px;
  color: #3e3478;
}

.sw-card-icon {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.sw-card-copy strong { font-size: 19px; line-height: 1.1; }
.sw-card-copy small { margin-top: 3px; color: #786da7; font-size: 12px; }
.sw-card-action {
  grid-column: 1 / 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 18px;
  background: linear-gradient(90deg, #7664df, #9b7cff);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* Banner */
.sw-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px 16px 70px;
  border-radius: 32px;
  background: rgba(36, 30, 105, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 28px rgba(90, 74, 176, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 720px;
  margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sw-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(90, 74, 176, 0.22);
}

.sw-banner-mascot {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(244, 197, 66, 0.4));
  pointer-events: none;
}

.sw-banner-text {
  font-size: 15px;
  color: #fff;
  font-weight: 600;
}

.sw-banner-text span {
  color: var(--sw-orange);
  margin: 0 4px;
}

/* 响应式 */
@media (max-width: 1400px) {
  .sw-cards { grid-template-columns: repeat(3, 1fr); }
  .sw-title { font-size: 36px; }
  .sw-hero-castle { width: 280px; }
  .sw-hero-wizard { width: 220px; }
}

@media (max-width: 1100px) {
  .sw-hero {
    flex-direction: column;
    text-align: center;
    min-height: auto;
  }
  .sw-hero-castle,
  .sw-hero-wizard {
    width: 200px;
  }
  .sw-title { font-size: 32px; }
}

@media (max-width: 768px) {
  .sw-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .sw-title { font-size: 28px; }
  .sw-bg { left: 0; }
  .sw-scroll { padding: 18px 16px 28px; }
  .sw-card { min-height: 360px; }
  .sw-banner { padding-left: 62px; }
  .sw-banner-mascot { width: 48px; height: 48px; }
}
