:root {
  --container-max: 1280px;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #eef0f4;
  --text: #181a1f;
  --text-muted: #5a6170;
  --border: #e1e4eb;
  --accent: #ff6b2b;
  --accent-hover: #e85a1c;
  --accent-soft: #fff1ea;
  --accent-border: #ffc9ad;
  --accent-text: #b83d08;
  --danger: #d93025;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 56px;
}

.header-inner {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 600;
}

/* Workbench */
.workbench-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.workbench {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 20px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 56px);
}

/* Left/Center Canvas Area */
.canvas-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

.canvas-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 34px;
}

.canvas-hint {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 5px 13px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 6px rgba(255, 107, 43, 0.08);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  min-width: 0;
}

.canvas-hint::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 43, 0.22);
}

.canvas-hint.is-editing {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.canvas-hint.is-editing::before {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.canvas-top-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.photo-counter {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.btn-clear-top {
  display: none;
  border: 1px solid #f3d0cd;
  background: #ffffff;
  color: var(--danger);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-clear-top[hidden] {
  display: none !important;
}

.stage-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 320px;
}

/* Empty Dropzone */
.dropzone {
  width: 100%;
  max-width: 480px;
  padding: 40px 24px;
  border: 2px dashed #cbd2df;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--accent);
}

.dropzone-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
}

.dropzone-sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dropzone-badge {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Collage Stage */
.collage-stage {
  position: relative;
  box-shadow: var(--shadow-md);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overflow: hidden;
  transition: background-color 0.15s;
}

.collage-stage.is-dragover {
  outline: 3px dashed var(--accent);
  outline-offset: 6px;
}

.collage-slot {
  position: absolute;
  overflow: hidden;
  background: #e5e7eb;
  cursor: grab;
  touch-action: none;
}

.collage-slot img {
  position: absolute;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
}

.collage-slot.is-selected {
  outline: 2.5px solid var(--accent);
  outline-offset: -2.5px;
  z-index: 5;
  cursor: move;
}

.collage-slot.is-dragging-src {
  opacity: 0.35;
}

.collage-slot.is-drop-target {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  z-index: 6;
}

.drag-ghost {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(1.03);
}

.drag-ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Floating Add Photos Button inside stage-wrap */
.fab-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s, background 0.15s;
}

.fab-add:hover {
  background: #2f3440;
  transform: translateY(-1px);
}

.fab-add[hidden] {
  display: none;
}

/* Single Photo Edit Bar */
.photo-editor-bar {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  z-index: 15;
}

.photo-editor-bar[hidden] {
  display: none;
}

.editor-zoom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.editor-zoom input[type="range"] {
  width: 116px;
  accent-color: var(--accent);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-chip:hover {
  background: var(--surface-muted);
}

.btn-chip.danger {
  color: var(--danger);
  border-color: #f3d0cd;
}

.btn-chip.danger:hover {
  background: #fdeceb;
}

.btn-chip.done {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

/* Right Control Panel (Desktop) */
.controls-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  gap: 16px;
}

.panel-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.ratio-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ratio-btn {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.ratio-btn:hover {
  border-color: #b7bfcf;
  background: #ffffff;
}

.ratio-btn.active {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

.dynamic-panel {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
}

.panel-pane[hidden] {
  display: none;
}

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

.layout-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.layout-card:hover {
  border-color: #b7bfcf;
}

.layout-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.layout-card svg {
  width: 48px;
  height: 48px;
  display: block;
}

.layout-card span {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.layout-card.active span {
  color: var(--accent-hover);
}

.layout-empty-note {
  padding: 20px 12px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: var(--radius-md);
}

/* Border Controls */
.control-group {
  margin-bottom: 14px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.preset-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.preset-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.slider-val {
  min-width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-weight: 600;
}

.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--accent);
}

.color-picker-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px dashed #9aa3b2;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background: conic-gradient(#ff6b2b, #ffd166, #06d6a0, #118ab2, #9b5de5, #ff6b2b);
}

.color-picker-wrap input[type="color"] {
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  padding: 0;
}

/* Panel Footer */
.panel-footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface-muted);
  padding: 4px;
  border-radius: 10px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.export-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-toggle {
  display: inline-flex;
  background: var(--surface-muted);
  padding: 3px;
  border-radius: 999px;
  flex-shrink: 0;
}

.format-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.format-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-save {
  flex: 1;
}

.utility-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-text:hover {
  color: var(--danger);
}

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  max-width: calc(100vw - 32px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
}

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

/* AdSense Safe Slots (Ready for post-approval activation) */
.ad-wrapper {
  max-width: var(--container-max);
  margin: 40px auto;
  padding: 0 20px;
}

.ad-slot {
  width: 100%;
  min-height: 100px;
  background: transparent;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
}

.ad-slot--sidebar {
  min-height: 280px;
  position: sticky;
  top: 76px;
}

.ad-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a93a6;
  margin-bottom: 6px;
}

/* =========================================================
   UNIFIED 1280px CONTENT SHELL (Aligned with Workbench)
   ========================================================= */
.content-shell {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px 20px 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.content-shell:has(.content-sidebar) {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.content-main,
.content-sidebar {
  min-width: 0;
}

/* SEO Intro & Editorial Blocks */
.hero-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 44px;
}

.hero-intro h1 {
  margin: 0 0 12px;
  font-size: 1.75rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero-intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* 同步放开正文各小节导语的 80ch/84ch 限宽，保持全站对齐一致 */
.content-block > p {
  max-width: none !important;
}

.content-block {
  margin-bottom: 44px;
}

.content-block h2 {
  font-size: 1.45rem;
  margin: 0 0 18px;
  line-height: 1.35;
}

.content-block h3 {
  font-size: 1.04rem;
  margin: 0 0 8px;
}

/* Showcase Section (Static Self-Hosted Examples) */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
}

.section-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
}

.section-sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 460px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.showcase-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.showcase-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.showcase-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.showcase-arrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.showcase-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.showcase-meta h3 {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.25;
}

.showcase-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.showcase-preview-stage {
  margin: 0;
  background: #edf0f5;
  border-radius: 12px;
  padding: 16px;
  height: 292px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-sample-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease;
}

.showcase-card:hover .showcase-sample-img {
  transform: scale(1.02);
}

.showcase-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.showcase-tip {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.showcase-cta {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

/* Feature, Steps & Use-Case Grids */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.usecase-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Reference Spec Tables (Aspect Ratios & Print Sizes) */
.spec-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.spec-table th {
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

/* Always-Visible FAQ Grid (No Accordion) */
.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: stretch;
}

.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.faq-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--text);
}

.faq-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* Legal / Info Static Pages */
.article-page {
  max-width: 820px;
  margin: 36px auto 64px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.article-page h1 {
  margin: 0 0 8px;
  font-size: 1.85rem;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.article-page h2 {
  font-size: 1.22rem;
  margin: 28px 0 10px;
}

.article-page p,
.article-page li {
  color: #373d49;
  font-size: 0.96rem;
}

.article-page ul {
  padding-left: 20px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* Tablet Breakpoint */
@media (max-width: 1100px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usecase-list {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE H5 APP LAYOUT (<= 959px)
   ========================================================= */
@media (max-width: 959px) {
  .site-header {
    height: 48px;
  }

  .header-inner {
    padding: 0 14px;
    gap: 10px;
  }

  .brand {
    font-size: 0.95rem;
    gap: 7px;
  }

  .brand-icon {
    width: 24px;
    height: 24px;
  }

  .header-nav {
    gap: 12px;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .nav-link--desktop-only {
    display: none;
  }

  .workbench {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    min-height: calc(100dvh - 48px);
    background: var(--bg);
  }

  .canvas-area {
    flex: 1 1 auto;
    min-height: 42dvh;
    border: none;
    border-radius: 0;
    padding: 8px 12px 10px;
    background: var(--bg);
  }

  .canvas-top-bar {
    margin-bottom: 8px;
    min-height: 30px;
    gap: 8px;
  }

  .canvas-hint {
    font-size: 0.76rem;
    padding: 4px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .photo-counter {
    font-size: 0.74rem;
    padding: 3px 8px;
  }

  .btn-clear-top {
    display: inline-flex;
    align-items: center;
  }

  .stage-wrap {
    min-height: 210px;
  }

  .dropzone {
    padding: 24px 16px;
    border-radius: 14px;
  }

  .dropzone-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
  }

  .dropzone-title {
    font-size: 1.02rem;
  }

  .dropzone-sub {
    font-size: 0.82rem;
    margin-bottom: 14px;
  }

  .dropzone-badge {
    font-size: 0.74rem;
    margin-top: 10px;
  }

  .fab-add {
    right: 4px;
    bottom: 4px;
    padding: 8px 13px;
    font-size: 0.78rem;
  }

  .photo-editor-bar {
    margin-top: 8px;
    padding: 8px 10px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .editor-zoom {
    width: 100%;
    font-size: 0.8rem;
  }

  .editor-zoom input[type="range"] {
    flex: 1;
    width: auto;
  }

  .editor-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .btn-chip {
    padding: 7px 4px;
    font-size: 0.76rem;
    text-align: center;
    white-space: nowrap;
  }

  .controls-panel {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 30;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 10px;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .panel-label {
    display: none;
  }

  .ratio-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 2px 16px 2px 0;
    mask-image: linear-gradient(to right, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
  }

  .ratio-strip::-webkit-scrollbar {
    display: none;
  }

  .ratio-btn {
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
  }

  .dynamic-panel {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .layout-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0;
  }

  .layout-grid::-webkit-scrollbar {
    display: none;
  }

  .layout-card {
    flex: 0 0 72px;
    padding: 7px 4px;
    gap: 4px;
    border-radius: 10px;
  }

  .layout-card svg {
    width: 36px;
    height: 36px;
  }

  .layout-card span {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .layout-empty-note {
    width: 100%;
    padding: 12px 10px;
    font-size: 0.8rem;
  }

  .control-group {
    margin-bottom: 10px;
  }

  .preset-row {
    gap: 6px;
    margin-bottom: 8px;
  }

  .preset-btn {
    padding: 6px 4px;
    font-size: 0.76rem;
  }

  .slider-row {
    font-size: 0.78rem;
    margin-bottom: 6px;
  }

  .swatch-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px;
  }

  .swatch-grid::-webkit-scrollbar {
    display: none;
  }

  .color-swatch,
  .color-picker-wrap {
    width: 26px;
    height: 26px;
  }

  .panel-footer {
    border-top: 1px solid var(--border);
    padding-top: 9px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .tab-bar {
    flex: 0 0 auto;
    gap: 4px;
    padding: 3px;
  }

  .tab-btn {
    padding: 7px 11px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .export-row {
    flex: 1;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
  }

  .format-btn {
    padding: 6px 8px;
    font-size: 0.74rem;
  }

  .btn-save {
    flex: 0 1 auto;
    min-width: 78px;
    padding: 9px 16px;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .utility-row {
    display: none;
  }

  /* Below-the-fold Mobile */
  .content-shell,
  .content-shell:has(.content-sidebar) {
    grid-template-columns: 1fr;
    padding: 24px 14px 48px;
    gap: 24px;
  }

  .content-sidebar {
    display: none;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .showcase-preview-stage {
    height: 256px;
  }

  .hero-intro {
    padding: 20px 16px;
    margin-bottom: 28px;
  }

  .hero-intro h1 {
    font-size: 1.38rem;
  }

  .hero-intro p {
    font-size: 0.92rem;
  }

  .content-block {
    margin-bottom: 30px;
  }

  .content-block h2,
  .section-head h2 {
    font-size: 1.24rem;
  }

  .feature-grid,
  .steps-grid,
  .usecase-list,
  .faq-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card,
  .faq-card {
    padding: 16px;
  }

  .faq-card h3 {
    font-size: 0.96rem;
  }

  .article-page {
    margin: 14px 12px 36px;
    padding: 20px 16px;
  }

  .article-page h1 {
    font-size: 1.45rem;
  }

  .site-footer {
    padding: 24px 14px calc(24px + env(safe-area-inset-bottom));
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-links {
    gap: 14px;
  }

  .toast {
    bottom: 84px;
  }
}

@media (max-width: 375px) {
  .brand {
    font-size: 0.88rem;
  }

  .nav-link {
    font-size: 0.74rem;
  }

  .tab-btn {
    padding: 6px 8px;
    font-size: 0.76rem;
  }

  .format-btn {
    padding: 5px 6px;
    font-size: 0.7rem;
  }

  .btn-save {
    min-width: 66px;
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}