/* ==========================================================================
   z0Gravity Dual-App Demo - / Sketch Wireframe Stylesheet
   Art Style: Rough Sketch / Notebook Paper / Architectural Doodle
   ========================================================================== */

:root {
  --ink-black: #181c24;
  --ink-blue: #1565c0;
  --ink-purple: #6a1b9a;
  --ink-green: #2e7d32;
  --ink-red: #c62828;
  --ink-muted: #5c6779;

  --paper-bg: #faf7f0;
  --paper-card: #ffffff;
  --paper-yellow-sticky: #fef9c3;
  --paper-blue-sticky: #e0f2fe;

  --line-grid: rgba(203, 195, 179, 0.45);

  --font-hand: 'Patrick Hand', cursive, sans-serif;
  --font-cursive: 'Caveat', cursive, sans-serif;
  --font-ui: 'Comic Neue', cursive, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* wobbly border */
  --wobbly-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobbly-border: 2px solid var(--ink-black);
  --hard-shadow: 3px 3px 0px var(--ink-black);
  --hard-shadow-sm: 2px 2px 0px var(--ink-black);
  --hard-shadow-lg: 5px 5px 0px var(--ink-black);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background-color: #2b323c;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink-black);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

.sketch-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* SIDEBAR SKETCH PANEL */
.sketch-sidebar {
  width: 480px;
  background-color: #f7f4ea;
  background-image:
    radial-gradient(#d3cbb7 1.2px, transparent 1.2px),
    radial-gradient(#d3cbb7 1.2px, #f7f4ea 1.2px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  border-right: 3px solid var(--ink-black);
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
  overflow-y: auto;
  max-height: 100vh;
}

.hand-sticker {
  display: inline-block;
  background: #fde047;
  color: #854d0e;
  font-family: var(--font-hand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border: 2px dashed #a16207;
  border-radius: var(--wobbly-radius);
  margin-bottom: 8px;
  transform: rotate(-1.5deg);
}

.hand-title {
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-black);
  line-height: 1.15;
  margin-bottom: 6px;
}

.hand-subtitle {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* SKETCH CARD BOX */
.sketch-card {
  background: #ffffff;
  border: var(--wobbly-border);
  border-radius: var(--wobbly-radius);
  box-shadow: var(--hard-shadow);
  padding: 16px;
}

.card-heading {
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--ink-black);
  margin-bottom: 4px;
}

.card-note {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.btn-doodle-small {
  font-family: var(--font-hand);
  background: #f1f5f9;
  border: 1.5px solid var(--ink-black);
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 1px 1px 0px var(--ink-black);
  transition: all 0.1s;
}

.btn-doodle-small:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

/* SCENARIO CARDS */
.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doodle-card {
  background: #fafafa;
  border: 2px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: var(--hard-shadow-sm);
  transition: all 0.15s ease;
}

.doodle-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--hard-shadow);
  background: #ffffff;
}

.doodle-card.active {
  background: #eff6ff;
  border-color: var(--ink-blue);
  box-shadow: 3px 3px 0px var(--ink-blue);
}

.doodle-badge {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  margin-bottom: 4px;
}

.doodle-badge.legacy {
  color: var(--ink-green);
  background: #dcfce7;
}

.doodle-badge.light {
  color: var(--ink-purple);
  background: #f3e8ff;
}

.doodle-badge.multi {
  color: #b45309;
  background: #fef3c7;
}

.doodle-email {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-black);
  margin-bottom: 4px;
}

.doodle-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* TERMINAL / LOGS */
.sketch-terminal {
  background: #181c24;
  color: #86efac;
  border: 2px solid var(--ink-black);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.terminal-idle {
  color: #94a3b8;
  font-style: italic;
  padding: 16px;
  text-align: center;
}

.terminal-entry {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #334155;
  animation: doodlePop 0.2s ease-out;
}

.terminal-tag-req {
  color: #38bdf8;
  font-weight: 700;
}

.terminal-tag-res {
  color: #f472b6;
  font-weight: 700;
}

.terminal-json {
  background: #0f172a;
  padding: 6px;
  border-radius: 4px;
  margin-top: 4px;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* STICKY NOTE */
.doodle-sticky-note {
  background: var(--paper-yellow-sticky);
  border: 2px solid #ca8a04;
  border-radius: 2px;
  padding: 16px;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
  position: relative;
  transform: rotate(-1deg);
}

.tape-strip {
  width: 70px;
  height: 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(0, 0, 0, 0.2);
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.note-title {
  font-family: var(--font-cursive);
  font-size: 20px;
  font-weight: 700;
  color: #854d0e;
  margin-bottom: 4px;
}

.note-body {
  font-family: var(--font-hand);
  font-size: 15px;
  color: #713f12;
  line-height: 1.35;
}

/* ==========================================================================
   PHONE STAGE & DEVICE MOCKUP
   ========================================================================== */

.sketch-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.phone-hand-frame {
  width: 390px;
  height: 800px;
  background: #ffffff;
  border: 4px solid var(--ink-black);
  border-radius: 44px;
  box-shadow:
    8px 8px 0px var(--ink-black),
    16px 16px 0px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-hand-notch {
  width: 130px;
  height: 22px;
  background: var(--ink-black);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 1000;
}

.phone-hand-screen {
  flex: 1;
  background-color: var(--paper-bg);
  background-image:
    linear-gradient(var(--line-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-grid) 1px, transparent 1px);
  background-size: 18px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* STATUS BAR */
.hand-status-bar {
  height: 44px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-hand);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-black);
  z-index: 200;
  border-bottom: 1.5px dashed rgba(0, 0, 0, 0.15);
}

.status-battery {
  display: flex;
  align-items: center;
}

.battery-bar {
  width: 22px;
  height: 11px;
  border: 2px solid var(--ink-black);
  border-radius: 3px;
  position: relative;
  background: #ffffff;
}

.battery-bar::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 1px;
  bottom: 1px;
  width: 65%;
  background: var(--ink-black);
}

.battery-nub {
  width: 2px;
  height: 5px;
  background: var(--ink-black);
  margin-right: -2px;
  z-index: 2;
}

/* CONTENT VIEWPORT */
.phone-content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

.hand-screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow: hidden;
}

.hand-screen.active {
  display: flex;
  opacity: 1;
}

/* ==========================================================================
   SCREEN 1: GATEWAY SIGN IN SCREEN (DOODLE STYLE)
   ========================================================================== */

.login-doodle-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  overflow-y: auto;
}

.logo-sketch-box {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.logo-icon-drawn {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border: 3px solid var(--ink-blue);
  border-radius: var(--wobbly-radius);
  background: #e0f2fe;
  font-family: var(--font-hand);
  font-size: 34px;
  font-weight: 700;
  color: var(--ink-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0px var(--ink-blue);
  transform: rotate(-3deg);
}

.logo-text-drawn {
  font-family: var(--font-hand);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink-blue);
  letter-spacing: -0.5px;
}

.logo-sub-drawn {
  font-family: var(--font-cursive);
  font-size: 16px;
  color: var(--ink-muted);
}

.hand-card {
  background: #ffffff;
  border: 2px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  box-shadow: var(--hard-shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
  position: relative;
}

.step-ribbon {
  display: inline-block;
  background: #dbeafe;
  color: var(--ink-blue);
  font-family: var(--font-hand);
  font-size: 13.5px;
  font-weight: 700;
  padding: 3px 10px;
  border: 1.5px solid var(--ink-blue);
  border-radius: 999px;
  margin-bottom: 14px;
}

.input-group {
  margin-bottom: 14px;
}

.hand-label {
  display: block;
  font-family: var(--font-hand);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-black);
  margin-bottom: 4px;
}

.hand-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 10px;
  font-size: 15px;
  pointer-events: none;
}

.hand-input {
  width: 100%;
  height: 44px;
  border: 2px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  padding: 0 32px 0 34px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink-black);
  background: #ffffff;
  outline: none;
  box-shadow: inset 1px 1px 0px rgba(0, 0, 0, 0.08);
}

.hand-input:focus {
  border-color: var(--ink-blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

.btn-hand-clear,
.btn-hand-eye {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--ink-muted);
  cursor: pointer;
}

.checkbox-hand-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.hand-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--ink-black);
  cursor: pointer;
  user-select: none;
}

.hand-checkbox input {
  display: none;
}

.checkbox-doodle {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink-black);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: transparent;
}

.hand-checkbox input:checked+.checkbox-doodle {
  background: #dbeafe;
  color: var(--ink-blue);
}

.btn-hand-primary {
  width: 100%;
  height: 46px;
  background: var(--ink-blue);
  color: #ffffff;
  border: 2px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  font-family: var(--font-hand);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: var(--hard-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.1s;
}

.btn-hand-primary:hover {
  background: #0d47a1;
}

.btn-hand-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--ink-black);
}

.btn-light-sketch {
  background: var(--ink-purple);
}

.btn-light-sketch:hover {
  background: #4a148c;
}

.btn-hand-primary.loading .btn-label {
  display: none;
}

.btn-hand-primary.loading .btn-sketch-loader {
  display: block;
}

.btn-sketch-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.quick-doodle-row {
  background: #f8fafc;
  border: 1.5px dashed var(--ink-black);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.quick-title {
  font-family: var(--font-hand);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
}

.pill-btn {
  font-family: var(--font-hand);
  background: #ffffff;
  border: 1.5px solid var(--ink-black);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 1px 1px 0px var(--ink-black);
}

.pill-btn:hover {
  background: #dbeafe;
}

.hand-footer-links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-hand);
  font-size: 14px;
}

.hand-footer-links a {
  color: var(--ink-muted);
  text-decoration: underline;
}

/* ==========================================================================
   AUTHENTICATION SCREENS (LEGACY & LIGHT)
   ========================================================================== */

.hand-top-nav {
  height: 48px;
  background: #ffffff;
  border-bottom: 2px solid var(--ink-black);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
}

.btn-hand-back {
  font-family: var(--font-hand);
  font-size: 16px;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--ink-blue);
  cursor: pointer;
}

.nav-site-meta {
  display: flex;
  flex-direction: column;
}

.site-title-hand {
  font-family: var(--font-hand);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.hand-tag {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
  width: fit-content;
}

.hand-tag.legacy {
  color: var(--ink-green);
  background: #dcfce7;
}

.hand-tag.light {
  color: var(--ink-purple);
  background: #f3e8ff;
}

.hand-scroll-body {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
}

.auth-doodle-header {
  text-align: center;
  margin-bottom: 16px;
}

.auth-icon-stamp {
  width: 50px;
  height: 50px;
  margin: 0 auto 6px;
  border: 2px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  background: #dbeafe;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--hard-shadow-sm);
  transform: rotate(2deg);
}

.auth-icon-stamp.purple {
  background: #f3e8ff;
  border-color: var(--ink-purple);
  box-shadow: 2px 2px 0px var(--ink-purple);
}

.auth-heading {
  font-family: var(--font-hand);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-black);
}

.auth-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.email-sticker {
  display: inline-block;
  background: #fef08a;
  border: 1.5px dashed #a16207;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #713f12;
  border-radius: 4px;
}

.hand-select-box {
  width: 100%;
}

.hand-select {
  width: 100%;
  height: 44px;
  border: 2px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

/* SEGMENTED TABS (LIGHT) */
.hand-tabs-segmented {
  display: flex;
  border: 2px solid var(--ink-black);
  border-radius: 8px;
  background: #e2e8f0;
  padding: 3px;
  margin-bottom: 14px;
}

.seg-btn {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  font-family: var(--font-hand);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-muted);
  border-radius: 6px;
  cursor: pointer;
}

.seg-btn.active {
  background: #ffffff;
  color: var(--ink-purple);
  border: 1.5px solid var(--ink-black);
  box-shadow: 1px 1px 0px var(--ink-black);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.panel-hint {
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 10px;
}

.otp-sketch-boxes {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.otp-box {
  width: 40px;
  height: 46px;
  border: 2px solid var(--ink-black);
  border-radius: 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  background: #ffffff;
  outline: none;
}

.otp-box:focus {
  border-color: var(--ink-purple);
  box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.2);
}

.otp-helper-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.doodle-link {
  background: transparent;
  border: none;
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-purple);
  text-decoration: underline;
  cursor: pointer;
}

.mt-2 {
  margin-top: 10px;
}

/* ==========================================================================
   INSIDE APP: PRESERVED z0GRAVITY LAYOUT IN SKETCH STYLE
   ========================================================================= */

.hand-app-topbar {
  height: 52px;
  background: var(--ink-blue);
  border-bottom: 2px solid var(--ink-black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #ffffff;
  z-index: 100;
}

.hand-app-topbar.light-theme {
  background: #1e3a8a;
}

.topbar-doodle-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  position: relative;
}

.doodle-red-dot {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  border: 1px solid #ffffff;
}

.doodle-purple-dot {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: #c084fc;
  border-radius: 50%;
  border: 1px solid #ffffff;
}

.topbar-logo-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-logo-name {
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-light-doodle {
  background: #f59e0b;
  color: var(--ink-black);
  border: 1.5px solid var(--ink-black);
  border-radius: 4px;
  font-family: var(--font-hand);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
}

.topbar-doodle-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hand-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink-blue);
  border: 2px solid var(--ink-black);
  font-family: var(--font-hand);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hand-avatar.light {
  background: var(--ink-purple);
  color: #ffffff;
  border-color: #ffffff;
}

.hand-site-ribbon {
  background: #f1f5f9;
  border-bottom: 1.5px dashed var(--ink-black);
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-black);
}

.hand-site-ribbon.light-bg {
  background: #f3e8ff;
}

.hand-badge-sub {
  font-family: var(--font-hand);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.hand-badge-sub.legacy {
  color: var(--ink-green);
  background: #ffffff;
}

.hand-badge-sub.light {
  color: var(--ink-purple);
  background: #ffffff;
}

.btn-switch-doodle {
  background: #ffffff;
  border: 1.5px solid var(--ink-purple);
  color: var(--ink-purple);
  font-family: var(--font-hand);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 1px 1px 0px var(--ink-purple);
}

.btn-switch-doodle:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.hand-callout-box {
  background: #fef9c3;
  border: 1.5px dashed #ca8a04;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-hand);
  font-size: 13.5px;
  color: #854d0e;
  line-height: 1.35;
  margin-bottom: 10px;
}

/* SUB TABS */
.hand-subtabs-row {
  background: #ffffff;
  display: flex;
  border-bottom: 2px solid var(--ink-black);
}

.hand-subtab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-family: var(--font-hand);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  position: relative;
}

.hand-subtab.active {
  color: var(--ink-blue);
  background: #f0f9ff;
}

.hand-subtab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--ink-blue);
  border-radius: 2px;
}

/* PROJECT CARDS (VẼ TAY VỚI PROJECT NAME: Here is project <001>) */
.hand-projects-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doodle-project-card {
  background: #ffffff;
  border: 2px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  box-shadow: var(--hard-shadow);
  padding: 14px;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.proj-code-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-blue);
}

.proj-code-badge.purple {
  color: var(--ink-purple);
}

.weather-star-box {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
}

.star-doodle.active {
  color: #eab308;
}

.proj-title-hand {
  font-family: var(--font-hand);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-black);
  margin-bottom: 6px;
  line-height: 1.25;
}

.proj-meta-hand {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.doodle-progress-wrap {
  margin-bottom: 8px;
}

.doodle-progress-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-hand);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-black);
  margin-bottom: 2px;
}

.doodle-progress-track {
  width: 100%;
  height: 10px;
  background: #f1f5f9;
  border: 1.5px solid var(--ink-black);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.doodle-progress-fill {
  height: 100%;
  background: #4ade80;
  border-right: 1.5px solid var(--ink-black);
}

.doodle-progress-fill.purple {
  background: #c084fc;
}

.doodle-milestones-row {
  display: flex;
  gap: 6px;
  border-top: 1.5px dashed var(--ink-black);
  padding-top: 6px;
  font-family: var(--font-hand);
  font-size: 12px;
  flex-wrap: wrap;
}

.doodle-ms-tag {
  background: #f8fafc;
  border: 1px solid var(--ink-black);
  border-radius: 4px;
  padding: 1px 6px;
}

.doodle-ms-tag.done {
  background: #dcfce7;
  color: var(--ink-green);
}

.doodle-ms-tag.progress {
  background: #dbeafe;
  color: var(--ink-blue);
}

/* BOTTOM NAVIGATION */
.hand-bottom-bar {
  height: 54px;
  background: #ffffff;
  border-top: 2px solid var(--ink-black);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.hand-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink-muted);
  cursor: pointer;
}

.hand-nav-item.active {
  color: var(--ink-blue);
}

.nav-ico {
  font-size: 16px;
}

.nav-txt {
  font-family: var(--font-hand);
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   MODAL: SELECT SITE (TÁI HIỆN SELECTSITE.JS DẠNG VẼ TAY)
   ========================================================================== */

.modal-doodle-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-doodle-overlay.active {
  display: flex;
  animation: doodlePop 0.2s ease;
}

.modal-doodle-paper {
  width: 100%;
  background: #ffffff;
  border: 3px solid var(--ink-black);
  border-radius: var(--wobbly-radius);
  box-shadow: 6px 6px 0px var(--ink-black);
  padding: 18px 16px;
  position: relative;
}

.pin-tack {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

.modal-doodle-title {
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--ink-black);
  margin-top: 6px;
}

.modal-doodle-sub {
  font-size: 13px;
  text-align: center;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.modal-site-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.doodle-site-choice {
  background: #fafafa;
  border: 2px solid var(--ink-black);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--ink-black);
}

.doodle-site-choice:hover {
  background: #f0f9ff;
  transform: translate(-1px, -1px);
}

.choice-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-icon {
  font-size: 20px;
}

.choice-name {
  font-family: var(--font-hand);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-black);
}

.choice-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.btn-doodle-cancel {
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--font-hand);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 6px 0;
}

.btn-doodle-cancel:hover {
  color: var(--ink-black);
}

/* TOAST */
.doodle-toast {
  position: absolute;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-black);
  color: #ffffff;
  padding: 6px 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  font-family: var(--font-hand);
  font-size: 14px;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes doodlePop {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .sketch-wrapper {
    flex-direction: column;
  }

  .sketch-sidebar {
    width: 100%;
    max-height: none;
  }
}