:root{
  --bg: #FFF9E6;
  --card: #ffffff;
  --text: #2C3E50;
  --muted: rgba(44,62,80,.65);

  --primary: #FF6B9D;
  --secondary: #4ECDC4;
  --ghost: rgba(44,62,80,.08);

  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.10);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

html,body{height:100%;}
body{
  margin:0;
  background: radial-gradient(circle at 20% 0%, #fff 0%, var(--bg) 40%, #ffeef6 100%);
  color:var(--text);
  font-family:var(--font);
}
#app{min-height:100%; display:flex; align-items:stretch; justify-content:center; padding:16px;}

.shell{
  width:min(1020px, 100%);
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - 32px);
}

.topbar{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items:center;
  gap:12px;
  padding:10px 8px;
}
.brandLogo{
  height:44px;
  width:auto;
  opacity:.95;
  object-fit:contain;
}
.titleLogo{
  height:54px;
  width:auto;
  object-fit:contain;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.10));
}
.brandRight{display:flex; justify-content:flex-end;}
.stage{flex:1; display:flex; align-items:center; justify-content:center; padding:8px;}
.foot{
  padding:10px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}

.card{
  width:min(900px, 100%);
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.card.big{ padding:22px; text-align:center; }
.card.draw{ padding:16px; }

.hero{
  width:min(820px, 100%);
  max-height:280px;
  object-fit:contain;
  display:block;
  margin:0 auto 10px auto;
}

h1{margin:8px 0 8px 0; font-size:34px;}
h2{margin:6px 0 8px 0; font-size:30px;}
p{margin:8px 0; color:var(--muted);}

.row{display:flex; gap:10px; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:12px;}
.row.small{ margin-top:10px; }

button{
  border:0;
  border-radius:14px;
  padding:12px 16px;
  font-size:16px;
  cursor:pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  transition: transform .06s ease;
}
button:active{ transform: translateY(1px) scale(.99); }

.primary{ background:var(--primary); color:white; }
.secondary{ background:var(--secondary); color:#083b36; }
.ghost{ background:var(--ghost); color:var(--text); box-shadow:none; }

.meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin-bottom:12px;
}
.pill{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(0,0,0,.05);
  font-size:14px;
}

.imgWrap{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:10px;
  background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.6));
  border-radius:16px;
  margin-bottom:14px;
}
.promptImg{
  width:min(520px, 100%);
  height:260px;
  object-fit:contain;
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.option{
  background: #fff;
  border:2px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
  padding:14px 14px;
  font-weight:700;
  letter-spacing:.2px;
}

.progress{
  height:10px;
  background:rgba(0,0,0,.06);
  border-radius:999px;
  margin-top:14px;
  overflow:hidden;
}
.progress .bar{
  height:100%;
  background:linear-gradient(90deg, var(--secondary), var(--primary));
  width:0%;
}

.how{ text-align:left; max-width:520px; margin:12px auto 0 auto; }
.hidden{ display:none; }

/* Drawing */
.canvasWrap{
  background:linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.02));
  border-radius:16px;
  padding:10px;
}
canvas{
  width:100%;
  height:auto;
  background:#fff;
  border-radius:14px;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.06);
  touch-action:none;
}
.tools{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
}
.tools label{ color:var(--muted); display:flex; align-items:center; gap:10px; }
.palette{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.color{
  width:34px; height:34px;
  border-radius:999px;
  border:2px solid rgba(0,0,0,.12);
  padding:0;
}

@media (max-width: 520px){
  .topbar{ grid-template-columns: 1fr 1fr 1fr; }
  .brandLogo{ height:34px; }
  .titleLogo{ height:44px; }
  h1{ font-size:28px; }
  h2{ font-size:26px; }
  .grid{ grid-template-columns: 1fr; }
  .promptImg{ height:220px; }
}
