/* =========================================================
   美術設計總覽頁專用樣式
   ========================================================= */
body { background: linear-gradient(180deg, #F4FFEF 0%, #fce5d8 60%, #F4FFEF 100%); padding: 0; }

/* Hero */
.preview-hero {
  background: linear-gradient(135deg, #3F8E47 0%, #1B8A35 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 40px 24px 20px;
  border-bottom: 6px solid #7ED957;
}

.preview-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #7ED957 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.preview-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  align-items: center;
  gap: 40px;
}

@media (max-width: 768px) {
  .preview-hero-inner { grid-template-columns: 1fr; gap: 8px; }
  .hero-character { max-width: 260px; margin: 0 auto; }
}

.hero-tag {
  display: inline-block;
  background: rgba(126,217,87,0.2);
  color: #7ED957;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid rgba(126,217,87,0.4);
}

.preview-hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.preview-hero p {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.92;
  margin-bottom: 24px;
}

.hero-cta { margin: 20px 0 24px; }
.hero-cta .btn-primary {
  background: linear-gradient(135deg, #7ED957 0%, #5DBB63 100%);
  color: #1B8A35 !important;
  border: none;
  font-weight: 900;
}

.hero-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.9;
}
.hero-meta div { display: flex; flex-direction: column; gap: 2px; }
.hero-meta strong {
  color: #7ED957;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero-character {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-character img {
  width: 100%;
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 16px 24px rgba(0,0,0,0.3));
}

/* Section */
.preview-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-head {
  margin-bottom: 24px;
  position: relative;
  padding-left: 60px;
}

.section-num {
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 48px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
  color: #7ED957;
  opacity: 0.6;
  line-height: 1;
}

.section-head h2 {
  font-size: 24px;
  font-weight: 900;
  color: #1B8A35;
  margin-bottom: 4px;
}

.section-head p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
}

.section-head code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
}

/* Character Grid */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.char-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.char-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(26,32,44,0.12);
}

.char-card.warn { border-color: #ed8936; background: linear-gradient(180deg, #fff 0%, #feebc8 100%); }
.char-card.danger { border-color: #e53e3e; background: linear-gradient(180deg, #fff 0%, #fed7d7 100%); grid-column: span 2; }

@media (max-width: 600px) {
  .char-card.danger { grid-column: span 1; }
}

.char-frame {
  background: linear-gradient(180deg, #e6f0f7 0%, #F4FFEF 100%);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 8px;
  aspect-ratio: 3/4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.char-frame.wide { aspect-ratio: 4/3; }

.char-frame img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(26,32,44,0.15));
}

.char-name {
  font-weight: 900;
  color: #1B8A35;
  font-size: 14px;
}
.char-desc {
  font-size: 11px;
  color: #718096;
}

/* Scene Grid */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.scene-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  transition: transform 0.2s;
}

.scene-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(26,32,44,0.12); }

.scene-card img {
  width: 100%;
  height: 200px;
  display: block;
  background: #cce4f9;
}

.scene-card figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: #4a5568;
}
.scene-card figcaption strong {
  display: block;
  color: #1B8A35;
  font-size: 16px;
  margin-bottom: 2px;
  font-weight: 900;
}

/* Phone Mockup Frames */
.phone-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  justify-items: center;
}

.phone-frame {
  background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
  border-radius: 32px;
  padding: 14px 8px 20px;
  box-shadow: 0 24px 48px rgba(26,32,44,0.3);
  max-width: 380px;
  width: 100%;
}

.phone-label {
  text-align: center;
  color: #7ED957;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(126,217,87,0.3);
}

.phone-screen {
  background: #fefcf3;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
}

.phone-screen .app {
  width: 100% !important;
  max-width: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 600px;
}

/* Icon Grid */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.icon-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.icon-card:hover {
  border-color: #3F8E47;
  transform: translateY(-2px);
  background: #f0f6fc;
}

.icon-card svg {
  width: 40px;
  height: 40px;
}

.icon-card span {
  font-size: 12px;
  font-weight: 700;
  color: #2d3748;
}

/* Palette */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.swatch {
  background: var(--bg);
  color: #fff;
  border-radius: 12px;
  padding: 24px 16px 14px;
  box-shadow: 0 4px 12px rgba(26,32,44,0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100px;
  justify-content: flex-end;
  position: relative;
  border: 2px solid rgba(0,0,0,0.08);
}

.swatch .sw-name {
  font-size: 14px;
  font-weight: 700;
}

.swatch code {
  font-size: 11px;
  opacity: 0.9;
  font-family: 'JetBrains Mono', monospace;
}

.swatch .sw-name.dark, .swatch code.dark { color: #1a202c; }

/* Architecture Diagram */
.arch-diagram {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.arch-layer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.arch-block {
  background: #f7fafc;
  border-radius: 12px;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  min-width: 240px;
  text-align: center;
}

.arch-block.primary { background: linear-gradient(135deg, #3F8E47 0%, #1B8A35 100%); color: #fff; border-color: #1B8A35; }
.arch-block.primary-dark { background: linear-gradient(135deg, #1B8A35 0%, #0c1f3a 100%); color: #fff; border-color: #0c1f3a; }
.arch-block.accent { background: linear-gradient(135deg, #7ED957 0%, #5DBB63 100%); color: #1B8A35; border-color: #5DBB63; }
.arch-block.resource { background: #f7fafc; }

.arch-block-title { font-weight: 900; font-size: 15px; margin-bottom: 2px; }
.arch-block-sub { font-size: 11px; opacity: 0.85; font-family: 'JetBrains Mono', monospace; }
.arch-block-detail { font-size: 11px; margin-top: 6px; opacity: 0.85; }

.arch-arrow {
  color: #4a5568;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  background: #f7fafc;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
}

.arch-resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 700px) {
  .arch-resources { grid-template-columns: 1fr; }
}

/* Schema Tables */
.schema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 0 16px;
}

.schema-table {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  font-size: 12px;
}

.schema-head {
  background: linear-gradient(135deg, #3F8E47 0%, #1B8A35 100%);
  color: #fff;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 13px;
}

.schema-row {
  padding: 6px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #4a5568;
}
.schema-row:last-child { border-bottom: none; }
.schema-row code {
  color: #3F8E47;
  font-weight: 700;
}

/* Checklist */
.checklist {
  background: #fff;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  overflow: hidden;
}

.check-row {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}
.check-row:last-child { border-bottom: none; }

.check-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}

.check-row.done { background: linear-gradient(90deg, #f0fff4 0%, transparent 100%); }
.check-row.done .check-mark { background: #48bb78; color: #fff; }
.check-row.todo { background: linear-gradient(90deg, #F4FFEF 0%, transparent 100%); }
.check-row.todo .check-mark { background: #ed8936; color: #fff; }

.check-row strong {
  display: block;
  color: #1B8A35;
  margin-bottom: 2px;
  font-size: 14px;
}
.check-row > div {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
}

/* Verified Facts */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.fact-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 2px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(26,32,44,0.1);
}

.fact-card.highlight {
  background: linear-gradient(180deg, #fff8dc 0%, #E8FAE0 100%);
  border-color: #5DBB63;
}

.fact-label {
  font-size: 11px;
  font-weight: 700;
  color: #7ED957;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  padding: 2px 10px;
  background: #1B8A35;
  border-radius: 999px;
  display: inline-block;
}

.fact-card.highlight .fact-label {
  background: #c05621;
  color: #fff;
}

.fact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #2d3748;
  line-height: 1.7;
}

.fact-list li {
  padding-left: 14px;
  position: relative;
  margin-bottom: 2px;
}

.fact-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: #7ED957;
  font-size: 8px;
  top: 6px;
}

.fact-list strong {
  color: #1B8A35;
}

.fact-list a {
  color: #3F8E47;
  text-decoration: underline;
}

.sources-block {
  margin-top: 20px;
  padding: 14px 18px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e0;
  font-size: 12px;
  color: #4a5568;
  line-height: 1.9;
}

.sources-block strong {
  display: block;
  color: #1B8A35;
  margin-bottom: 6px;
  font-size: 13px;
}

.sources-block a {
  color: #3F8E47;
  text-decoration: underline;
  margin: 0 4px;
}

.sources-block a:hover { color: #1B8A35; }

/* Footer */
.preview-footer {
  background: #1B8A35;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px;
  font-size: 12px;
}
.preview-footer p { margin: 4px 0; }
.preview-footer strong { color: #7ED957; }
