/*! © 2026 Dr. Oluwaseun Ogunmola · Dr. Ogunmola GameLabs · All rights reserved. Free to play at https://gamelabs.ogunmola.com.ng · Not licensed for re-hosting, copying or reuse. Terms: https://gamelabs.ogunmola.com.ng/terms/ · ref GL-PICASSO-C5R4 */
/* Picasso Studio visual styles: warm art-atelier palette, full-width easel, big tactile swatches,
   mobile-first tool docks, Cubist workbench, museum gallery wall & reduced-motion compliance. */

body {
  --accent: #FF8C42;
  --accent-deep: #D95B16;
  --bg1: #FFF1DC;
  --bg2: #FFFDF8;
  --studio-blue: #1D5FD6;
  --studio-teal: #00A8A8;
  --studio-card: #FFFFFF;
}

.kk-screen { max-width: 1080px; }
.kk-play-head { margin-bottom: 8px; }

/* Studio Shell */
.ps-shell { display: grid; gap: 10px; }

/* Pipo Guide Strip */
.ps-pipo-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid #F2DFC4; border-radius: 18px;
  padding: 8px 12px; box-shadow: 0 3px 0 #F2DFC4;
}
.ps-pipo-avatar {
  width: 48px; height: 44px; flex: none; cursor: pointer;
  border: 0; background: none; padding: 0; border-radius: 12px;
}
.ps-pipo-avatar svg { width: 100%; height: 100%; display: block; }
.ps-pipo-msg { margin: 0; font-size: .92rem; font-weight: 500; color: var(--ink); flex: 1; }
.ps-pipo-msg b { color: var(--accent-deep); }

/* Filter tabs / shelf pills */
.ps-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px;
}
.ps-tab {
  appearance: none; border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .875rem;
  cursor: pointer; min-height: 40px; transition: background .15s, border-color .15s, transform .12s;
}
.ps-tab:hover { border-color: var(--accent); transform: translateY(-1px); }
.ps-tab.sel { background: var(--accent); border-color: var(--accent-deep); color: #fff; }

/* Picture / Drawing Picker Grid */
.ps-pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.ps-thumb-card {
  appearance: none; border: 2px solid var(--line); background: #fff; border-radius: 18px;
  padding: 10px; cursor: pointer; text-align: center; display: grid; gap: 6px;
  box-shadow: 0 3px 0 var(--line); transition: transform .15s, border-color .15s;
}
.ps-thumb-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.ps-thumb-card svg {
  width: 100%; aspect-ratio: 4 / 3; background: #FFFDF8; border-radius: 12px;
  border: 1px solid #EEF1F6; display: block;
}
.ps-thumb-title { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--ink); }
.ps-thumb-sub { font-size: .78rem; color: var(--ink-soft); }

/* Studio Workspace Layout */
.ps-workspace {
  display: grid; gap: 10px;
}
@media (min-width: 860px) {
  .ps-workspace.with-side {
    grid-template-columns: 1fr 270px; align-items: start;
  }
}

/* Easel / Canvas Frame */
.ps-easel-wrap {
  background: #fff; border-radius: 22px; padding: 10px;
  border: 3px solid #EBDAC3; box-shadow: 0 8px 28px -14px rgba(16, 45, 90, .28);
}
.ps-easel {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 14px; overflow: hidden; background: #fff;
  border: 2px solid #E2E8F0; user-select: none; -webkit-user-select: none;
}
.ps-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.ps-art-canvas { z-index: 1; touch-action: none; cursor: crosshair; }
.ps-live-canvas { z-index: 2; pointer-events: none; }
.ps-line-canvas { z-index: 3; pointer-events: none; }

/* Cubist Interactive Stage */
.ps-cubist-stage {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 14px; overflow: hidden; border: 2px solid #E2E8F0;
  background: #FFF9EB; touch-action: none; user-select: none; -webkit-user-select: none;
}
.ps-cubist-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.ps-cubist-paint { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; pointer-events: none; touch-action: none; }
.ps-cubist-paint.active { pointer-events: auto; cursor: crosshair; }
.ps-cubist-piece { cursor: grab; }
.ps-cubist-piece:active { cursor: grabbing; }
.ps-cubist-piece.selected { filter: drop-shadow(0 0 8px rgba(29, 95, 214, .75)); }

/* Guided Draw Canvas */
.ps-guide-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 4; pointer-events: none; }
.ps-step-meter {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: #FFF8EC; border-radius: 14px; border: 1.5px solid #F2DFC4;
}
.ps-meter-track { flex: 1; height: 12px; background: #E9EFF7; border-radius: 999px; overflow: hidden; }
.ps-meter-fill { height: 100%; background: linear-gradient(90deg, #FF8C42, #1B9E5A); border-radius: 999px; transition: width .2s ease; }

/* Swatches Palette */
.ps-palette {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 8px;
}
.ps-swatch {
  appearance: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 3px solid rgba(16, 45, 90, .18); padding: 0; position: relative;
  transition: transform .12s ease, box-shadow .12s ease; flex: none;
}
.ps-swatch:hover { transform: scale(1.12); }
.ps-swatch.sel {
  border-color: var(--ink); transform: scale(1.18);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent-deep);
}
body[data-level="little"] .ps-swatch { width: 42px; height: 42px; }

/* Toolbars & Dock Panels */
.ps-dock {
  background: #fff; border: 2px solid var(--line); border-radius: 18px;
  padding: 10px; display: grid; gap: 8px;
}
.ps-tool-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center;
}
.ps-tool-btn {
  appearance: none; border: 2px solid var(--line); background: #FFFDF9; color: var(--ink);
  border-radius: 14px; padding: 6px 10px; min-height: 42px; min-width: 44px;
  font-size: .82rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: transform .12s, background .12s, border-color .12s;
}
.ps-tool-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.ps-tool-btn.sel { background: #FFF0D9; border-color: var(--accent-deep); box-shadow: 0 2px 0 var(--accent-deep); }
.ps-tool-btn:disabled { opacity: .45; cursor: default; transform: none; }

.ps-size-dot {
  display: inline-block; border-radius: 50%; background: var(--ink);
}

/* Sub-drawer (Patterns / Stamps / Colour Mixer / Cubist Parts) */
.ps-subtray {
  background: #FFFBF4; border: 1.5px solid #F2DFC4; border-radius: 14px;
  padding: 8px; display: grid; gap: 8px;
}
.ps-subtray[hidden] { display: none; }
.ps-parts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px;
}
.ps-part-btn {
  appearance: none; border: 2px solid var(--line); background: #fff; border-radius: 12px;
  padding: 5px; cursor: pointer; display: grid; justify-items: center; gap: 2px;
  font-size: .72rem; font-weight: 600; color: var(--ink);
}
.ps-part-btn:hover { border-color: var(--accent); }
.ps-part-btn svg { width: 48px; height: 48px; display: block; }

/* Custom Colour Mixer */
.ps-mixer {
  display: grid; gap: 8px; text-align: center;
}
.ps-mixer-eq {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.ps-pot {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink);
  cursor: pointer; display: inline-block; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12);
}
.ps-pot.result { width: 56px; height: 56px; border-width: 4px; }
.ps-mixer-label { margin: 0; font-size: .85rem; font-weight: 600; color: var(--ink); }
.ps-slider-row {
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .8rem; font-weight: 600;
}
.ps-slider-row input[type="range"] { width: 150px; accent-color: var(--accent-deep); }

/* Prompt Banner */
.ps-prompt-banner {
  background: linear-gradient(135deg, #EEF6FF, #FFF7E6);
  border: 2px solid #CFE0F7; border-radius: 14px; padding: 8px 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ps-prompt-text { flex: 1; margin: 0; font-size: .9rem; font-weight: 600; color: var(--ink); }
.ps-prompt-tag {
  font-size: .74rem; font-weight: 700; background: #fff; border: 1px solid #CFE0F7;
  padding: 3px 9px; border-radius: 999px; color: var(--studio-blue);
}

/* Action Footer */
.ps-action-bar {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 2px;
}

/* Framed Preview in Results / Gallery */
.ps-framed-preview {
  display: inline-block; padding: 14px; border-radius: 16px; margin: 10px auto;
  box-shadow: 0 12px 28px -12px rgba(16, 45, 90, .4); max-width: 100%;
}
.ps-framed-preview img {
  display: block; max-width: 100%; width: 380px; height: auto;
  border-radius: 6px; background: #fff; border: 8px solid #FFFDF7;
}
.ps-frame-gold { background: linear-gradient(135deg, #B8860B, #F6D365, #9E6E05); }
.ps-frame-wood { background: linear-gradient(135deg, #6B3E26, #A96B43, #5C311B); }
.ps-frame-adire { background: linear-gradient(135deg, #142952, #2F5FA8, #102447); }
.ps-frame-coral { background: linear-gradient(135deg, #C93B52, #FF8599, #A62B40); }

/* Museum Gallery Grid & Badges & Heritage */
.ps-gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.ps-art-card {
  background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 12px;
  display: grid; gap: 8px; text-align: center; box-shadow: 0 4px 16px -10px rgba(16, 45, 90, .25);
}
.ps-art-card .ps-framed-preview { margin: 0; padding: 8px; }
.ps-art-card .ps-framed-preview img { width: 100%; border-width: 5px; }
.ps-art-meta { font-size: .82rem; color: var(--ink-soft); margin: 0; }
.ps-art-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin: 0; }

.ps-badges-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 12px; margin-bottom: 18px;
}
.ps-badge-card {
  background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 14px;
  text-align: center; display: grid; gap: 4px; opacity: .55; filter: grayscale(.6);
}
.ps-badge-card.earned {
  opacity: 1; filter: none; border-color: #F4B942; background: linear-gradient(180deg, #FFFDF5, #FFF4DC);
  box-shadow: 0 4px 0 #F4D082;
}
.ps-badge-icon { font-size: 2rem; line-height: 1.1; }
.ps-badge-name { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.ps-badge-desc { font-size: .8rem; color: var(--ink-soft); }

.ps-heritage-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px;
}
.ps-heritage-card {
  background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 14px;
  display: grid; gap: 6px; text-align: left;
}
.ps-heritage-head { display: flex; align-items: center; gap: 8px; }
.ps-heritage-icon { font-size: 1.65rem; }
.ps-heritage-period { font-size: .78rem; font-weight: 700; color: var(--studio-blue); }
.ps-heritage-card p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

/* Toast notification */
.ps-toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: .9rem; z-index: 90; box-shadow: 0 8px 24px rgba(16, 45, 90, .35);
}

@media (max-width: 540px) {
  #app { padding: 10px 10px 44px; }
  .ps-easel-wrap { padding: 6px; border-radius: 16px; }
  .ps-swatch { width: 32px; height: 32px; }
  .ps-tool-btn { padding: 6px 8px; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  .kk-mascot svg { animation: none !important; }
  .ps-swatch, .ps-tool-btn, .ps-thumb-card, .ps-tab, .ps-meter-fill { transition: none !important; }
}
