/* Colour In — tap-to-colour. Shares arcade.css theme. */
.ci-body { min-height: 100svh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 0; max-width: 680px; margin: 0 auto; }
.icon-btn { cursor: pointer; font: inherit; font-size: 1.3rem; line-height: 1; width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: rgba(32,16,64,0.55);
  border: 1.5px solid var(--panel-brd); border-radius: 50%; text-decoration: none; }
.icon-btn:hover { background: rgba(168,85,247,0.3); } .ghost-btn { pointer-events: none; }
.ci-title { font-size: 1.6rem; font-weight: 900; margin: 0; letter-spacing: -1px; }
.ci-title span { background: linear-gradient(120deg, var(--neon), var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.ci-wrap { max-width: 680px; margin: 0 auto; padding: 12px 14px 40px; }

.pickbar { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px; scrollbar-width: none; }
.pickbar::-webkit-scrollbar { display: none; }
.pick { flex: none; width: 58px; height: 58px; border-radius: 14px; cursor: pointer; background: #fff;
  border: 2px solid var(--panel-brd); padding: 4px; transition: transform .1s, border-color .2s; }
.pick svg { width: 100%; height: 100%; display: block; }
.pick.on { border-color: var(--magenta); box-shadow: var(--glow); transform: translateY(-2px); }

.art-frame { background: #fdfbff; border: 1.5px solid var(--panel-brd); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45); padding: 10px; margin: 10px 0; }
.art-frame { position: relative; }
.art { width: 100%; aspect-ratio: 1 / 1; max-height: 58svh; margin: 0 auto; touch-action: none; overflow: hidden; border-radius: 10px; }
.art svg { width: 100%; height: 100%; display: block; touch-action: none; }
.art .region { cursor: pointer; }
.art .ink { pointer-events: none; }
.zoombar { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.zoombar button { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--panel-brd); cursor: pointer;
  background: rgba(32,16,64,0.78); color: #fff; font: inherit; font-size: 1.25rem; font-weight: 800; line-height: 1; touch-action: manipulation; }
.zoombar button:active { background: rgba(168,85,247,0.6); }
.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(#ef4444, #fde047, #22c55e, #38bdf8, #a855f7, #ef4444); }
.swatch.custom input { position: absolute; inset: -6px; width: 200%; height: 200%; opacity: 0; cursor: pointer; }

.palette { display: grid; grid-template-columns: repeat(11, 1fr); gap: 7px; margin: 12px 0; }
@media (max-width: 460px) { .palette { grid-template-columns: repeat(8, 1fr); gap: 8px; } }
.swatch { aspect-ratio: 1/1; border-radius: 50%; cursor: pointer; border: 3px solid transparent;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,0.15); transition: transform .1s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--magenta), inset 0 0 0 1.5px rgba(0,0,0,0.15); transform: scale(1.12); }
.swatch.eraser { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17l6 6 12-12-6-6z' fill='none' stroke='%23999' stroke-width='2'/%3E%3C/svg%3E") center/60% no-repeat; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.btn.small { font-size: .9rem; padding: .6em 1.1em; }
.ci-hint { text-align: center; color: var(--ink-dim); font-size: .85rem; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px); transform: translateX(-50%);
  background: rgba(32,16,64,0.92); border: 1px solid var(--panel-brd); color: var(--ink); padding: .6em 1.1em;
  border-radius: 999px; font-weight: 700; font-size: .85rem; z-index: 40; }
.hidden { display: none !important; }
