/* ===== Shared wireframe styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Kalam:wght@300;400;700&family=Shippori+Mincho:wght@500;700&family=Zen+Kurenaido&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --ink: #1a1a1a;
  --paper: #fafaf6;
  --paper-2: #f2f0e8;
  --line: #1a1a1a;
  --muted: #8a8780;
  --accent-1: #ff5c3a;   /* warm red */
  --accent-2: #3b6cff;   /* blue */
  --accent-3: #ffd84a;   /* yellow */
  --accent-4: #2fbf71;   /* green */
  --accent-5: #c36bff;   /* purple */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Kalam', 'Zen Kurenaido', sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.hand { font-family: 'Caveat', cursive; }
.mono { font-family: 'JetBrains Mono', monospace; }
.jp   { font-family: 'Zen Kurenaido', 'Kalam', sans-serif; }
.mincho { font-family: 'Shippori Mincho', serif; }

/* ---- sketchy borders ---- */
.wf-box {
  border: 2px solid var(--line);
  border-radius: 6px 14px 8px 18px / 12px 8px 16px 10px;
  background: var(--paper);
  position: relative;
}
.wf-box.dashed { border-style: dashed; }
.wf-box.thick { border-width: 3px; }

.wf-img {
  border: 2px solid var(--line);
  border-radius: 8px 4px 10px 6px / 6px 12px 4px 10px;
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(0,0,0,.06) 8px 9px),
    var(--paper-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-align: center;
  padding: 6px;
  position: relative;
  overflow: hidden;
}
.wf-img::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px dashed var(--muted);
  border-radius: inherit;
  opacity: .5;
}
.wf-img span { position: relative; z-index: 1; background: rgba(250,250,246,.7); padding: 2px 6px; border-radius: 3px; }

/* text placeholders */
.lorem {
  display: block;
  height: 6px;
  background: var(--ink);
  border-radius: 3px;
  margin: 6px 0;
  opacity: .75;
}
.lorem.short { width: 40%; }
.lorem.mid { width: 70%; }
.lorem.long { width: 95%; }
.lorem.thin { height: 3px; opacity: .5; }

/* annotation callouts */
.note {
  font-family: 'Caveat', cursive;
  color: var(--accent-1);
  font-size: 16px;
  line-height: 1.1;
  position: relative;
  padding-left: 18px;
}
.note::before {
  content: "✦";
  position: absolute; left: 0; top: -2px;
  color: var(--accent-1);
}

.arrow-note {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: var(--accent-2);
  pointer-events: none;
  z-index: 20;
}
.arrow-note svg { display: block; }

/* tag chip */
.chip {
  display: inline-block;
  border: 1.5px solid var(--line);
  padding: 2px 8px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--paper);
  transform: rotate(-1deg);
}
.chip.c1 { background: var(--accent-3); }
.chip.c2 { background: #c9e0ff; }
.chip.c3 { background: #ffd5cb; }
.chip.c4 { background: #d8f5e3; }

/* scribble underline */
.scribble {
  position: relative;
  display: inline-block;
}
.scribble::after {
  content: "";
  position: absolute; left: -4px; right: -4px; bottom: -6px;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'><path d='M0,5 Q15,1 30,4 T60,4 T100,4' stroke='%23ff5c3a' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
}
.scribble.blue::after { filter: hue-rotate(180deg); }

/* rotate helpers */
.r-1 { transform: rotate(-1deg); }
.r1 { transform: rotate(1deg); }
.r-2 { transform: rotate(-2deg); }
.r2 { transform: rotate(2deg); }

/* page frame (device/browser shell) */
.frame {
  width: 100%;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 6px 6px 0 var(--ink);
}
.frame-bar {
  height: 28px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px;
  border-bottom: 2px solid var(--line);
  background: var(--paper-2);
}
.frame-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--line);
}
.frame-bar .url {
  margin-left: 12px;
  flex: 1;
  height: 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  display: flex; align-items: center; padding: 0 8px;
  color: var(--muted);
}

.frame-body {
  padding: 0;
  overflow: hidden;
}

/* layout grid for canvas */
.canvas {
  padding: 48px 32px;
  max-width: 1600px;
  margin: 0 auto;
}
.canvas h1.title {
  font-family: 'Caveat', cursive;
  font-size: 56px;
  margin: 0 0 4px;
  font-weight: 700;
}
.canvas p.subtitle {
  font-family: 'Kalam', cursive;
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 700px;
}

.wf-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.wf-header .num {
  font-family: 'Caveat', cursive;
  font-size: 36px;
  color: var(--accent-1);
  font-weight: 700;
}
.wf-header .name {
  font-family: 'Caveat', cursive;
  font-size: 32px;
  font-weight: 700;
}
.wf-header .desc {
  font-family: 'Kalam', cursive;
  font-size: 14px;
  color: var(--muted);
}

/* tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: var(--paper);
  padding: 12px 0;
  z-index: 50;
  border-bottom: 1px dashed var(--line);
}
.tab {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  border: 2px solid var(--line);
  background: var(--paper);
  padding: 4px 14px 2px;
  border-radius: 10px 16px 8px 14px / 12px 10px 14px 8px;
  cursor: pointer;
  transform: rotate(-0.8deg);
  transition: transform .15s ease, background .15s ease;
}
.tab:nth-child(even) { transform: rotate(0.8deg); }
.tab:hover { transform: rotate(0) scale(1.03); }
.tab.active {
  background: var(--accent-3);
  box-shadow: 3px 3px 0 var(--ink);
}

/* page sections marker */
.section-label {
  position: absolute;
  left: -2px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 0 6px 6px 0;
  z-index: 5;
}

/* generic stacked pages */
.page {
  position: relative;
  border-bottom: 2px dashed var(--line);
  padding: 24px;
}
.page:last-child { border-bottom: none; }

/* mini service icon box */
.ico {
  width: 36px; height: 36px;
  border: 2px solid var(--line);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Caveat', cursive;
  font-weight: 700;
}

/* bottom "next steps" */
.next-steps {
  margin-top: 48px;
  padding: 20px 24px;
  border: 2px dashed var(--accent-2);
  border-radius: 10px;
  background: #eef4ff;
  font-family: 'Kalam', cursive;
}
.next-steps h3 {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  margin: 0 0 8px;
}
.next-steps ul { margin: 0; padding-left: 22px; }

/* tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 260px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 14px 16px;
  font-family: 'Kalam', cursive;
  z-index: 200;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  margin: 0 0 8px;
  font-family: 'Caveat', cursive;
  font-size: 22px;
}
.tweaks-panel label { display:block; margin-bottom:10px; font-size: 13px; }
.tweaks-panel select, .tweaks-panel input[type=range] {
  width: 100%; margin-top: 4px;
}

/* keyboard hint */
kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  padding: 1px 5px;
  border-radius: 4px;
}
